Query |
Response | |
how to provide data to child grid, and how child grid data connected to parent grid data. |
Hierarchy Grid feature allows you to add the Grid control inside the Grid row. When you want to view the child Grid, you can expand the Grid. Bind the data to child Grid by assigning the foreign key field to” query string” property. Please refer the below code example, Help documentation, and sample. Code Example:
Help documentation : http://help.syncfusion.com/aspnetmvc/grid/hierarchy-grid Sample : http://www.syncfusion.com/downloads/support/forum/121051/ze/SyncfusionMvcApplication3708769152 | |
How to update child grid data whenever parent data is changed? |
Please share the following information to provide a prompt solution.
| |
Is there a function to refresh data for certain row in grid? such as in tree grid, you have refreshRow() method. |
Please share the following information to us for your requirement. It will help us to provide the prompt solution. Do you want to refresh all the child grids data for a particular parent row? | |
How to get the index for the row I am editing? |
We have achieved your requirement using beginEdit event, which is used to get index of the edited row. Please refer to the below code example and Help documentation
Help document : http://help.syncfusion.com/js/api/ejgrid#events:beginedit | |
How to calculate the sum for the value from certain column in grid? For example, I have a column "Percentage", in which all the value are numbers. How can I get the total percentage for this column? |
We can render summary rows using “showSummary” and “SummaryRow” properties in ejGrid. Please refer to the below code example, Help documentation and sample. Code example:
Sample : http://www.syncfusion.com/downloads/support/forum/121051/ze/SyncfusionMvcApplication3708769152 | |
How to add hyperlink to certain column(custom column)? |
Already we have discussed the same in the below Knowledge Base, Link : https://www.syncfusion.com/kb/3768/how-to-place-hyperlink-in-grid-column | |
How to use BeginEdit event to make some columns are editable but others are not? I know we can do it using AllowEditting, but wonder how we can do it using BeginEdit like in tree grid. |
We have achieved your requirement using actioncomplete event. This event triggers for every grid action success event. Please refer the below code example and Help documentation, Code example:
Help Documentation: http://help.syncfusion.com/js/api/ejgrid#events:actioncomplete |
1. Do you want to edit parent and child grid at a time?
No. I just want to edit parent.
2. Do you to perform any other actions done in child Grid while updating parent grid?
No other action.
Query3. Do you want to refresh all the child grids data for a particular parent row?
Yes. Refresh all the child grids data for a particular parent row.
Query 5. I just want to get the number for the total percent, not summary row. I will use that number for other purpose. How can I get that number?
Thank you,
Harry
child.Datasource((IEnumerable<object>)ViewBag.dataSource1) .QueryString("EmployeeID") .AllowPaging() .Columns(col => { col.Field("EmployeeID").HeaderText("Employee ID").IsPrimaryKey(true).TextAlign(TextAlign.Right).Width(100).Add(); col.Field("ShipCity").HeaderText("Ship City").Width(100).Add(); col.Field("ShipCountry").HeaderText("Ship Country").Width(100).Add(); col.Field("ShipPostalCode").HeaderText("Ship Postal Code").TextAlign(TextAlign.Right).Width(100).Add(); }); |
.EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing(); }) |
function rowselected(args) { var gridobj = $("#FlatGrid").ejGrid("instance") if (gridobj.getContentTable().find("tr").eq(0).children().hasClass("e-detailrowexpand")) { x = args.rowIndex; var childobj = $("#child1_grid" + x + "").ejGrid("instance"); childobj.refreshContent(); } |
function databound(args) { var sumvalue = ej.sum(this.model.dataSource, "Freight"); alert("gridObj.summaryrowvalue->" +sumvalue); |