M
Mike Andrews
Guys,
I've got a problem with a ASP.NET 1.1 Datagrid that I wanted to see if any
of you had any suggestions or advice on how to correct. My original problem
with the datagrid was that I had 4 pre-defined columns. However, due to a
feature restriction I needed to make the first column invisible. This had
the undesired side effect of making the right-most border of the datagrid
disappear. However, when I deleted the column (in code) then the right-most
border displayed correctly. However, using the radio-button list control
(that I had on the page), and changing the selected item from one option to
another, the grid magically got the deleted row back even though in code I
could test and the grid only returned back three columns, not four, yet four
appear.
So, what I thought I'd do was create the columns dynamically at runtime that
way there could be no ambiguity as to how many columns there should be.
Template columns are much more difficult to produce at runtime. It turns out
you need to create a class that implements the Itemplate interface. I did
all that and stored my image button control in it and it works. Except that
when you click the button, the datagrid's ItemCommand event will not fire
and the grid disappears off of the screen. This is unacceptable.
I was wondering if any of you have ever done anything like this before or
have had this happen to you and if you know how I might overcome it.
Thanks,
Mike
I've got a problem with a ASP.NET 1.1 Datagrid that I wanted to see if any
of you had any suggestions or advice on how to correct. My original problem
with the datagrid was that I had 4 pre-defined columns. However, due to a
feature restriction I needed to make the first column invisible. This had
the undesired side effect of making the right-most border of the datagrid
disappear. However, when I deleted the column (in code) then the right-most
border displayed correctly. However, using the radio-button list control
(that I had on the page), and changing the selected item from one option to
another, the grid magically got the deleted row back even though in code I
could test and the grid only returned back three columns, not four, yet four
appear.
So, what I thought I'd do was create the columns dynamically at runtime that
way there could be no ambiguity as to how many columns there should be.
Template columns are much more difficult to produce at runtime. It turns out
you need to create a class that implements the Itemplate interface. I did
all that and stored my image button control in it and it works. Except that
when you click the button, the datagrid's ItemCommand event will not fire
and the grid disappears off of the screen. This is unacceptable.
I was wondering if any of you have ever done anything like this before or
have had this happen to you and if you know how I might overcome it.
Thanks,
Mike