Smart GWT 2.5 Power Edition
I have successfully tied a grid to data source backed by an Oracle table. I would now like to add grid summary line that captures the total rows associated with the last fetch operation.
I cloned the current data source definition file and gave it a new unique ID. I added the following operation binding to the bottom of it to capture the count.
On the client side, I have the following new logic:
Finally, I make sure the totalField is added to the grid field list. The summary is not being loaded properly, so I appear to be doing something wrong.
Questions:
1 - Did I construct the DS operationBinding properly?
2 - I used the field name of "COUNT(ID)" for the ListGridSummaryField - is that correct?
3 - Does the summary row data source automatically fetch when the grid does or do I need to explicitly do that?
Thanks.
I have successfully tied a grid to data source backed by an Oracle table. I would now like to add grid summary line that captures the total rows associated with the last fetch operation.
I cloned the current data source definition file and gave it a new unique ID. I added the following operation binding to the bottom of it to capture the count.
Code:
<operationBinding operationType="fetch"> <selectClause>select COUNT(ID)</selectClause> </operationBinding>
Code:
mGrid.setShowGridSummary(true); mGrid.setSummaryRowDataSource(sortSummaryDS); ListGridSummaryField totalField = new ListGridSummaryField("COUNT(ID)", "Total"); totalField.setAlign(Alignment.RIGHT); totalField.setShowGridSummary(true);
Questions:
1 - Did I construct the DS operationBinding properly?
2 - I used the field name of "COUNT(ID)" for the ListGridSummaryField - is that correct?
3 - Does the summary row data source automatically fetch when the grid does or do I need to explicitly do that?
Thanks.
Comment