GridView

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top