protected DataTable _dataTable;
protected void Page_Load(object sender, EventArgs e)
{
try
_dataTable = new DataTable();
_dataTable.Columns.Add("PersonID", typeof(int));
_dataTable.Columns.Add("PersonStatus", typeof(string));
DataRow row = _dataTable.NewRow();
row["PersonID"] = 1;
row["PersonStatus"] = "\0"; // <<------------------------------------- BAD DATA!!!
_dataTable.Rows.Add(row);
myGrid.DataSource = _dataTable;
myGrid.DataBind();
}
catch (Exception ex)
string err = ex.ToString();
The grid binding chokes on "\0";
Has anyone else experienced this?
I am having a very similar issue. I think it may be the same problem. I have null values in a database column, but I am using a domain data source. The end result is the same, a null value goes down to the grid and it chokes.
This issue is still not solved with the WebDataGrid in 11.2 ....
The 10.3 UltraWebGrid on tne other hand, is perfectly capable of dealing with those \0 values !
Hello All,
I have reviewed this behavior and have asked our engineers to examine this matter further. In order to ensure that the matter receives attention, this issue has been logged in our internal tracking system with an ID of 138209. The next step would be for a developer to examine this scenario.
Please let me know if you need more information.
Hello,
After reviewing this scenario, our engineers have determined that the design of WebDataGrid would not allow handling of null "0\" values due to the XML/XSLT transformation used to rendere the grid. Please note that this architecture aims to increase the performance of the grid control as it is faster than building the output html character by character.
The suggested approach in this scenario would therefore be examining the datasource and removing the null values as suggested earlier.
Please do not hesitate to contact me if you need more information.
Hi,
We are usig infragistics WebDataGrid in are web application and facing similar issue,but this error dont show up every time its random.
When you say it cannot handle null and due to this it gives error,we have scenario when this error dont come on same data twice.
I mean on same data it sometimes shows error and at times work perfectly.
Hello Vandita,
Thank you for your reply.
If you could share a sample illustrating the behavior in question I would be happy to investigate whether the exception is being thrown in circumstances when it should not be.Please do not hesitate to contact me with any updates.
We have the same exception with special characters while binding data to grid.
'', hexadecimal value 0x1A, is an invalid character.
Is there any solution other than replacing the special characters ?
For which characters we may get this kind of exception ?
Thanks,
Raghuvarma.g
We are getting the same exception when the data has Special Characters while binding data to grid.
Have you found any solution to this issue?
Thanks
Raidu