Tagged: Aggregation, Calculated Columns, FlexGrid, LightSwitch
-
grandadmiralmcb said 11 months, 1 week ago:
Hello,
When I apply grouping to my table, and then apply aggregation (sums) on ls calculated columns, only one of my three aggregated columns actually sum up. Additionally, it is the only column that remains 'fixed’ when I scroll horizontally.
I used the following code to apply the aggregations:
void proxy_ControlAvailable(object sender, ControlAvailableEventArgs e)
{
_flex = e.Control as C1.Silverlight.FlexGrid.C1FlexGrid;/*Find Columns to total*/
_flex.Columns.Where(model => model.Header == "Sub Total").Single().GroupAggregate = Aggregate.Sum;
_flex.Columns.Where(model => model.Header == "Combined Price").Single().GroupAggregate = Aggregate.Sum;
_flex.Columns.Where(model => model.Header == "Total").Single().GroupAggregate = Aggregate.Sum;}
The Combined Price Column is currently the only one that will sum. All three of those columns are lightswitch calculated. Is this a limitation of the FlexGrid?
Thanks,
Matt
P.s. on a side note, I have a percentage viewer control that does not work when embedded in the flexgrid, but does in a normal grid. Any thoughts on that as well?
| # -
grandadmiralmcb said 11 months, 1 week ago:
I just did some more testing (no code changes) and suddenly they are starting to aggregate since I opened new screens and closed some. Is there a way to be notified when all data has been calculated?
| # -
Hello grandadmiralmcb,
You can capture the 'Changed’ event of the datasource for this. Following code can be used for the same :
partial void Products_Changed(NotifyCollectionChangedEventArgs e) { Microsoft.LightSwitch.Threading.Dispatchers.Main.BeginInvoke(() => { System.Windows.MessageBox.Show(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss")); }); }Thanks,
RichaAnswer| # -
grandadmiralmcb said 11 months ago:
Thanks for the reply, it points me in the right direction!
| # -
grandadmiralmcb said 10 months, 2 weeks ago:
I’m running into this issue again, where a ls calculated column will compute, but none of the flexgrid’s aggregate row headers product a sum. All i have is a placeholder 0.
| # -
Hello Grandadmiralmcb,
I tested this application with LS Flexgrid build 15 with simple field and applied aggregate.sum. This gives the correct result.
Could you please let me know what method did you use for the Computed Fields and code did you use for calculating the aggregate. Also, what is the type of the computed field?
Thanks,
Richa| # -
grandadmiralmcb said 10 months, 2 weeks ago:
How do I know what build I’m using my version number is 1.0.20121.11
Does this mean I am using build 11?If so, what is the cleanest way to update?
| # -
Hello grandadmiralmcb,
To upgrade to a new version, you just need to run the C1FlexgridforLightswitch.msi file and also, update the C1Silverlight build.
Since no new version of C1Flexgrid for Lightswitch is released as yet, I would recommend you to please wait till mid of July for 2012v2 release.
Thanks,
Richa| # -
grandadmiralmcb said 10 months, 2 weeks ago:
The studio msi does not need a license in order to use the lightswitch flexgrid does it?
| # -
Hello grandadmiralmcb,
The C1Flexgrid extension does need a license and you will get a nag screen without it every time you run the application.
The details are available in the following url :https://www.componentone.com/Store/?product=499
You may contact our Sales department to buy the license.
ComponentOne
1.800.858.2739 | 412.681.4343
sales@componentone.comThanks,
Richa| #
You must be logged in to reply to this topic.

