This is most probably a stupid question but yeah. How do I change the CheckState column that the CheckEditor is bound to programatically?
Basically, I have a dropdown that would determine what the CheckState bound column should be. The datasource etc all stays the same for the CheckEditor, it's only the CheckState that changes.
Hello Logan,
Glad to know that you were able to solved the issue.
Nevermind me! I found my issue. I honestly feel like an idiot sometimes. Really something majorly stupid. It retrieves and saves as it should.
Thanks a million guys! I have to honestly say that I haven't found even the basic support from any other provider like yourself and I totally felt like a kid in a candy store yesterday when I by figured out how to use the EditorButtons on the textboxes!
Thanks for being awesome!
Hi Divya,
Thanks for the quick reply. You were half way there. It's the databinding that I needed for for the CheckEditor. I think I might have figured it out. I'm quite new to c# and Winforms so it's a bit of a learning curve.
For the CheckEditor I assume I need to use something like this. I coded it with an if statement.
It seems to work with retrieving the checked state of the CheckEditor but not saving it if it has been checked or unchecked by the end user. I don't know if I'm missing something here. Obviously I use the following code before this to clear any previous databinding.
if (ultraComboEditor1.Value == "Quote") { ultraCheckEditor1.DataBindings.Clear(); ultraCheckEditor1.DataBindings.Add(new Binding("Checked", DataSet.Table, "TableColumn")); }
As per your requirement I set up a sample of UltraCheckEditor and UltraCombo, and on UltraCombo selection change I am change the CheckState of the checkEditor, and its all working fine.
Attached a sample application for the reference.
If this sample is not the correct demonstration of what you are tring to do , feel free to update it and send it back for further investigation.
Regards,
CheckEditorCheckState.zip
The CheckEditor is not in a UltraGrid. It is used standalone. I have a UltraCombo on a Winform that is bound. When the selection of that UltraCombo changes, the CheckState binding needs to change based on that selection.
As an example:
If I select Invoice from the Combo, which has index of say 1, then I need the CheckState binding to change to bindingsource.table.fieldxx
If I select Quote from the Combo, which has index of say 2, then I need the CheckState binding to change to bindingsource.table.fieldyy
The CheckEditor state is determined by the TYPE of document selected in the combo. Obviously, if the end user changes the CheckEditor selection from unchecked to check I need to save that as well in that particular field as well.