Seems I cant figure out anything on my own. Anyway, looking to set a total for a column in the footer. I see examples for the UltraWebGrid but nothing for the WebDataGrid. Thanks.
Hello,
I used the same approach in my grid but I am getting the _footerElement property as null. Hence I am not able to update the footer.
Is there any other way of doing so?
Thanks
On Pageload after databind
I have few problems
- Is it necessary to bind webdatagrid for each event like (sorting/Editing/deleting/Filtering)?
- How can hide filter from a particular column (eg - need filter only on one column not on all), Is it possible?
Hi ShyamQ3,
If you upgrade to 10.3, which is being release today, you can take advantage of the SummaryRow behavior that will handle everything for you.
Where are you calling this code that it is not working?
-Dave
WebdataGrid1.DataSource = dt;WebdataGrid1.DataBind();
if (dt.Rows.Count > 0)
WebdataGrid1.Columns["ColumnName"].Footer.Text = String.Format("{0:C2}", Convert.ToDecimal(dt.Compute("Sum([ColumnName])", "")));
else
WebdataGrid1.Columns["ColumnName"].Footer.Text = "";
In this way we can get total of particular colum, but there is an issue at the time of filtering, when we are using filtering total remain same, it does not update??? Is dere anyone who can suggest what have to do?
Alex,
Thank you very much for the update !!