Hi Pawel,
Thank you for your interest in Syncfusion products.
1. When I want to hide column on master grid (using code shown below on main aspx page) everything works until i use paging action..
We suggest to use JQuery ajaxSuccess event to achive this column hiding in Master_Grid. This event used to attach a any function. This attached function will be executed whenever an AJAX request completes successfully.
Please refer the below syntax.
function (event, XMLHttpRequest, ajaxOptions) {
this; // dom element listening
}
Please refer the following code snippet to achive column hiding feature.
[js]
$("#Master_Grid").ajaxSuccess(function(event, XMLHttpRequest, ajaxOptions) {
var gridObj = $find("Master_Grid");
if (ajaxOptions.type == "post") {
//Hide the Master_Grid Column
hideColumn("Master_Grid", "CustomerID");
}
});
2. How to retrieve rows (or invoke any other action) on slave grid (clear it when no row is selected), after invoking paging action on master grid.
We can achieve this through JQuery ajaxSuccess event. Here i have created a simple sample to illustrates this feature.
Refer the below code snippet, which illustrates this.
$("#Master_Grid").ajaxSuccess(function(event, XMLHttpRequest, ajaxOptions) {
var gridObj = $find("Master_Grid");
if (ajaxOptions.type == "post") {
//Hide the Master_Grid Column
hideColumn("Master_Grid", "CustomerID");
//To call the slave grid.
$("#OrderID").val(0);
SubmitMvcAjaxForm("Child_form");
}
});
The sample illustrates,
1. Master_Grid contains the Order Information where as Child_Grid is contains the Order_details.
2. During the OnRecordSelect event the Child Table generates the corresponding order_details values in child Grid.
3. During the paging action, the child_grid cleared using .ajaxSuccess event.
Please refer the sample from the below link.
http://help.syncfusion.com/support/grid_mvc/v7.4.0.20/F91469/Sample.zipPlease let us know if you have any concerns.
Regards,
M. Balaji.