Split datagrid into newspaper-style columns?

G

Guest

Is there a way to divide a datagrid into "newspaper" style columns so that
column 1 would have rows 1-10, column two would have rows 11-20 etc?

Thanks, Dave.
 
G

Guest

Hi Dave,

Yes, it's possible. One way is to build a new datatable and manually refill
data to the datatable according to your structure. Then binding the datatable
with datagrid.

HTH

Elton Wang
 
G

Guest

Thanks, I'll look into that. I also found this sample of the DataList.

http://www.asp.net/QuickStart/aspnet/samples/ctrlref/data/DataList/DataList1_vb.aspx.

The only issue is that I'll need a white space between the columns and I
want the cells high lighted as:

silver silver silver
white white white
etc.

In the example if you pick 3 column vertical table it comes out.

white white silver
silver silver white

I can't figure out how to use the AlternatingStyles to make it look the way
I want.

Dave.
 
G

Guest

Hi Dave,

Try to fit your total record as 6 x number, e.g. 6, 12, 18, ... to see what
happens. So you can understand AlternatingStyles how to affect it.


HTH

Elton
 
G

Guest

Thanks, but I guess I'm not following.

Elton W said:
Hi Dave,

Try to fit your total record as 6 x number, e.g. 6, 12, 18, ... to see what
happens. So you can understand AlternatingStyles how to affect it.


HTH

Elton
 
G

Guest

I mean only if the total records fit special number, it can be shown in your
pattern.

For example, there are six records. It shows

1 (W) 3 (W) 5 (W)
2 (S) 4 (S) 6 (S)

But if its 7 records, it shows

1 (W) 4 (S) 6 (S)
2 (S) 5 (W) 7 (W)
3 (W)

if 8 records

1 (W) 4 (S) 7 (W)
2 (S) 5 (W) 8 (S)
3 (W) 6 (S)

Hence, its very hard to use AlternatingItemStyle to give a wanted pattern.

HTH

Elton
 

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

Top