views:

99

answers:

1

Hi, I have a question:

How could I keep the focus on a combobox of a cell inside a datagrid in edit mode; even when I drag a textbox inside a scroll viewer to drag & drop.

This is the behaviour I need: The user start to edit a cell by double clicking, and a combobox is showed, then the user could drag and drop some text (one of the texboxes inside the scroll viewer) to the combobox I mentioned.

The issue is: when I click on one those textboxes to drag & drop, I lose the focus of the datagrid, and I can't drop it to the cell (the combobox), because I lose the edit mode (it's not a combobox anymore, the datagrid is on query mode).

How can I achieve the behaviour I need? Please help.

Thanks.

A: 

I solve my issue in the following way:

Instead of trying not to lose the focus of the cell of the datagrid that is being edited, I added the event of drag & drop to the querying mode of the grid; besides, I also found out that it makes more sense and it's more useful, cause the user won't have to double click the cell first (to enter the edit mode) and then drag the field. Simplifying the UI for the client.

If somebody is interested, I used the drag & drop manager from CodePlex to implement that behaviour on my Silverlight 3.0 app:

Silverlight Drag & Drop Manager

lidermin