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?
Hello SHarish,
Thanks for the update. Please let me know if I can be of further assistance.
Sorry for the delayed response. I was away on vacation. The issue with columns having special characters and not binding to the grid is definitely not a Infragistics issue. I tried the same with a toolkit grid and had same results.
In the WCF service, I query a stored procedure using ADO.NET however I convert the data to objects of type IEnumerable<Dictionary<string, object>> and pass the data to silverlight application and bind the list to grid.The stored procedure sometimes have column names with special characters and that is exactly when the binding fails.
As firestorm suggested, I am trying to avoid aliases in the procs to avoid this problem.
I'd like to follow up by reiterating what Devin asked earlier: "...are you binding to a collection of objects whose properties include these characters? Exactly what type of objects and collection are you binding to XamGrid? How are you getting that data into your Silverlight application?"
Understanding how you have your business objects and bindings set up will help us resolve the issue.
As a bit of an aside ...
.NET won't allow such characters as part of a property name, so I'm thinking you'd want to use names like LoanNumber or TotalPercentage instead. You would probably be better off assigning another property that represents the unit (%, $), which you could then bind to for display purposes.
The aliases you use in your query do not align to best practices, and they'll probably give you headaches in other types of applications (as they cannot be mapped to CLR datatypes), so I'd recommending stearing clear of that and sticking to conventions.
As far as the Infragistics stuff, I don't think I'd consider that a bug, but I think if you work with them you'll find it does what you need.
So to be clear are you binding to a collection of objects whose properties include these characters? Exactly what type of objects and collection are you binding to XamGrid? How are you getting that data into your Silverlight application?
Devin