Add New Row to Grid with Combo Not Selected

2 posts, 0 answers
  1. Steven
    Steven avatar
    4 posts
    Member since:
    Oct 2012

    Posted 27 Mar 2015 Link to this post

    Any ideas on adding a new row to a RadGrid with the bound RadComboBox un-selected and displaying the EmptyMesage.
    <ItemTemplate>
    <telerik:RadComboBox ID="cboCoverSectionImageType" Width="230px" runat="server" SelectedValue='<%# Eval("IMAGE_TYPE_ID") %>'
    DataSourceID="ObjectDSPropertyImageTypes" DataTextField="Image_Type_Name" DataValueField="Image_Type_ID"  
    EmptyMessage="Click here & select page">
    </telerik:RadComboBox>
    </ItemTemplate>


    ImageMasterInfo objNewImageInfo = new ImageMasterInfo();
    objNewImageInfo.IMAGE_ID = 0;
    objNewImageInfo.IMAGE_PROPERTY_ID = this.PropertyID;
    objNewImageInfo.IMAGE_TYPE_ID = -1;
    objNewImageInfo.IMAGE_PATH = string.Empty;
    objNewImageInfo.IMAGE_THUMB_PATH = string.Empty;
    lstSectionCoverImages.Add(objNewImageInfo);
     
    RadGridCoverSectionImages.DataSource = lstSectionCoverImages;
    RadGridCoverSectionImages.DataBind();

  2. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 01 Apr 2015 Link to this post

    Hello Steven,

    Removing the SelectedValue property should help you achieve the requested behavior.

    Looking forward to your reply.

    Regards,
    Eyup
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top