Mar 02, 2013, 5:04 PM
[CLOSED] How to access the original data/rows bound to the GridPanel which are invisible after applying filter.
Hi Team,
I have a GridPanel in which i have a CheckColumn.
When there is change in the check box selection of any rows, I have to run a logic which should read the the whole store and based on the some columns data it will select checkboxes of those rows also. To do this i have a checkchange listner on this column which go and check other column for some data and select the checkboxes of those rows.
==== C# code =========
========== Java Script =============
It works fine when I check any column which will read the whole store and check for other rows which satisfy the required condition and select checkboxes of those rows also.
But when there is a filter applied and after that if i select some checkbox in the rows left, i am not able to read those other rows which arent visibile because of the filter applied, so when i remove the filter those related column which satisfy the required condition will remain un-checked.
I need your help to know how to access the whole store(GridPanel rows data, including rows which are not visible because of the applied filter) when there is a filter applied.
Please refer some screenshots attached.
And also what is the best method to save the store of a perticular row (after check/uncheck of a column) without losing the focus on the row where user has checked the checkbox.
I have a GridPanel in which i have a CheckColumn.
When there is change in the check box selection of any rows, I have to run a logic which should read the the whole store and based on the some columns data it will select checkboxes of those rows also. To do this i have a checkchange listner on this column which go and check other column for some data and select the checkboxes of those rows.
==== C# code =========
colSW.Listeners.CheckChange.Handler = "onColumnCheckChange(column, rowIndex, record, #{" + grid.ID + "});";
============================= Java Script =============
var onColumnCheckChange = function(column, rowIndex, record, grid) {
var gridStore = record.store;
gridStore.each(function(curRecord, index) {
if (index !== rowIndex) {
//check/uncheck(based on current action) the checkboxes of the all the other rows which has submitflag = "Y"
if(curRecord.data.submitflag =="Y")
curRecord.data.SUBMIT_TO_WORKFLOW_FLAG = record.data.SUBMIT_TO_WORKFLOW_FLAG;
}
});
gridStore.commitChanges();
}
===============================It works fine when I check any column which will read the whole store and check for other rows which satisfy the required condition and select checkboxes of those rows also.
But when there is a filter applied and after that if i select some checkbox in the rows left, i am not able to read those other rows which arent visibile because of the filter applied, so when i remove the filter those related column which satisfy the required condition will remain un-checked.
I need your help to know how to access the whole store(GridPanel rows data, including rows which are not visible because of the applied filter) when there is a filter applied.
Please refer some screenshots attached.
And also what is the best method to save the store of a perticular row (after check/uncheck of a column) without losing the focus on the row where user has checked the checkbox.
Last edited by Daniil; Mar 05, 2013 at 6:38 AM.
Reason: [CLOSED]