views:

299

answers:

1

Hi everybody,

I have a question I came up with 3 days ago about how to do the blue underlining of a datagrid row programmatically. I thought to have found the solution, with just adding the column and row Indexes to the datagrids editedItemPosition Property.

It turned out, that this is just practical if you want to be able to edit the grids row right away. But what if I just want to underline it with the blue color?

Additionally how to detect that a list based Item got this kind of selection? es there a event to detect that? whats the name of this kind of selection?

Thanks for any Hints, Markus

A: 

You can set datagrid.selectedIndex or datagrid.selectedItem to select a specific entry in the datagrid. The row will get highlighted (blue by default).

The dataGrid dispatches a change event in that case afair. And of course you can retrieve the selected item with datagrid.selectedItem.

Thomas