DataGrid, DataSets and Listboxes

G

Guest

Hi,
I have a problem.
I have a datagrid, a dataset and a listbox. I can format the DataGrid and
populate it with a DataSet. I would now like to do one of two things.
Either

1. Click on an entry within the dataset and have it reproduced in a
multicolumn listbox. The entry would then change color

or

2. Have checkboxes, not in the dataset but in the datagrid which can be
checked and then transferred all together into the multicolumn listbox.

I want to duplicate the information rather than move it as I want the
original dataset to remain constant.

I have tried all sorts of methods, CurrentCell, HitTestInfo for example, and
have tried using checkboxes that were embedded in the dataset, but I can't
get anything to work. The closest that I've got is having a cell address
produced in the listbox.

Can anyone help?

Many thanks,

James
 
S

Sijin Joseph

You could use CurrencyManager.CurrentChanged or PositionChanged events
to get the currently selected DataRowView from the DataSet and then
maybe use a temp dataset where the selected rows in the dataset get
added and bind this temporary dataset to the listbox.

Can you post some code showing where you are facing problems, i'll be
glad to help you out.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
 

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

Top