Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I want to add a footer row in DataGrid control of WPF Application.
Here My ItemSource comes dynamically . so i am using AutoGenerateColumns = true because want to bind all column which comes dynamically.

Now i want to show sum of column value if column data type is decimal,float...etc only.
so how can i do it dynamically.

I am new in WPF development.

my code is:
XML
<DataGrid Name="dgData" VerticalAlignment="Top" Grid.Row="1">
        </DataGrid>

In Backend
CommonMethod cm = new CommonMethod();
            cm.FLAG = "1";
            DataTable dt = cm.GetData();
            dgData.ItemsSource = dt.DefaultView;

Please suggest me how can i accomplish or please tell me a ways to accomplish.

Thanks in advance.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900