S
shapper
Hello,
I created a GridView which DataSource is created a DataView created in
a function.
The DataView is created from a DataTable which is saved on a Session
Variable.
The DataView has 3 bound fields:
Name, Description and Visible
And 1 Button Field:
Remove
The DataView is created as follows:
dv = New DataView(dt, "Visible = True", "Name",
DataViewRowState.CurrentRows)
When I click a button on a row I define the Visible Field as False on
RowCommand event:
dt.Rows.Item(e.CommandArgument)("Visible") = False
dt.DataBind
I am able to change the Visible field a first time but after that I am
not able to do that anymore.
When I click a button I see that the index is right in the list that I
see in the GridView.
However, for that index I get the data not of the row that I am
looking but of the original row on that position before I click the
button and make one of the rows Visible to false.
I have not been able to figure what might be going on.
Could someone give me a tip where to look for?
I looked everywhere and I can't find the solution.
Thanks,
Miguel
I created a GridView which DataSource is created a DataView created in
a function.
The DataView is created from a DataTable which is saved on a Session
Variable.
The DataView has 3 bound fields:
Name, Description and Visible
And 1 Button Field:
Remove
The DataView is created as follows:
dv = New DataView(dt, "Visible = True", "Name",
DataViewRowState.CurrentRows)
When I click a button on a row I define the Visible Field as False on
RowCommand event:
dt.Rows.Item(e.CommandArgument)("Visible") = False
dt.DataBind
I am able to change the Visible field a first time but after that I am
not able to do that anymore.
When I click a button I see that the index is right in the list that I
see in the GridView.
However, for that index I get the data not of the row that I am
looking but of the original row on that position before I click the
button and make one of the rows Visible to false.
I have not been able to figure what might be going on.
Could someone give me a tip where to look for?
I looked everywhere and I can't find the solution.
Thanks,
Miguel