Hi,
I am using WebDataGrid 11.2
I am binding a dataset to a grid. One of the column values may grow to to large size. Currently, the grid automatically truncates the data to keep the row height/column width constant.
Is it possible to make the cell grow (vertical growth preferred) to accomodate the complete data?
Markup of grid:
<ig:WebDataGrid
ID="WebDataGrid1"
runat="server"
Height="100%"
Width="100%"
DefaultColumnWidth="150px"
Font-Size="Small"
AutoGenerateColumns="true">
<Behaviors>
<ig:Selection></ig:Selection>
<ig:Sorting></ig:Sorting>
</Behaviors>
</ig:WebDataGrid>
Thanks
Sharon.
Hi Sharon,
Thank you for posting in the community.
In order to autosize the column width of your grid based on cell width, you can set the ItemCssClass of WebDataGrid. For instance:
tbody.AutosizeCells>tr>td{ background-color:White; border-top:solid 1px #D8D8D8; padding:5px 8px 5px 8px; height: 20px; text-align:left; vertical-align:middle; white-space:nowrap; overflow: visible;}
<ig:WebDataGrid ID="WebDataGrid1" runat="server" Height="358px" ItemCssClass="AutosizeCells"/>
Note that in order for this to work, the width of your columns should not be set explicitly.
You may find additional useful information for styling WebDataGrid at:
http://forums.infragistics.com/blogs/engineering/archive/2010/08/25/webdatagrid-css-styling-guide.aspx
Please let me know if this helps.
Please do not hesitate to contact me if you have any questions.