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.
ADAdministrator Syncfusion Team March 2, 2007 11:14 PM UTC
Hi,
This is a default behavior. But one way you can do this by handling the CurrentRecordContextChanging event of the grid and set e.Cancel to true when the record is AddNewRecord.
private void gridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e) { if( e.Action == Syncfusion.Grouping.CurrentRecordAction.EndEditCalled ) { GridAddNewRecord record = e.Record as GridAddNewRecord ; if( record != null ) e.Cancel = true; } }
Best regards, Haneef
ADAdministrator Syncfusion Team March 2, 2007 11:52 PM UTC
Thanks, that appears to work, however, my settings from QueryCellStyleInfo don't stay once I hit enter: I have a default value and a values from in-cell combo box:
if (e.TableCellIdentity.Column.MappingName == "Col2") { e.Style.CellType = "ComboBox"; ArrayList typeList = new ArrayList(2); typeList.Add("val1"); typeList.Add("val2"); typeList.Add("val3"); e.Style.DataSource = typeList;
Do you know why this happens? The '0' disappears, and the combo does not activate unless I double click it - but then the data I entered up to that point disappears
Any clues?
>Hi,
This is a default behavior. But one way you can do this by handling the CurrentRecordContextChanging event of the grid and set e.Cancel to true when the record is AddNewRecord.
private void gridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e) { if( e.Action == Syncfusion.Grouping.CurrentRecordAction.EndEditCalled ) { GridAddNewRecord record = e.Record as GridAddNewRecord ; if( record != null ) e.Cancel = true; } }