Problem with datagrid

AishwaWruf

New Member
I have created a datagrid and assigning a 2D array to it.But it gives an error that "Array was not one dimensional"<BR> Can't we assign a 2D array to the datasource of a datagrid.<BR>The code is<BR><html><BR><head><BR><script language="VB" runat="Server"><BR>sub page_load<BR>dim arr(1,1) as String<BR>arr(0,0)="desc1"<BR>arr(0,1)="desc2"<BR>arr(1,0)="desc3"<BR>arr(1,1)="desc4"<BR>mydatagrid.datasource=arr<BR>mydatagrid.databind()<BR><BR>end sub<BR></script><BR></head><BR><body><BR><asp:datagrid id="Mydatagrid1" runat="server"><BR></asp:datagrid><BR><BR></body><BR></html>
 
Back
Top