How to show array values as columns in a datagrid

M

mavrick_101

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.
 
R

Rajeev Gopal

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top