Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datagrid column properties
Message
From
25/03/2004 10:44:42
Keith Payne
Technical Marketing Solutions
Florida, United States
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00889417
Message ID:
00889619
Views:
43
Matthew,

I'm sorry. I was thinking of the DataGrid Web Control.

>Keith,
>
>Thank you for the reply, but I can not find the Columns collection? I have stepped through the code in debug and when looking at the grdTest object, I can not find a property for Columns. I set a break point immediately after the SetDataBinding. Please let me know if I am missing something.
>
>Kind Regards,
>
>Mat
>
>>The columns of the grid can be accessed through the DataGrid.Columns collection. DataGrid.Columns.Count will give you the number of columns, and you can access each column with DataGrid.Columns(i), where
0 <= i < DataGrid.Columns.Count
>>>I have a form with a grid and some simple data binding like this:
>>>
>>>this.grdTest.SetDataBinding(myData, null);
>>>
>>>The form displays myData in the grid, but I have not set a TableStyle or ColumnStyle Collection, so the grid just displays all the data, which is what I want.
>>>
>>>The question is, the number of columns in this grid will vary based upon different calculations. So can I access the column properties at run time?
>>>
>>>I would like to set Alignment and Width, but I don't know how. Any help is greatly appreciated.
>>>
>>>Kind Regards,
>>>
>>>Mat
Previous
Reply
Map
View

Click here to load this message in the networking platform