Hi folks
I think I have stumbled on a bug - wonder if you could advise....
I have set my grid to data bind on the client side using a WCF service. My grid has a nested view template which has a few labels in it. When the grid is re-bound, any nested rows which were visible seem to stay with the grid even after it is re-bound (so you end up with the new results + the previously visible nested rows). To repro the bug:
1. Data bind the grid so that there are records in it.
2. Expand a few of the nested rows and leave them visible.
3. Force the grid to re-bind on the client side.
Notice now the visible nested rows haven't been removed.
Here is the code I am using to do the binding:
Grid settings:
<ClientSettings>
<DataBinding Location="~/Services/Anonymous/Reporting/OnDemandLatest.svc" SelectMethod="GetData"
SelectCountMethod="GetCount" EnableCaching="false" StartRowIndexParameterName="startIndex"
MaximumRowsParameterName="maxRowCount" />
<ClientEvents OnDataBinding="Grid_DataBinding" OnRowDataBound="Grid_RowDataBound"
OnDataBound="Grid_DataBound" />
</ClientSettings>
JS code (this is called on a button click)
function Rebind() {
ShowLoadingPanel();
Grid().get_masterTableView().rebind(); // Note: Grid() is just a function which returns the grid.
}
I think I have stumbled on a bug - wonder if you could advise....
I have set my grid to data bind on the client side using a WCF service. My grid has a nested view template which has a few labels in it. When the grid is re-bound, any nested rows which were visible seem to stay with the grid even after it is re-bound (so you end up with the new results + the previously visible nested rows). To repro the bug:
1. Data bind the grid so that there are records in it.
2. Expand a few of the nested rows and leave them visible.
3. Force the grid to re-bind on the client side.
Notice now the visible nested rows haven't been removed.
Here is the code I am using to do the binding:
Grid settings:
<ClientSettings>
<DataBinding Location="~/Services/Anonymous/Reporting/OnDemandLatest.svc" SelectMethod="GetData"
SelectCountMethod="GetCount" EnableCaching="false" StartRowIndexParameterName="startIndex"
MaximumRowsParameterName="maxRowCount" />
<ClientEvents OnDataBinding="Grid_DataBinding" OnRowDataBound="Grid_RowDataBound"
OnDataBound="Grid_DataBound" />
</ClientSettings>
JS code (this is called on a button click)
function Rebind() {
ShowLoadingPanel();
Grid().get_masterTableView().rebind(); // Note: Grid() is just a function which returns the grid.
}