I am having problems with updating/inserting/deleting objects in a RadGrid whose data source is bound to a collection. Particulars:
- The collection is bound to the RadGrid when NeedDataSource fires as I am using a treeview control to filter the results in the RadGrid.
- Update/Insert functions are located in the BLL and take the edited/selected object as a parameter.
- I cannot seem to retrieve the selected/edited object from the RadGrid programmatically (datasource is null?!?), and when I try to get information by populating a hashtable with ExtractValuesFromItem (less than ideal as I do not have all the data displayed in the grid), the key values are null as well.
Would someone be able to provide insight on how I can accomplish retrieving the original/edited objects from the RadGrid? Are there any code examples that I missed while searching? Many thanks.
- The collection is bound to the RadGrid when NeedDataSource fires as I am using a treeview control to filter the results in the RadGrid.
Protected Sub AccountDetails_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles AccountDetails.NeedDataSource- Only some of the fields within the object are displayed in the RadGrid (pk is not displayed); several fields are not primative types (two fields are also collections).
accts = af.GetAccounts(TreeNav.SelectedValue) 'where af.GetAccounts returns a collection of accounts
AccountDetails.DataSource = accts
End Sub
- Update/Insert functions are located in the BLL and take the edited/selected object as a parameter.
- I cannot seem to retrieve the selected/edited object from the RadGrid programmatically (datasource is null?!?), and when I try to get information by populating a hashtable with ExtractValuesFromItem (less than ideal as I do not have all the data displayed in the grid), the key values are null as well.
Would someone be able to provide insight on how I can accomplish retrieving the original/edited objects from the RadGrid? Are there any code examples that I missed while searching? Many thanks.