Dynamic DataGrid cells

partham

Active member
Joined
Dec 27, 2005
Messages
41
Location
Kolkata, India
Programming Experience
10+
Dear Sir/Madam,

We need creating a datagrid where we may need different type of value in each row. For a start, we have created 3 types of controls
1. Text type - any value
2. Text type - only for numbers
3. Boolean type

We are using the standard controls provided in Microsoft Visual Studio .Net 2003 only having created a new control for the 2nd variety.

The data grid is driven through a datatable which is its data source.

Now, what we want is (say) that every row in the data grid, we will have 2 columns - Field Name and Value. If the data type of the field is numeric, the control in the column field value for this row should be the NumericTextBox. If the data type of field of the row is Boolean, the field value column should display a checkbox. And for the rest, it should display the textbox.

Please provide some guidance as to how this could be achieved. We will be appreciative if a lead a provided and we could try from there on.



Also, please let us know how we can program for one column of a datagrid to contain a dropdownlist.

Thanks in advance.

Regards,
Partha Majumdar.
 
Back
Top