DataGridView editing problem

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?)
 
B

B. Chernick

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.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top