J
Julie Barnet
I would like to be able to either autogenerate my bound columns or
create them at runtime based on parameters passed into the page.
When doing either method, I cannot access any of the fields.
For example:
I have created a delete link button and used the edit/update template
for an additional link button on each row (at design time). Inside
the itemcommand event if I do a mydatagrid.columns.count ->I only get
a value of 2. I should be getting 3.
Also if I try to print:
Response.Write(MyDataGrid.Columns.Item(0).HeaderText) ->Delete
Response.Write(MyDataGrid.Columns.Item(1).HeaderText) ->Edit
Response.Write(MyDataGrid.Columns.Item(2).HeaderText) ->Out of index
error
One last test (itemcommand event):
response.write(e.Item.Cells(2).text) ->Out of index error
This happens when autogenerating columns or if I create the last
column at runtime (I created a databind function, and I create the
column from there each time I want to databind my grid.)
Thanks in advance
Julie Barnet
create them at runtime based on parameters passed into the page.
When doing either method, I cannot access any of the fields.
For example:
I have created a delete link button and used the edit/update template
for an additional link button on each row (at design time). Inside
the itemcommand event if I do a mydatagrid.columns.count ->I only get
a value of 2. I should be getting 3.
Also if I try to print:
Response.Write(MyDataGrid.Columns.Item(0).HeaderText) ->Delete
Response.Write(MyDataGrid.Columns.Item(1).HeaderText) ->Edit
Response.Write(MyDataGrid.Columns.Item(2).HeaderText) ->Out of index
error
One last test (itemcommand event):
response.write(e.Item.Cells(2).text) ->Out of index error
This happens when autogenerating columns or if I create the last
column at runtime (I created a databind function, and I create the
column from there each time I want to databind my grid.)
Thanks in advance
Julie Barnet