Having difficulty find soltuions for probably common issues

Hi,

Thanks for your quick answers on my previous questions. I'm thinking that I missed some kind of FAQ section of this forum. Please point me in the right direction.

What I'm trying to find:
- How to add a 'calculated column' to a datagrid. (like the difference between two columns, displayed in a third column)
- How to filter on a date (without time), while the column type is DateTime (including time).
- How to add summaries of columns under a filtered grid.

Thank you for guiding me, and thanks again for your great product and great service !

Best, Johan

3 Replies 1 reply marked as answer

RS Renjith Singh Rajendran Syncfusion Team April 1, 2021 06:10 AM UTC

Hi Johan, 

Greetings from Syncfusion support. 

We have prepared a consolidated sample based on the below three queries for your convenience, please download the sample from the link below, 
 
Query 1 : - How to add a 'calculated column' to a datagrid. 
We suggest you to use ColumnTemplate feature of Grid. With this you can display a customized column in Grid. 
 
In the below code, we have calculated difference between A and B column, and display in 3rd column. Please refer the codes below, 

<GridColumn Field=@nameof(Order.A) HeaderText="A" Format="C2" TextAlign="TextAlign.Right" Width="120"></GridColumn> 
<GridColumn Field=@nameof(Order.B) HeaderText="B" Format="C2" TextAlign="TextAlign.Right" Width="120"></GridColumn> 
<GridColumn HeaderText="Diff of A&B" Format="C2" TextAlign="TextAlign.Right" Width="120"> 
    <Template> 
        @{ 
            var a = context as Order; 
            var Difference = a.A - a.B; 
        } 
        <span>@Difference</span> 
    </Template> 
</GridColumn> 
 
 
Query 2 : How to filter on a date (without time), while the column type is DateTime (including time). 
We suggest you to refer the below documentation for more details regarding filtering columns in grid. In the above attached sample we have performed filtering for a DateTime(values including time) column. 

Query 3 : - How to add summaries of columns under a filtered grid. 
We suggest you to refer the below documentation for more details regarding aggregate columns in Grid. In the above attached sample we have added summary to the OrderDate column. 

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran 


Marked as answer

PR Padmini Ramamurthy Syncfusion Team April 2, 2021 04:45 AM UTC

From: Johan Jongsma
Sent: Thursday, April 1, 2021 10:07 AM
To: Syncfusion Support <[email protected]>
Subject: Re: Syncfusion support community forum 164060, Having difficulty find soltuions for probably common issues, has been updated. 
  
Hi Renjith, 
 
I cannot believe how great your support is. You delivered me a working example with all my issues in a working demo-app. Amazing !!! 
 
All the best, Johan 
 
ps. I cannot post this message on the support forum; for some reason it does not let me click the CAPTCHA button... 



RS Renjith Singh Rajendran Syncfusion Team April 5, 2021 06:37 AM UTC

Hi Johan, 

Thanks for your update. We are glad to hear your requirement is achieved. 

Please get back to us if you need further assistance. 

Regards, 
Renjith R 


Loader.
Up arrow icon