Automatic operations (insert) when grid is empty

2 posts, 0 answers
  1. Jack
    Jack avatar
    128 posts
    Member since:
    May 2003

    Posted 03 Aug 2009 Link to this post

    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

  2. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 06 Aug 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top