URGENT: Checkbox field in GridView ???

C

Chris

Hello.

I develop an application in which I show records in a gridView.
Then I'd like to select multiple records after which I click on a
button and want to pass the list of selected records to an object.

But I don't manage to select multiple records in the gridview !!!

I tried by adding a checkboxfield but, apart from the column header,
the actual checkbox for each record doesn't appear in the grid. Nor
does anything happen when I click in that column

So how?
Apart from the checkboxfield, is there another way to select multiple
records?

thank you

Chris
 
G

Gregory A. Beamer

Chris said:
Hello.

I develop an application in which I show records in a gridView.
Then I'd like to select multiple records after which I click on a
button and want to pass the list of selected records to an object.

But I don't manage to select multiple records in the gridview !!!

I tried by adding a checkboxfield but, apart from the column header,
the actual checkbox for each record doesn't appear in the grid. Nor
does anything happen when I click in that column

So how?
Apart from the checkboxfield, is there another way to select multiple
records?

Do you really want me to answer the question? Or do you want a solution to
the fact your checkboxes are not showing up? Because the answer to your
question is "No, you are screwed". But I don't really think you are asking
that. I think you have just gone down the solution route and want to solve
the way you are trying to solve the problem. Don't worry, this is normal and
how the human mind works. It is called chasing after sunk cost.

But, the answer to your problem is easy. Use templates. In Visual Studio, or
Expression, you can set up a templated column and bind it. If you want to
use the automagic stuff, add this field to your data (probably a DataSet?)
and set it to false. Then, the Grid will automagically add the info. You can
then set it to be a checkbox, if you wish.

Realistically, you should almost always use templates, as it gives you, not
the .NET drag and drop stuff, control of your UI. To do this, right click on
the Grid and edit columns.

--
Peace and Grace,
Greg

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

************************************************
| Think outside the box! |
************************************************
 

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,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top