Hello,
I have a hierarchial radgrid where the details tables have the option of Add/Edit & delete records. This is implemented using the automatic data source operations. In add/edit mode, one field is shown using the RadCombo box with 500+ records. All the required functionality is working fine but the overall performance of the grid is slow.
To improve the performance of the grid, I am in the process of modifying the RadCombo box to EnableLoadOnDemand. The LoadOnDemand functionality is working fine but I am having issues with the Add & edit operations. Below is the code extract for the same:
In the RadComboBoxEmps_ItemsRequested event, I have added the code to populate this Radcombo box using a datareader.
But When I attempt to Add a new record or update existsing record, the SP responsible for insert/ Update throws a error saying that value for one of the field is NULL. And that field is refering to the value of the above RadCombo. i.e. for some reason the Value of selected item of the radcombo box is sent as null to the Insert SP. And I am sure that none of the Value in the RadCombo box is Null as it is populated from a master table.
I have following questions with this regards:
1. Will Radcombo box with EnableLoadOnDemand=true work with automatic data source operations for Add/edit & delete? I have seen some samples for EnableLoadOnDemand but I couldn't find any sample for it with automatic data source.
2. How will the automatic data source operations know that the above Radcombo box is mapped to some field in InsertParameters & UpdateParameters of SQLDatasource?
3. Do I have to write some code in the Itemdatabound event for the edit operations?
Please help me fix this issue.
Thanks,
Rajiv
I have a hierarchial radgrid where the details tables have the option of Add/Edit & delete records. This is implemented using the automatic data source operations. In add/edit mode, one field is shown using the RadCombo box with 500+ records. All the required functionality is working fine but the overall performance of the grid is slow.
To improve the performance of the grid, I am in the process of modifying the RadCombo box to EnableLoadOnDemand. The LoadOnDemand functionality is working fine but I am having issues with the Add & edit operations. Below is the code extract for the same:
<
EditItemTemplate>
<
telerik:RadComboBox ID="RadComboBoxEmps"
runat="Server" MarkFirstMatch="True" AppendDataBoundItems="True" EnableLoadOnDemand="True" OnItemsRequested="RadComboBoxEmps_ItemsRequested" OnClientItemsRequesting="OnClientItemsRequesting">
</telerik:RadComboBox>
</
EditItemTemplate>
In the RadComboBoxEmps_ItemsRequested event, I have added the code to populate this Radcombo box using a datareader.
But When I attempt to Add a new record or update existsing record, the SP responsible for insert/ Update throws a error saying that value for one of the field is NULL. And that field is refering to the value of the above RadCombo. i.e. for some reason the Value of selected item of the radcombo box is sent as null to the Insert SP. And I am sure that none of the Value in the RadCombo box is Null as it is populated from a master table.
I have following questions with this regards:
1. Will Radcombo box with EnableLoadOnDemand=true work with automatic data source operations for Add/edit & delete? I have seen some samples for EnableLoadOnDemand but I couldn't find any sample for it with automatic data source.
2. How will the automatic data source operations know that the above Radcombo box is mapped to some field in InsertParameters & UpdateParameters of SQLDatasource?
3. Do I have to write some code in the Itemdatabound event for the edit operations?
Please help me fix this issue.
Thanks,
Rajiv