Using RadComboBox in a RadGrid with inline insert/update

4 posts, 0 answers
  1. cayates
    cayates avatar
    71 posts
    Member since:
    Feb 2007

    Posted 28 Jan 2009 Link to this post

    I'm using a RadComboBox inside a RadGrid.  It appears I have to use a GridTemplateColumn because I want to use a custom skin for the drop down and I want to have a blank entry as the first item by default.  Is there a way to do that without using a GridTemplateColumn?

    Anyhow, now that I'm using the GridTemplateColumn, I'm having a problem getting the in-line editing and inserting to work.  When I try to insert an item I get this error: "DataBinding: 'Telerik.Web.UI.GridInsertionObject' does not contain a property with the name 'Type'."  Editing an existing record works great.

    Here is my code:

    <telerik:GridTemplateColumn HeaderText="Type" DataField="Type" > 
                                    <%# Eval("Type.Name") %> 
                                    <telerik:RadComboBox ID="PropertyType" runat="server"  Width="250" Height="150" 
                                            DropDownWidth="300" ShowDropDownOnTextboxClick="true" MarkFirstMatch="true" 
                                            ShowToggleImage="false" AppendDataBoundItems="true"  
                                            DataSourceID="PropertyTypes" DataValueField="Id" DataTextField="Name" 
                                            AllowCustomText="false" SelectedValue='<%# Bind("Type.Id") %>'
                                            <telerik:RadComboBoxItem Text="" /> 

    Your demo "Combo In Grid" under "Application Scenarios" has this functionality except it only has in-line editing and not inserting or I would follow that.



  2. Rosen
    Rosen avatar
    3215 posts

    Posted 02 Feb 2009 Link to this post

    Hi cayates,

    Please refer to this help article (under Setting predefined values for different column editors section) for more information about how to set default values when RadGrid's insert form is shown.

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft R3 2016 release webinar banner
  4. Mark
    Mark avatar
    79 posts
    Member since:
    Apr 2007

    Posted 19 Sep 2009 Link to this post

    Ever figure this out?  I'm facing the same error.  I didn't see much in the help article that applied to this situation.
  5. Sebastian
    Sebastian avatar
    9934 posts

    Posted 22 Sep 2009 Link to this post

    Hello MJ,

    The article explains how to set predefined values for column editors to avoid such exceptions on init insert. You may also examine the content from this documentation topic related to the same subject.

    Best regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top