Greetings,
I am debugging a databind issue with WebDataGrid using Infragistics35.Web.v11.1, Version=11.1.20111.1006.
The problem was tracked down to a record with bad data in a field. It had ASCII 0 (not null but a length 1 string) in a Field that should be "Y" or "N". We are not doing anything other than displaying data in this grid. Even when we tested by having a button set the datasource and do the databind, we were not able to catch this error. The application gave an asp.net error occured web page with a non-descript error. The code below never threw an exception when binding the data, were the exception occurs. It took hard trial and error to determine what field and then what record was causing this issue.
What is the right way catch this exception as not to crash this appliction?
Thanks,
RBB
Button1.Click
Try
WebDataGrid1.DataSource = SqlDataSource1
WebDataGrid1.DataBind()
MsgBox(ex.Message.ToString,
MsgBoxStyle.MsgBoxSetForeground, "Binding")
???????????????
Did I miss something? I posted a *VERY* specific question with code about an issue that was not throwing an error?
I got back a response asking for the same information that I posted.
I pointed out what I posted.
Then several days later I get back >>> Were you able to handle. For any further questions do not hesitate to connect me. <<<<<<<<<<<<<<
What support is this? Two responses that had nothing to do with the simple question?
Does anyone read these posts?
It was a simple question.
ultrawebgrid.databind was not throwing an catchable error when there is undisplayable data in a field in the ado returned from the SQL.
Hello Robert,
Were you able to handle this. For any further questions do not hesitate to contact me.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
I am attaching here a sample in VB. Can you modify it in the way this error is thrown. This will be really helpful for me in order to investigate it further. I have the button_Click implemented and I am setting a datasource on it. You need to modify the datasource set.
Looking forward to hear from you.
My previous message included the code. You may have to scroll down to see it.
Read the message It clearly states that the issue was tracked down to a record with bad data in a field. It had ASCII 0 (not null but a length 1 string) in a Field that should be "Y" or "N". We are not doing anything other than displaying data in this grid.
My previous message included the code that DID NOT trap the error. The documentation does not show how to catch a binding error.
Protected Sub
Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
WebDataGrid1.DataSource = SqlDataSource1 Web
DataGrid1.DataBind()Catch As Exception
MsgBox(ex.Message.ToString,MsgBoxStyle.MsgBoxSetForeground,"Binding")
End Try
End Sub
Robert Burgh
Hello RBB,
Thank you for posting this in our community. Can you provide a sample code reproducing this issue.
Also what is the error that you experience?
Looking forward hearing form you.