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

Make editable grid text boxes smaller

1 Answer 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 12 Oct 2012, 08:23 PM
I have a grid that loads with all the fields editable but I need to resize the editable text boxes to make the grid fit on the page. Can someone post some code that will do this?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 14 Oct 2012, 09:16 AM
Hello,

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item.IsInEditMode && e.Item is GridEditableItem)
        {
            GridEditableItem item = e.Item as GridEditableItem;
            TextBox TextBox1= item["YourColumnUniqueName"].Controls[0] as TextBox;
           //Assign Width here
 
        }
    }


Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Scott
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or