Hi Ahmed
Greetings from Syncfusion support
Based on your query, we found that you want to create the custom toolbar button, to show the custom partial view when edit the records in the grid. You can create the custom toolbar button by using the below way,
@{
List<object> toolbarItems = new List<object>();
toolbarItems.Add(new { text = "Expand All", tooltipText = "Expand All", prefixIcon = "e-expand", id = "expandall" });
toolbarItems.Add(new { text = "Collapse All", tooltipText = "Collapse All", prefixIcon = "e-collapse", id = "collapseall", align = "Right" });
}
<ejs-grid id="Grid" dataSource="@ViewBag.datasource" toolbarClick="toolbarClick" toolbar=toolbarItems height="270" allowGrouping="true">
<e-grid-columns>
……………………………………………………………………………………………..
</e-grid-columns>
</ejs-grid> |
On creating partial view to edit the records in the grid, if you want to affect the grid column values with the values of the controller after editing in the grid, we already have the feature called “Dialog Template”. The dialog template editing provides an option to customize the default behavior of dialog editing and by using this feature, you can customize input components that you want to edit the grid column values in the edit dialog popup.
In the Dialog Template, we have rendered the input, dropdown and datePicker in the external dialog component are rendered in the partial views. This is used to perform the CRUD operation in the grid using the external component rendered in the partial view. The values edited are affected in the grid after clicking ok button in the dialog popup.
Please refer the below Documentation and demo for your reference,
If the above solution doesn’t meet your exact requirement, Please share the below details to validate further on your requirement,
1. What is the exact relation between the components rendered in the partial view and the grid?
2. Are you want to affect the grid dataSource and the grid’s UI after editing in the dialog?
3. What is use of the data that you want to sent to the server side? Is it going to affect the grid’s datasource?
4. Explain your exact requirement detailly using the screenshot or video demo.
Regards
Vignesh Sivagnanam