Template Columns in a DataGrid
-
Hi! I have a datagrid with two template columns. And I have 2 Arraylists. Can anybody please show me how to bind my 2 arraylists to their corresponding column? Please help me. :( NAME | ADDRESS A | AA B | BB C | CC D | DD Above is what I want it to look like. I A,B,C,D comes from the first arraylist and AA,BB,CC,DD comes from the second arraylist. Column NAME and column ADDRESS are template columns. Please help me. :( "To teach is to learn twice"
-
Hi! I have a datagrid with two template columns. And I have 2 Arraylists. Can anybody please show me how to bind my 2 arraylists to their corresponding column? Please help me. :( NAME | ADDRESS A | AA B | BB C | CC D | DD Above is what I want it to look like. I A,B,C,D comes from the first arraylist and AA,BB,CC,DD comes from the second arraylist. Column NAME and column ADDRESS are template columns. Please help me. :( "To teach is to learn twice"
You'll have to manually convert the ArrayLists into a DataTable with two columns and however many rows you need, copying over the data from each array into the DataTable. Then use dg.DataSource=yourDataTable; and dg.DataBind() where "dg" is your DataGrid. I don't think it matters much if the columns are templates or not. Marc Latest AAL Article My blog Join my forum!