I am using WPF Telerik dataform & Grid, I have set the auto generate columns to false for the dataform where as I set it true for the grid.
DataFormCombobox loses its selected item when I enter edit mode in the data form. Please some one help.
Regards,
Kannan M.
I got an answer myself, It looks like it happens only when I use DataFormCombobox, When I change it to DataFormDataField inside which I kept the RadCombobox, and set the same binding which had no such issue.It's a workaround but I could not se any other option.
Related
How to validate a combobox in silverlight 5 (I am preparing a report in silverlight5 with MVVM pattern and on search button, if the checkbox is checked, the user has to select an item from the combobox..)
Also, i am using the below to set the default content text as "Select One"...is there any other better way to do it. The problem using below link is ..if i select an item from the combobox and then later i decide to keep it blank..i have no way of doing it but reload the webpage..
Silverlight: Default value in Combobox
Any help would be much appreciated..please I need it urgently
Thanks in advance!!
I am working on WPF datagrid control. Binding the data from code behind using a dataset/XML. I want to edit the cell of the grid and capture the new value which the user has entered. Is there a code sample to show how to do that?
What event should I use and which property of datagrid (if any) should I use, selecteditem or selectedcell?
(I am kind of new to WPF datagrid control, so I apologize if this is kind of kiddish...)
You can use CellEditEnding and RowEditEnding. You can access the respective row and its Item from the event arguments.
I am implementing in WPF. With the normal WPF ComboBox you can only click on an item to select it from the menu that rolls down. I need a control where if the preferred item isn't in the ComboBox you can type this new, not existing, item into the ComboBox?
How do I do this and with what control?
Thanks
As morgan said, you can use IsEditable="true" for the combo box or else there is another control available in WPF tool kit "AutoCompleteBox".
Here are couple of links which helps you in implementing "AutoCompleteBox"
http://iserialized.com/using-the-autocompletebox-in-the-wpf-toolkit/
http://www.c-sharpcorner.com/UploadFile/dpatra/537/
I got the same... http://msdn.microsoft.com/en-us/library/ms753382%28v=vs.85%29.aspx
Just go to property of that combo box control and make the "DropDownStyle" as "DropDown".
I have a WPF DataGrid that shows some data records (bounded to an ObservableCollection).
When the user clicks "Edit" button, the currend selected row should move into edit-mode (As if the user double-clicked this row).
How do I do that?
Assuming WPF:
<DataGrid x:Name="dg".... />
Then this code will work:
dg.CurrentCell = new DataGridCellInfo(dg.Items[i], dg.Columns[j]);
dg.BeginEdit();
Here is the documentation of the WPF DataGrid on MSDN. The BeginEdit method seems to be what you are looking for.
PS: I don't know if this is suitable for your application, but many DataGrid users find Single-Click Editing useful.
I am developing a Watermarked ComboBox by modifying the ComboBox ControlTemplate. Everything is fine when the ComboBox is not in an editable mode, but when I change the edit mode to True, the IsFocused property is never set to True. This is because in edit mode, the ComboBox is using a TextBox. This is an exact copy of this StackOverflow question: . There are no responses to that question.
Please drop a line if you know how to solve this, or please point me to links that provide a Watermark ComboBox implementation.
Thanks,
Rey.
You could try to use the IsKeyboardFocused or IsKeyboardFocusWithin instead
Try using the IsFocused or IsKeyboardFocused or IsKeyboardFocusWithin properties of the TextBox control which is within the ComboBox control. The TextBox can be found at e.OriginalSource(TextChangedEventArgs property).
It worked for me.