This is a migrated thread and some comments may be shown as answers.

Data type for each Gridview column

4 Answers 930 Views
GridView
This is a migrated thread and some comments may be shown as answers.
firoz
Top achievements
Rank 1
firoz asked on 21 Jun 2009, 08:33 AM
Hi experts,

I am using the gridview for windows forms version Q1-2009, 
I am developing a vb2008 application which uses the rad grid view in unbound mode, my problem is , is it possible to assign datatype to each column. I mean column 1 as string, 2 as integer like that. If anyone knows the answer kindly replay me.
Thanks in advance

4 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 22 Jun 2009, 09:29 AM
Hi Firoz,

Yes, this is possible. You should create columns of the corresponding type:

  • For string column use the GridViewTextBoxColumn
  • For integer column use the GridViewDecimalColumn
  • For date time use the GridViewDateTimeColumn
  • For boolean data use the GridViewCheckBoxColumn

If you need further assistance, please write us back.

Kind regards,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
hipero
Top achievements
Rank 1
answered on 20 Oct 2009, 02:43 PM
Hi,

Is there a way to automatycy bind something from database to MultiColumnComboBox, as a column in my DataGrid?

Best regards,
Adam Mach
0
Jack
Telerik team
answered on 21 Oct 2009, 11:22 AM
Hi hipero,

You should set the DataSource, DisplayMember, and ValueMember properties to bind a multi-column combo box. Here is sample:

GridViewMultiComboBoxColumn column = new GridViewMultiComboBoxColumn("Items");
column.DataSource = tableItems;
column.ValueMember = "ID";
column.DisplayMember = "Name";
column.DataType = typeof(int);
this.radGridView1.Columns.Add(column);

I hope it helps.

Greetings,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
hipero
Top achievements
Rank 1
answered on 21 Oct 2009, 12:26 PM
Great code sample!
Thank you very much for answering!
Tags
GridView
Asked by
firoz
Top achievements
Rank 1
Answers by
Jack
Telerik team
hipero
Top achievements
Rank 1
Share this question
or