Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to show array values as columns in a datagrid

Reply
Thread Tools

How to show array values as columns in a datagrid

 
 
mavrick_101
Guest
Posts: n/a
 
      06-09-2010
Hi,

Sorry for this stupid question. I'm trying to set up number of columns based
on the values in a string array.

for example I have this array:
string[] tmpArray = commaSeperatedStringValues.split(',');

DataGrid.DataSource=tmpArray;
DataGrid.Bound();

When I do this, all the elements in the array are shown as rows in a signle
column...

Pls help.
 
Reply With Quote
 
 
 
 
Rajeev Gopal
Guest
Posts: n/a
 
      06-10-2010
On Jun 9, 10:34*am, mavrick_101 <(E-Mail Removed)>
wrote:
> Hi,
>
> Sorry for this stupid question. I'm trying to set up number of columns based
> on the values in a string array.
>
> for example I have this array:
> string[] tmpArray = commaSeperatedStringValues.split(',');
>
> DataGrid.DataSource=tmpArray;
> DataGrid.Bound();
>
> When I do this, all the elements in the array are shown as rows in a signle
> column...
>
> Pls help.


Hi Mavrick,

You may want to try with Multi-dimensional arrays instead.

Thanks,
Rajeev
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Can I bind an array to GridView to show hyperlinked columns? ianstirkcv@yahoo.com ASP .Net 2 04-10-2006 11:53 AM
DataGrid edited values problem and autogenerated columns in DataGrid problem John Walsch ASP .Net Web Controls 0 07-09-2004 03:03 PM
Binded Datagrid Formatting columns or hiding columns ton ASP .Net Web Controls 2 02-11-2004 04:09 AM
Columns and Inherited Datagrid...Active Schema does not support columns rob thomson ASP .Net Datagrid Control 0 09-04-2003 03:09 PM



Advertisments