|
-
March 30th, 2004, 12:45 PM
#1
Adding Columns using ArrayList and BoundColumn
Hi,
How to add new columns using an ArrayList without creating a class ?
Notice: bc.DataField="!" works when AutoGenerateColumns is off. Otherwise nothing is displayed.
ArrayList a=new ArrayList();
a.Add("hello world");
DataGrid1.DataSource=a;
BoundColumn bc=new BoundColumn();
bc.DataField="!";
DataGrid1.Columns.Add(bc);
DataGrid1.DataBind();
Yours sincerely
Andla
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|