PDA

Click to See Complete Forum and Search --> : Filling the Datagrid


abhijit
Feb 4th, 2005, 04:25 AM
Here is my code to set the columns of the datagrid control.
dtaGrid.AllowAddNew = False
dtaGrid.AllowDelete = False
dtaGrid.AllowUpdate = False
dtaGrid.Columns.Item(0).Width = 200
dtaGrid.Columns.Add(1).Caption = "Case ID"
dtaGrid.Columns.Add(2).Caption = "Case Status"
dtaGrid.Columns.Add(3).Caption = "Case Type"
dtaGrid.Columns.Add(4).Caption = "Case Sub Type"
dtaGrid.Columns.Add(5).Caption = "Branch"


How do I add the rows to this grid control?

Cheers,
Abhijit

dglienna
Feb 6th, 2005, 09:14 PM
I think that you have to link it to a data source. I couldn't find any way to address a single cell when I was trying to change the color of a cell.

abhijit
Feb 6th, 2005, 10:00 PM
David,
Thanks for replying. However if I attach it to a datasource, whats the purpose of having this mechanism to add the column names. I am going through the documentation and haven't found anything yet.

I have another option - to use a flexgrid, but that option is not a wise one. We will be moving to .NET shortly and in that case, the flexgrid doesn't upgrade.

Cheers,
Abhijit