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.
I have a grid Control, I would like to dynamically add rows(on a event) in a grid, in which two of the columns contain comboboxes, If i change the selection of one combobox, I would like to dynamically bind the other combobox (based on the selection). Could you please show hw this possible in the Syncfusion grid and give some pointers towards the same.
HAhaneefm Syncfusion Team May 15, 2007 04:04 PM UTC
Hi Rahul,
If you wan to change the datasource for the specific cell based on some condition then handle the CurrentCellShowingDropDown event to place your new datatable directly into the GridComboBoxCellRenderer.ListBoxPart. This will affect the dropped cell datasource. Please refer to the attached sample for implementation and let me know if this helps.
Thanks a lot for your help, However I am a newbie to Syncfusion grid and would also like to know hw do I add a new row in DGBG?
HAhaneefm Syncfusion Team May 17, 2007 05:36 PM UTC
Hi Rahul,
Thank you for your update.
Issue 1: showing AddNewRow..
If you want to to show the extra row( Addnew row ) in a grid, you can set the EnableAddNew property to True.
this.gridDataBoundGrid1.EnableAddNew = false;
Issue 2: adding a new row.
To add or remove rows in a grid, you just do it by working with the underlying datasource. The grid should automatically reflect the changes. Here is a code snippet that show this.
this.gridDataBoundGrid1.BeginUpdate(); DataTable dt = this.gridDataBoundGrid1.DataSourec as DataTable. DataRow dr = dt.NewRow(); dr[0] = "NewRow"; dt.Rows.Add(dr); this.gridDataBoundGrid1.EndUpdate();