I have a table containing two fields (amongst others), being TableName and TableID. In my managing RadGrid I wish to be able to edit the TableID field using a dropdown box populated with items from the appropriate TableName.
So far I have thought of two solutions both of which I can't seem to implement using RadGrid.
1. Have a GridDropdownColumn and specify the DataSourceID, DataTextField & DataValueField server-side in an event
2. Have a GridTemplateColumn with an EditItemTemplate containing a dropdown getting the Stored Procedure do all the work and return the dropdown items with standard ID & Name fields.
I was able to get Option 2 working for the EditItemTemplate, however I've now got the issue of displaying the correct value in the ItemTemplate.
Does anyone have any thoughts how I might get Option 1 to work, or how I could modify Option 2 to get the ItemTemplate working as well?
So far I have thought of two solutions both of which I can't seem to implement using RadGrid.
1. Have a GridDropdownColumn and specify the DataSourceID, DataTextField & DataValueField server-side in an event
2. Have a GridTemplateColumn with an EditItemTemplate containing a dropdown getting the Stored Procedure do all the work and return the dropdown items with standard ID & Name fields.
I was able to get Option 2 working for the EditItemTemplate, however I've now got the issue of displaying the correct value in the ItemTemplate.
Protected Sub grdRecordMatchup_EditCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) Handles grdRecordMatchup.EditCommand |
sqlRecordMatchupTableList.SelectParameters("ID").DefaultValue = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("LU_RecordMatchupID").ToString() |
End Sub |
Does anyone have any thoughts how I might get Option 1 to work, or how I could modify Option 2 to get the ItemTemplate working as well?