This is a migrated thread and some comments may be shown as answers.

Automatic operations (insert) when grid is empty

1 Answer 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 03 Aug 2009, 03:05 PM
Hi all,

Following the demo at http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx

Everything is great except that if the grid is empty and I try to insert a new record, the GridDropDownColumn in edit mode does not bind to the declared datasource. It seems the grid needs at least one record before it will bind the dropdown.

 <telerik:GridDropDownColumn DataField="answertype" DataSourceID="SqlDataSource3" 
                        HeaderText="Answer Type" ListTextField="answertype" ListValueField="atID" 
                        UniqueName="answertype" ColumnEditorID="GridDropDownColumnEditor1">  
</telerik:GridDropDownColumn> 

How can I force it to bind on edit please?

Cheers,

Jon

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 06 Aug 2009, 01:40 PM
Hello jon byron,

Thank you for directing us to a concrete scenario. It seems that the GridDropDownColumn cannot handle its data binding if RadGrid's data source does not have items and the dropdown column has a ColumnEditorID specified. The above condition makes the dropdown column inherit properties from the column editor specified, but breaks the binding logic if RadGrid does not have data items.

This issue is logged in our bug tracking system and is to be fixed as soon as possible. For now, please, refrain from using declarative column editors with the GridDropDownColumn. The demo example you refer to can be fixed simply removing the ColumnEditorID property from the markup of the dropdown column.

Sincerely yours,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Jon
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or