Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
170
SummaryDefinition not updating the sum right away for a bool value
posted

I have a datagrid with the following SummaryDefinition

<igDP:XamDataGrid.FieldLayouts>

<igDP:FieldLayout>

<igDP:FieldLayout.SummaryDefinitions>

<igDP:SummaryDefinition Key="idp_count" SourceFieldName="IsSelected" Calculator="Sum" StringFormat="{}{0}"/>

 

now, all this is doing is trying to get the count of the selected items...  So in my grid, i have a list with check boxes, and each time i check one, i want the count at the bottom to go up... works great, but its always one off...

for instance... load the grid, sum=0, check first box, sum=0, check second box sum=1, check third sum=2.  Now, once i get out of the grid, it updates to the correct sum, but not until i get out.  Is there any way to force this to update properly in an event handler?

Parents
  • 9836
    posted

    This is the default behavior of the grid because the summaries are updated right after the cells lost focus. You can test this by checking the first checkbox and click in a cell in the other column. One way to update the summaries is to handle some of the events that the editor is using like ValueChanged and force the cell to exit edit mode. You may also find this article helpfull.

    Hope this helps

Reply Children