drag and drop rows

P

psb

anyone ever tried dragging and dropping rows of a datagrid?? what about
multi-selecting rows without checkboxes like a multiple selectable
dropdownlist; i.e., holding down the cntrol key? I have seen drag and drop
header columns of datagrid, but is there a way to multiselect datagrid
header columns. I think if I can prove to my boss that multiselect header
columns is impossible he won't try to make me explain multi-row drag and
drop. I know it can't be done, but what I am really looking for is a good
explanation why. I just can't talk the talk, I just KNOW that you can't
multi-select rows of a datagrid with cntrl or shift key AND THEN drag them.

thanks for reading this pitiful post.
-psb
 
E

Eliyahu Goldin

I don't know much about dragging and dropping rows, but multi-selecting is
quite a simple task. To select one row by clicking on any cell you need to
add onclick event handler with a reference to the row as parameter. You can
do it on server side in ItemDataBound event, where you get a reference to
the row as a parameter. In client side event handler, once you get a
reference to the row, you can change the row's visual attributes to make it
look selected.

In the client side event handler, in normal case you would want to restore
visual attributes of previously selected row to make it look unselected.
Before doing this, check ctrlKey property of event object to see if Ctrl
button is pressed. If it is, don't restore the previously selected row.

Eliyahu
 

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,013
Latest member
KatriceSwa

Latest Threads

Top