Hi,
I am using XamGrid from v10.2. I am having issues when the data from a stored proc has columns with special characters(ex #, % etc). Such columns have no data shown on the grid. How do I resolve this issue?
I wish I could try this but the columns definitely need to have special characters imply the business meaning (ex % or $). Also, the I am invoking different stored procedures at runtime based on few conditions so cannot have a hardcoded HeaderTemplate. I hope this is not a bug with XamGrid. Any other solution would be most welcome.
(1) You could try changing your query so that the column names/aliases do not have special characters that will screw up the binding:
Select EmpId, Emp_Name, Loan, Total as from TestEmp
(2) Then you can just set the column names manually in the xamWebGrid:
One or both of these ways should work:
<igGrid:TextColumn Key="Loan">
<igGrid:TextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="Loan #" />
</DataTemplate>
</igGrid:TextColumn.HeaderTemplate>
</igGrid:TextColumn>
<igGrid:TextColumn Key="Total">
<TextBlock Text="Total %" />
or
<igGrid:TextColumn Key="Loan" HeaderText="Loan #"/>
<igGrid:TextColumn Key="Total" HeaderText="Total %"/>
Yes, the column names have special characters. I have query that says
Select EmpId, Emp_Name, Loan as 'Loan #', Total as 'Total %' from TestEmp
The output on Sql Server looks like this:
And on XamGrid as this:
When I see the raw data from using Fiddler, I see that the data is passed through correctly but disappears as it binds to the grid. Not sure what I am doing wrong here.
Harish,
Do you mean that the column names have special characters?
Sincerely,FrancisDeveloper Support Engineer