We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataControl + CheckBox to drive aggregates

Thread ID:

Created:

Updated:

Platform:

Replies:

100778 Sep 5,2011 02:50 PM UTC Sep 23,2011 09:04 AM UTC WPF 5
loading
Tags: GridControl
Aditya
Asked On September 5, 2011 02:50 PM UTC

I am trying to wire up the griddatacontrol with an unbound checkbox column which i then want to use to select records that I want to include\exclude in custom aggregate operations (sum, std dev) etc. based on user selection.

I have a griddatacontrol, with a DataTemplate which has a checkbox. I am attempting to setup a 2 way binding between the selected record and the check box (so if the user selects the record, the check box is checked, else its unchecked).

I also want the aggregates I have setup to include or exclude the record based on what the user has selected.


Rajasekar [Syncfusion]
Replied On September 6, 2011 10:23 AM UTC

Hi Siddharth,

Thank you for your update.

We have prepared the sample based on your requirement, The below sample will show the CustomAggregate for computing "SUM" based on the checkbox column in the GridDataControl. Please find the sample in the below location,

Sample:

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=SyncGDCSummaries-1389802218.zip

Likewise, you can implement CustomAggregate for different scenarios.

Please let us know if you have any queries.

Thanks,
Rajasekar



Aditya
Replied On September 6, 2011 05:54 PM UTC

Thanks for the sample, but I am specifically looking for a method to drive the aggregation from an unbound checkbox column. The reason for this is that we are going to have multiple instances (views) of the grid data control pointing to the same underlying model. We do not want the checkbox bound to a property in the model to drive the aggregation because checkbox selection in one griddatacontrol will then impact other griddatacontrols since all the griddatacontrols share the same model.

So we need a unbound checkbox column that can
1) Drive aggregation
2) be sorted based on a sort operation on the bound area of the grid.
3) be filtered based on filter criteria on the bound area of the grid.

Thanks.


Rajasekar [Syncfusion]
Replied On September 19, 2011 07:38 AM UTC

Hi Sid,

Thank you for your update.

In our GridDataControl, The summaries are calculated on the basis of VisibleColumn MappingName. While using an UnboundVisibleColumn instead of a VisibleColumn, you cannot calculate summaries using Linq extension method, because here you cannot access the UnboundVisibleColumn values without mapping names. So this is the reason for unable to achieve this requirement using an UnboundVisibleColumn.

Please let us know if you have any queries.

Thanks,
Rajasekar



Siddharth Mahesh Gambhirwala
Replied On September 21, 2011 08:55 PM UTC

Thanks for the response. However, isnt there a way to remove the unchecked items from View.Records and fire the FilterChanging event which in turn should call the event aggregator?


Rajasekar [Syncfusion]
Replied On September 23, 2011 09:04 AM UTC

Hi Sid,

Sorry for the inconvenience caused , Since we cannot access the values of the UnBoundCheckbox column in the Linq Extension method, because it doesn’t have any properties in the corresponding binded objects to raise the custom aggregate function. However, we are analyzing more in this regard and also we have found that, The similar query is posted in the Direct Trac Incident #84603 internally. And, we will update you the appropriate detail in that respective incident Asap.

And, Please update your queries in that corresponding incident for better follow up.

Thanks,
Rajasekar



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;