DataGridView editing problem

  • Thread starter Thread starter B. Chernick
  • Start date Start date
B

B. Chernick

I've been away from web programming for a while and I have a situation that's
new to me. I'm using VB/Dot Net 2.0.

I've created an xsd (dataset) in the project and dragged some fields from a
table into it. This query is intended as readonly. I've already
successfully bound a datagridview to the query using an Object Data Source.
The query result can easily return several hundred records so paging is
enabled.

As I said, the query itself is intended as readonly. I want to display the
grid results with some additional fields for later use. For starters I want
each column to have a 'select' checkbox (actually there'll be several later)
and I want the check box to retain it's value as the user pages through the
grid.

What I've done so far is to create a dummy field in the query itself:
Select <some fields>, 0 as Issue. I then set the 'Issue' column to
ReadOnly=False, Data Type = boolean and default value = False.

I then created a template column in the DataGridView and put a checkbox
control in the ItemTemplate, and bound it to the 'Issue' column'.

So my problem is this: The check box column displays ok but it will not
retain it's value as I page through the dataset. (i.e. Check a box in page
1, page to page 2, select page 1 again, and the check's gone)

What am I doing wrong? (And should I be using some other technique?)
 
Sorry. Ignore previous post. Just the usual confusion when suddenly
shifting gears from WinForms to WebForms. Obviously just a matter of
sticking some stuff in Session.
 
Back
Top