Main Menu
Knowledge Base
Product Registration
Log an Incident
Request a Feature
Search Incidents/Bug Reports


Search KB

Please note: In an effort to better serve you, we are in the process of restructuring DevCenter. In the process, we have moved many items that you may be used to finding in DevCenter over to the Main Site. If you are having trouble locating something, please try looking at the following places:

Knowledge Base Article: KB01093

HOWTO:Change cell data type to Button, Combo Box, etc.


The information in this article applies to:
UltraWebGrid (v1.0.6007)
  Article Created: 
6/10/2002

Last Updated:
11/18/2002

Article Type
How To
  
Page Options
Average Rating:
3 out of 10

Rate this page
Print this page
E-mail this page
Add to Favorites

Summary

Each column in the grid has a Type property which can be set to enable the cells in a column to perform differently.
To make a column appear and function like a button, set the Type of the Column to the Button style.

Additional Information

UltraWebGrid1.DisplayLayout.Bands(0).Columns(0).Type = Infragistics.WebUI.UltraWebGrid.ColumnType.Button

To respond to a click on a button in a cell, use the ClickCellButton event.

To make a column appear and function like a checkbox, set the Style of the Column to CheckBox. (A cell in this column will appear checked if the value of the cell is boolean true, "true", or a non-zero number. A cell in this column will appear unchecked if the value of the cell is boolean false, "false", or a zero).

UltraWebGrid1.DisplayLayout.Bands(0).Columns(0).Type = Infragistics.WebUI.UltraWebGrid.ColumnType.CheckBox

If the column is unbound, be sure to set the DataType property.

UltraWebGrid1.DisplayLayout.Bands(0).Columns.Add("Unbound")
UltraWebGrid1.DisplayLayout.Bands(0).Columns("Unbound").DataType = System.Type.GetType("Boolean")
UltraWebGrid1.DisplayLayout.Bands(0).Columns(0).Type = Infragistics.WebUI.UltraWebGrid.ColumnType.CheckBox

You can also make a Column act as a Selection box

UltraWebGrid1.DisplayLayout.Bands(0).Columns(0).Type = Infragistics.WebUI.UltraWebGrid.ColumnType.DropDown

When using this style, you must create a ValueList and attach it to the column.


How would you rate the quality of this content?
Poor -----------------------------------------> Outstanding

Tell us why you rated the content this way. (optional)