Make the whole DataGrid row editable in SelectionChanged event - silverlight-4.0

I have a DataGrid which is bound to some data. I have implemented the SelectionChanged event. Now my problem is that I have to make the whole row editable on the selection changed. Any help???

Related

Titanium editing textField in a listView

I have a listView that has a textField in the item template. To make sure that the listView saves the data I have used the code from this link it works in that it saves the data to the listView item but it looses focus every time the onChange event fires the updateItemAt method so the keyboard disappears after every key press.
I have tried onBlur but I then get the original text flashing up before it is replaced with the new text from the blur event.
Is there a way to stop loosing focus when the updateItemAt listView method is fired?
No, there is not, because by updateItemAt you are re-rendering that row.
Also, its not a best practice to store data in proxy objects. Better store the data in the data collection that drives your listview or a separate object/array.

DataBound ComboBox not changing when an item is selected

I have a DataBound ComboBox and everything on it works great. But when I select an item in the list, the SelectedValue changes correctly but the text that gets displayed stays on the first item.
There is no code behind this, I added the DataBinding in the form builder.
It was a dumb mistake.
I had the SelectedValue set in the DataBinding Menu.

Silverlight Usercontrol in Datagrid does not fire the CellEditEnded event

I have a UserControl that is displaying in a DataGrid. It contains a DatePicker and a Button that opens a Popup control where the user makes a selection that once selected populates a textblock with the result. The DatePicker is the only object that if changed will set off the CellEditEnded event. How can I get the popup controls selectionChanged event to tell the Datagrid that the cell has done as edit?
Turns out I was putting the UserControl inside the CellTemplate when I needed to put something else in that for display and my UC in the CellEditingTemplate. Now it fires as it should. I missed something simple and I should not have. Hope this helps someone else.

How do you keep a listview row highlighted after its activated?

I have an application I'm working on that uses listviews. When you select a row from the list view it becomes highlighted, however when I double click on it to activate the listview item it is no longer highlighted. How would I get the listview item to stay highlighted upon activation, is this possible? Thanks.
It sounds like you are somehow losing focus from the control. If that logic is correct, then you can set the listview's .HideSelection = False property to retain the visual selection when the control loses focus.

how to disable the default selection in listview when you navigate to it

I have two list views in a scene (listview1 and listview2, contents of listview2 depends on the selecteditem on listview1) and when I navigate to the scene I want the first item in listview1 to be selected and the details be displayed in the other listview (listview2) but I do not want any item in the listView2 selected by default.
What i am observing is that the first item in listView2 is also selected and that is causing selectionchanged event to be triggered for listview2 (which I want to be triggered only if the user explicitly selects it)
No need for workarounds.
Just set IsSynchronizedWithCurrentItem="False" in your ListView.
This also works for GridViews.
selectionchanged events will be triggered and cannot be stopped. But it can be bypassed (using a flag) in the code behind.
If ListView is bound to CollectionViewSource, CollectionViewSource sets the first items as selected.
If ListView is bound to regular Collection, no items will be selected automatically.
This is because you set the event handler of list view 1 & 2 by XAML, maybe.
If you set the data source and selected item first, then,
set the event handler by your code behind, it works well, I think.