Hi All,
I have a grid with a GridDropDownColumn in it and have it bound to a datasource. All seems to work well when I Insert into the grid, however, when I got to Edit the record, the drop down list in the column does not populate with all the datasource values. In fact, it only populates with the value that the record is assigned to in the parent datasource.
I've noticed this also happens in the telerik example here in the second grid that allows editing. If you edit the first recored you'll notice that the only value that is available to the list is Seattle. However, if you Add a new record you have access to all the values.
What's going on here?
thanks
Jordan
I have a grid with a GridDropDownColumn in it and have it bound to a datasource. All seems to work well when I Insert into the grid, however, when I got to Edit the record, the drop down list in the column does not populate with all the datasource values. In fact, it only populates with the value that the record is assigned to in the parent datasource.
I've noticed this also happens in the telerik example here in the second grid that allows editing. If you edit the first recored you'll notice that the only value that is available to the list is Seattle. However, if you Add a new record you have access to all the values.
What's going on here?
thanks
Jordan
10 Answers, 1 is accepted
0
Hello Jordan,
This is because you have Load-on-Demand enabled for the dropdown column. With this feature, the combo items are requested only after you open the dropdown. When adding new record, the combo is empty and thus all items are requested. When editing a record, however, the combo has a single value - the selected item text. As entering custom text in the combo textbox is enabled in this scenario, your items will be requested when you modify the text in the combo. If you delete the selected text, for example, your combo items will be requested.
Veli
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Rhyss
Top achievements
Rank 1
answered on 26 Nov 2010, 08:47 AM
The obvious follow up question is how do I get the list to repopulate on edit. I can't think of a single scenario where the current implementation would be required or user friendly. It would seem that load in demand should populate on edit too
Is there a way to force this?
0
Hi Jordan,
Veli
the Telerik team
Load-on-Demand is provided exactly for the purpose of not binding the combo on edit. Item loading is delayed to the point when items are actually requested, i.e. when the combo is opened or its text is modified. If you do not need this behavior and would prefer the combo binding on item edit command when the entire grid rebinds, setting GridDropDownColumn.AllowAutomaticLoadOnDemand = false would simply turn this feature off.
Veli
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Rhyss
Top achievements
Rank 1
answered on 26 Nov 2010, 01:49 PM
Yes, I understand the list isdelayed with load on demand. But you say in your post that it is delayed until the combo box is opened or the text changes. However it does NOT populate when the combo box is opened. If it did that would be fine and as one might expect. Instead when the user opens the combo box it only allows them to select the option already selected.
You state that it should load when it is opened but it does not
0
Hi Jordan,
Then this indicates some misconfiguration with the column, where the dropdown does not receive any item data after it has requested items through a page callback. Can you show us some sample code we can examine and try to test locally? How do you bind RadGrid and the GridDropDownColumn?
Veli
the Telerik team
Then this indicates some misconfiguration with the column, where the dropdown does not receive any item data after it has requested items through a page callback. Can you show us some sample code we can examine and try to test locally? How do you bind RadGrid and the GridDropDownColumn?
Veli
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Rhyss
Top achievements
Rank 1
answered on 26 Nov 2010, 10:26 PM
As stated in my original post, this behaviour is present in your example on your website.
0
Hi Jordan,
Veli
the Telerik team
As I tried to explain, if there is a selected item in the combo, the combo will not request its items unless you change the selected text. In the RadGrid columns demo, if you open the combo with a value of Seattle, the items will not be requested, unless you delete the value, in which case all cities will be requested. This is the intended behavior. Can you confirm you are getting this?
Veli
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Rhyss
Top achievements
Rank 1
answered on 29 Nov 2010, 11:59 AM
Yes, this is what is happening. As I said, I can't imagine when this would be desired if this is intended behaviour.
I have disabled load on demand to get this to operated in a way a user would understand.
0
Tiago
Top achievements
Rank 1
answered on 28 Feb 2013, 04:29 PM
Hi, I have this code:
The LoadOnDemand is not working when adding a new record and the combo does not populate when I change de selected text in edit mode. I think there's some misconfiguration, but I don't know where.
Edit: It only does not work in Internet Explorer 9.
Thanks
<telerik:GridDropDownColumn DataSourceID="SqlDataSource3" ListTextField="NM_COORD" ListValueField="ID_COORD" UniqueName="NM_COORD" SortExpression="NM_COORD" HeaderText="Coordenador" DataField="ID_COORD" DropDownControlType="RadComboBox" FooterText="" AllowAutomaticLoadOnDemand="true" ConvertEmptyStringToNull="true" AllowVirtualScrolling="true" ShowMoreResultsBox="true" ItemsPerRequest="10" ShowFilterIcon="false" Visible="false"></telerik:GridDropDownColumn>The LoadOnDemand is not working when adding a new record and the combo does not populate when I change de selected text in edit mode. I think there's some misconfiguration, but I don't know where.
Edit: It only does not work in Internet Explorer 9.
Thanks
0
Hello Tiago,
I tried to reproduce the described issue but to no avail. I am sending you a simple example which demonstrates the GridDropDownColumn with enabled load on demand like in your code snippet. However everything works as expected. Please check the example and let me know what differs in your case.
Looking forward for your reply.
All the best,
Radoslav
the Telerik team
I tried to reproduce the described issue but to no avail. I am sending you a simple example which demonstrates the GridDropDownColumn with enabled load on demand like in your code snippet. However everything works as expected. Please check the example and let me know what differs in your case.
Looking forward for your reply.
All the best,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
