How would I replace the following markup code that used to work for my UltraWebGrid to work on the WebDataGrid?
I get the error Code blocks are not supported in this context even after changing this:
<igtbl:TemplatedColumn meta:resourcekey="TemplatedColumnResource3" BaseColumnName="AccountNumber" IsBound="True" Key="AccountNumber" FooterText="" FooterTotal="Count"> <CellTemplate> <a href="BLOCKED SCRIPT void(0)"><%# Eval("AccountNumber")%></a></CellTemplate> <Header Caption="Account Number"> <RowLayoutColumnInfo OriginX="4" /> </Header> <Footer Caption="" Total="Count"> <RowLayoutColumnInfo OriginX="4" /> </Footer> </igtbl:TemplatedColumn>
to this:
<igtbl:TemplateDataField meta:resourcekey="TemplatedColumnResource3" Key="AccountNumber" Footer-Text="" Header-Text="Account Number" FooterTotal="Count"> <ItemTemplate> <a href="BLOCKED SCRIPT void(0)"><%# Eval("AccountNumber")%></a></ItemTemplate> </igtbl:TemplateDataField>
I tried changing Eval to DataBinder.Eval but same error appears.
Secondly, how to do I get the footer to display the count on the footer? Do I need to use DataTable.Compute on Page load or is there a way to do it in the markup code?
Thanks!
Thank you very much!
I am going to try this and I will let you know if I have any other problems with it.
Hi,
Thank you for posting on our forums. I will be happy to assist you with your questions.
May I ask if you can provide me with the version of Infragistics assemblies you are referencing in your application? I have attached a sample here that demonstrates how you can use a Data-Binding expression with a WebDataGrid Template field. Please use the sample as reference to enable this functionality in your application. If this doesn't work for you, please modify the sample to reproduce the behavior you mentioned and I will be happy to look into it further.
Regarding "count on the footer" behavior, you should be able to achieve this with the use of the SummaryRow behavior for the WebDataGrid. I have enabled this behavior in the sample as well. Please review how I achieve this in the sample and let me know if you have any questions. Also, please refer to the following help topics to learn more about the WebDataGrid and referenced features:
WebDataGrid:http://help.infragistics.com/doc/ASPNET/2014.1/CLR4.0/?page=Web_WebDataGrid_WebDataGrid.html
WebDataGrid SummaryRow:http://help.infragistics.com/doc/ASPNET/2014.1/CLR4.0/?page=WebDataGrid_Summary_Row.html
WebDataGrid Databinding Expressions Templates:http://es.infragistics.com/samples/aspnet/data-grid/databinding-expressions-templates
Please let me know if you have any questions regarding this matter.