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

Edit width of all textboxes in editmode

1 Answer 44 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nicklas
Top achievements
Rank 1
Nicklas asked on 25 Jun 2013, 01:32 PM
Hello!

When I enter edit mode in a radgrid I end up with all the textboxes beeing in different width.

I thought of solving this, by looping through all the items that is beeing edited and set them to System.Web.UI.WebControls.Unit.Pixel(300); to change the size.

I have tried with a loop looking something like below, but obviously this will yield error,

Any idea what to do to make them into the same size? 

foreach (GridEditFormItem EdItem in rgRelMaterial.Columns)
  {
        EdItem.Width = System.Web.UI.WebControls.Unit.Pixel(300);
  }

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 28 Jun 2013, 07:28 AM
Hello Nicklas,

You can access and modify the generated input controls using the demonstrated approach in the following topic:
( Section Accessing controls in edit/insert mode )
http://www.telerik.com/help/aspnet-ajax/grid-accessing-cells-and-rows.html

Hope this helps.

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Nicklas
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or