Hi Team,
I am using Webdatagrid to show the product related information to user. I used cell editing options to make the user to edit the cell values in Webdatagrid. I added the footer row in every BoundDataField to show the calculated column values. I am setting the footer values programmatically in code behind. But the values are are not displaying in the UI part.
protected void Page_LoadComplete(object sender, EventArgs e) { if (Session["DataSource"] != null) { DataTable dt = (DataTable)Session["DataSource"]; GridField ColCost = wdgCompany.Columns["Cost"]; ColCost.Footer.Text = CalculateFooterRowValues(); } }
If you figure this out, please let me know, thanks!
Hello,
It has been some time since your post, however in case you still need assistance I would be glad to help.
As I understand from your explanation you want to use summaries in order to display some column information, for example summed values, average value etc.
My suggestion is to use the build in summaries functionality that our Grid provides:
http://www.infragistics.com/samples/aspnet/data-grid/summaries-custom-summary
http://help.infragistics.com/Help/Doc/ASPNET/2011.2/CLR4.0/html/WebDataGrid_Summary_Row.html
Let me know if I may be of further assistance.
That is not an answer. In my case, I will for whatever reason get an error page displayed that the summary rows cannot be calculated. So because of the IG failure, I have to do the sum programmatically. But I can't figure out how to change the value of the footer of a templatedatagrid field in code behind. I even added a "FooterTemplate" to try and change the text and still get the same "Object reference not set to an instance of an object."
The OP was asking how to programmatically access the footer and you skirted the issue and said, "Use this instead...". That is terrible customer service.