WebGrid.NET also support to configure MultiLine Row in ColumnSet.
During this walkthrough, you will learn how to do the following:
- Create ColumnSet.
- Set MultiLine Row in ColumnSet.
Prerequisites
In order to complete this walkthrough, you will need the following:
- Access to the Microsoft Access Northwind database
- Visual Studio 2005 Application.
Step-By-Step Instructions
To set the column on that ColumnSet as a multiline
- Drag a WebGrid instance into the WebForm.
- Bind the grid to the DataSource then RetrieveStructure.
- Create a ColumnSet and set the height to "-1" for the column and including the spanned column where you want the height to be dynamic. Below is the XML generated in the HTML.
XML Copy Code <iswebgrid:WebGridRowLayout width="116" height="-1" colspan="5" Row="2" ColumnMember="Notes" /> <iswebgrid:WebGridRowLayout width="116" height="-1" Spanned="Column" Row="2" Col="1" /> <iswebgrid:WebGridRowLayout width="116" height="-1" Spanned="Column" Row="2" Col="2" /> <iswebgrid:WebGridRowLayout width="116" height="-1" Spanned="Column" Row="2" Col="3" /> <iswebgrid:WebGridRowLayout width="116" height="-1" Spanned="Column" Row="2" Col="4" />
- Bind that column to a WebGridColumn and set that column's AllowMultiline to True. Below is the XML generated in the HTML.
XML Copy Code <iswebgrid:WebGridColumn Caption="Notes" DataMember="Notes" AllowMultiLine="True" name="Notes" width="100px" />
Tasks
Walkthrough: Creating ColumnSet layout in WebGrid
How-to: Display a ColumnSet layout hierarchically
How-to: Create ColumnSet layout programmatically
How-to: Create ColumnSet layout when IList object is bound to WebGrid
Concepts
ColumnSets Layout
References
ColumnSetSettings Class
WebGridColumnSet Class
Other Resources
Walkthrough Topics
How-to Topics