R
Rob Meade
Hi all,
In the past I've typically steered away from DataGrids and have just created
my own tables by programmatically adding rows/cells however yesterday I used
a DataView for the first time. Initially I was quite pleased with the
quickness in getting it to populate with my own collection class and display
results to the page.
There were some oddities...
1. If I get 5 columns and set one of them to have Visible=False (as I want
the value from the data but dont want it displayed) the value comes through
as "", the only way I could get around this was to set Visible = False in my
code after I'd got the value (e.Row.Cells(4) etc etc) as opposed to setting
the same attribute in the source view on the page. A colleague mentions you
used to be able to do this with a DataGrid in .Net 1.1 and you could still
access the value?
2. I was hoping that for each row of data that I had I would be able to
"display" two rows, the first would have a couple of data items, and then
the second row would display one data item which is a "summary" and thus
contains quite a lot of text. I've tried several things but haven't yet
found a way to do this. Only ideas really seem to be to have only ONE cell
displayed and then create my own table inside it, that seems a bit daft as I
might as well just create my own table and save on the code written to the
page. Is there anyway to use some form of template like you can with a
repeater control? The only reason I'm still investigating this is primarily
because I would appreciate the "free" functionality of paging on the
DataView as opposed to having to write my own for my own table code.
Any help/advise would be really appreciated.
Regards
Rob
In the past I've typically steered away from DataGrids and have just created
my own tables by programmatically adding rows/cells however yesterday I used
a DataView for the first time. Initially I was quite pleased with the
quickness in getting it to populate with my own collection class and display
results to the page.
There were some oddities...
1. If I get 5 columns and set one of them to have Visible=False (as I want
the value from the data but dont want it displayed) the value comes through
as "", the only way I could get around this was to set Visible = False in my
code after I'd got the value (e.Row.Cells(4) etc etc) as opposed to setting
the same attribute in the source view on the page. A colleague mentions you
used to be able to do this with a DataGrid in .Net 1.1 and you could still
access the value?
2. I was hoping that for each row of data that I had I would be able to
"display" two rows, the first would have a couple of data items, and then
the second row would display one data item which is a "summary" and thus
contains quite a lot of text. I've tried several things but haven't yet
found a way to do this. Only ideas really seem to be to have only ONE cell
displayed and then create my own table inside it, that seems a bit daft as I
might as well just create my own table and save on the code written to the
page. Is there anyway to use some form of template like you can with a
repeater control? The only reason I'm still investigating this is primarily
because I would appreciate the "free" functionality of paging on the
DataView as opposed to having to write my own for my own table code.
Any help/advise would be really appreciated.
Regards
Rob