Ok so to recap what I did. I created a application with sample data. I recreated exactly what you wrote for the partial, I set Render to invoke method OnRender and set args to ${event}
Amazing!!!! It worked.
So by looking at the example as a whole, I was focusing on the wrong parts and therefore getting errors that really had nothing to do with what I was actually trying to accomplish.
I rebuild the actual page I was trying to create, using these steps and it worked perfectly.
I really overcomplicated it and thank you very much for clarifying it. Grouping is definitely very easy to do, now that I see what I was doing wrong!!
Now I am on to creating a group footer for each of the columns I want to get data for.
Simply put I have 10 columns that each have a boolean that is either true or false.
In the group footer of each column I want to count only the number of times that column is true.
In your example, the code is as follows:
Group amount: @String.Format(new System.Globalization.CultureInfo("en-US"), "{0:C}", context.Data.Items.Cast().Sum(o => o.Freight))
I have only 2 questions that I can't seem to understand (again sorry for ignorance)
-
I don't see the need for the globalization as I only want a count of true instances which is just basically an int result.
-
Your example says context.Data.Items.Cast.Sum(o => o.Freight))
I am trying to adapt it as follows
@String.Format( "{0:F}", context.Data.Items.Cast().Count(o => o.EventStep1Complete == true))
CrmTask being the table class
I can't seem to figure out what context is (stupid I know) is it the App Name, Database Name, Grid Name...? I have tried many combinations, but none get me Data.Items.Cast....
This is my last question on this subject. I have also posted it on Stack Overflow and get so many conflicting answers that I still can't figure it out.
You have been so helpful, I am truly grateful for everyone and everything with Radzen!!!!