BoldSign®Effortlessly integrate e-signatures into your app with the BoldSign® API. Create a sandbox account!
how to add dropdown to child grid asp.net core - Hierarchy grid
@{
var ReldblData = new Syncfusion.EJ2.DataManager
{
Url = Url.Action("DdlUrlDatasource", "Home"),
Adaptor = "UrlAdaptor"
};
}
@{
var ChildGrid = new Syncfusion.EJ2.Grids.Grid()
{
DataSource = dblData,
QueryString = "EmployeeID",
Load = "load",
Columns = new List<Syncfusion.EJ2.Grids.GridColumn> {
new Syncfusion.EJ2.Grids.GridColumn(){ Field="DepID", HeaderText="Dep ID", Width="120" },
new Syncfusion.EJ2.Grids.GridColumn(){ Field="HisRelationID", HeaderText="His Relation", Width="100" },
new Syncfusion.EJ2.Grids.GridColumn(){ Field="EnDependName", HeaderText="En Depend Name", Width="150" }
},
};
}
Attachment: CoreSqlDataGrid_9293136c.rar
Hi ADMIRAL PH,
Before proceeding with adding a dropdown to the child grid, we need some clarification on the requirements:
Please provide these details so we can suggest the best approach for implementing the dropdown in your child grid.
Regards,
Pavithra S
Thanks, I would like to clarify as follows:
1) Dropdown visible in the child grid and always editable any time showing a text value, not the ID
2) Editing is Enabled in the child grid
3) Dropdown Data Source: URL Adaptor
4) Field Mapping: " HisRelationID" field yes
with crud datamanger like this
var ReldblData = new Syncfusion.EJ2.DataManager
{
Url = Url.Action("DdlUrlDatasource", "Home"),
Adaptor = "UrlAdaptor",
update url = "somthing"
delete url = "somthing"
};
ADMIRAL PH,
You can render the DropDownList in grid editing by setting the “editType” as “dropdownedit” and customize the DropDownList using the “edit.params” property. Please refer to the below documentation link in which you can render DropDownList component in edit form with custom dataSource.
If you want to make the grid always editable, you can render the DropDownList inside the column template feature.
https://ej2.syncfusion.com/documentation/grid/editing/edit#how-to-make-a-grid-column-always-editable
Please get back to us if you need further assistance on this.