ASP.NET - Gridview Column width - Asked By Naresh Kumar on 18-Oct-10 06:01 AM

Hi

In my grideview i have one childgrid.in childgrid itemtemplate   i have labels textboxs when i edit the parentgrid view i am making textboxes visible true(Based on the condition i am showing lables and text boxes for a particular cell).

For this i am unable to set the column width

Thanks

anil soni replied to Naresh Kumar on 18-Oct-10 01:48 PM
You can use ItemStyle element Width attribute
Below is an aribitary sample markup

1.<asp:GridView ID="gridView" runat="Server">
2.<Columns>
3.<asp:TemplateField >
4.<ItemStyle Width="" />
5.</asp:TemplateField>
6.</Columns>
7.</asp:GridView>