- Oct 30, 2000
- 14,665
- 440
- 126
okay I have a SQL database at a remote IP. I connect, grab a dataset out of it, take my gridview and set the datasource to the dataset and bind.
Then I can sort by turning on the sort attribute and the onsorting event handler.
All peachy so far. Now, I'm trying to add a up and down arrow icon to the header cells of each column in the gridview and no dice.
Why? Despite my gridview displaying a full table with columns and rows, when I look at the column count of my gridview I get ZERO. My dataset shows 9 columns, my gridview displays 7 of those, since 2 columns contain binary image data which I'm still working on displaying, but the actual count it shows is zero. So, when I try to get the onrowcreate event, to find my column headers when I do a sort so I can attach an image url to them, I can't.
Since this is a DB that can constantly change, I can't just set my gridview control with a predefined set of unbound columns. Not going to work. Any clues why gridview is showing zero columns? It does do my row count for data only rows just fine though.
Then I can sort by turning on the sort attribute and the onsorting event handler.
All peachy so far. Now, I'm trying to add a up and down arrow icon to the header cells of each column in the gridview and no dice.
Why? Despite my gridview displaying a full table with columns and rows, when I look at the column count of my gridview I get ZERO. My dataset shows 9 columns, my gridview displays 7 of those, since 2 columns contain binary image data which I'm still working on displaying, but the actual count it shows is zero. So, when I try to get the onrowcreate event, to find my column headers when I do a sort so I can attach an image url to them, I can't.
Since this is a DB that can constantly change, I can't just set my gridview control with a predefined set of unbound columns. Not going to work. Any clues why gridview is showing zero columns? It does do my row count for data only rows just fine though.