GridTemplateColumn problem

2 posts, 0 answers
  1. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 30 Sep 2009 Link to this post

    I want to use a GridTemplateColumn in my grid, this is how im using it
    <telerik:GridTemplateColumn DataField="CastMember" DataType="System.String" HeaderText="Cast Member"    
                            SortExpression="CastMember" UniqueName="CastMember">     
                                <telerik:RadTextBox ID="RadTextBoxCastMember2" runat="server" Skin="Vista" Width="250px" MaxLength="100" > 

    when I edit the grid, I want the text box to contain the contents of the underlying datafield, so in my


    event ive puit this code

    protected void RadGridCast_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)  
                if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
                    if (!e.Item.OwnerTableView.IsItemInserted)  
                        GridEditableItem item = e.Item as GridEditableItem;  
                        RadTextBox tb = (RadTextBox)item.FindControl("RadTextBoxCastMember2");  

    how do I obtain the data to put in the textbox when its in edit mode ???  Ive tried several methods but none of them work.  Can someone give me a working example ?
  2. Daniel
    Daniel avatar
    4949 posts

    Posted 30 Sep 2009 Link to this post

    Hello Mark,

    Please examine the following links:
    Data-Binding Expressions for Web Forms Pages
    Accessing Cells and Rows

    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