|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
bug with gridview.selectedvalue?detailsview that may show full details for items selected on main gridview. So I defined two objectDataSources: one that retrieves all items, and provides them to gridview, and an other that returns only one item. This latter requires am input parameter (ID of item to show), that it retrieves from gridview.SelectedValue property. All object have enableViewState=false. It seems that nothing works until I read selectedValue property value from my codeBehind code (or either from immediate window in VS 2005): Protected Sub gwItems_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles gwItems.SelectedIndexChanged Dim a As Object = gwItems.SelectedValue End Sub Without this code, detailsView doesn't show anything. With this code, all works. Is this a bug of datagrid? Is this the right way to create this kind of page? thanks Hi Trapulo,
Thanks for your posting. Regarding on the GridView.SelectedValue issue, is it occuring specific to a certain page, or specific to the "enableViewState=false"? Also, you can try checking the "SelectedIndex" property of the GridView control to see whether it stores the correctly value. Based on my local test( I use two SqlDataSource controls instead, and Gridview + DetailsView, with page's viewstate disabled), seems it can work correctly.(When I change the GridView's selectedItem, the DetailsView will display the columns for that corresponding selected item in GridView. If you feel necessary, I can paste my test page's code. Please feel free to let me know if there's anything I missed. Regards, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
formview with objectDataSource won't display data
Web UserControl DropDownlist control event not working... generating textboxes on the fly ASP.Net (2003) DataGrid doesn't fire PageIndexChanged Assign database value to a RadioButtonList control How to refresh a dropdownlist inside a DetailsView? Create a word like doc from C#.NET updating multiple tables from a formView Hidden input field named "__EVENTVALIDATION" multiView vs panel |
|||||||||||||||||||||||