The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi, I''m trying to update a field on my form when a the value of a ComboBox in my virtual grid is changed.
I couldn''t find any event analogous to SelectionChangeCommitted and the CurrentCellCloseDropDown event isn''t 100% reliable for this as some of my users type their value rather than use the mouse to select it from the drop down.
How can I go about either capturing when the value is changed prior to the cell being exited or better yet, cause a change of the selected value to be saved immediately (performance shouldn''t be an issue, the list is 4 items).
private void ListBoxPart_SelectedValueChanged(object sender, EventArgs e) { ListBox list = sender as ListBox; DataRowView row = list.SelectedItem as DataRowView; if( row != null) { Console.WriteLine(row[1]); } }
Best Regards, Haneef
RIRichAugust 14, 2006 01:33 PM UTC
Thanks Haneef,
Exactly what I needed. Now, how would I force a commit of the selected value at that point? And do you see any problem with that approach?
Thanks, Rich
ps - since I''m asking -
I have some columns for displaying currency. Some are editable, some are not. The users want decimal places to 5 places but they only want to see the significant places beyond 2 places.
For example, 2 should show as 2.00 2.5 should show as 2.50 2.55 should show as 2.55 2.551 should show as 2.551 2.55100 should show as 2.551
How can I achieve this?
ADAdministrator Syncfusion Team August 16, 2006 06:05 AM UTC
Hi Rich,
Issue 1: To commit the current cell change in a grid, you need to call the CurrentCell.EndEdit and Binder.EndEdit method in ListBoxPart''s SelectedValueChanged event.
Issue 2: The DrawCellDisplayText event can be handled and there the cell value can be parsed and the resultant simple string can be set to the e.DisplayText. Please refer the attached sample for more details.
Here is a Sample. http://www.syncfusion.com/Support/user/uploads/FormattedText_f9b86fa0.zip
Let me know if this helps. Best Regards, Haneef
ADAdministrator Syncfusion Team August 16, 2006 12:22 PM UTC
Thanks Haneef, I had settled on CurrentCell.ConfirmChanges() but I will switch to using CurrentCell.EndEdit().