Okay, here is what I want in my data grid:
Col1 Col2 Col3 |Col1 Col2 Col3
rec1 data data |rec4 data data
rec2 data data |rec6 data data
rec3 data data |rec7 data data
hmmm...never done that before, but if you get a dataset that has two datatables in it, and you specify the first three columns to bind to fields in datatable1 and the last three columns to bind to fields in datatable2, maybe that would work?
Or, do they *have* to be in the same datagrid? You could just have two datagrids.
It's data from one table. I could do something like that, hmmm... I'd have to load the first half of the table into one datatable and the second half into the other.
well, you could (just grabbing this out of the air) add a second datagrid, and if the records are greater than a certain number have your code make it visible and bind it to the remaining items in your dataset/datatable.
Does it have to be in a datagrid? Is it possible to do it in a different sort of interface (i.e. dynamically generated table where the rows and columns are created programmatically?
K, so here's the latest. I have a Stored Procedure (ah hah! He can be taught!) that returns all my items. I then want to have half go to one datagrid, and half to another. Can I do this with a view? Or should I have 2 stored procedures. (To make this easy, I will always use the 2 datagrids.)
So it'll be.
1 5
2 6
3 7
4 8
K, here's what I got, and it seems to work. I added a field called Sequence. It's a number field, so I can get the count of records and divide by 2 (with some rounding and adding one to the result)
So then I do 2 views.
Sequence < math.ceiling(recs/2) + 1
Sequence > math.ceiling(recs/2)
It'll be tricky. The stored procedure is grouping the results... so the table looks like this:
GroupID, Sequence, Package, Code
1, 1, 1, X800
1, 1, 1, X802
1, 2, 2, X803
1, 2, 2, X800
1, 3, A, X801
1, 4, B, X800
Sorry, that last listing is the original table. The stored procedure groups by package. (I don't need the code in these results so I drop that field. I query by Program)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.