Hi...
I'm using the obout grid control in c# and not to sure how to throw an error from the code behind!
I am catching the error in the code behind with a try catch block (which i can see it doing using break points in visual studio) which I am creating on purpose from the database(creating another record with the same identifier), but cant seem to make it bring up a message box with an error!
Here's the code I am working with:
void InsertRecord(object sender, GridRecordEventArgs e)
{
try
{
string[] value = new string[] {/*records to be added */};
connClass func = new connClass();
func.fnRecord(value, "rm_category_add");
}
catch (Exception ne)
{
//here's the problem!!!!!!
}
}
I have also set the onCallbackerror to true as you can see here:
protected void Page_Load(object sender, EventArgs e)
{
grid1.ID = "grid1";
grid1.CallbackMode = true;
grid1.Serialize = true;
grid1.AutoGenerateColumns = false;
grid1.AllowAddingRecords = true;
grid1.ShowLoadingMessage = true;
grid1.FolderStyle = "../css/style_13";
grid1.ClientSideEvents.OnClientCallback = "OnClientCallback";
grid1.ClientSideEvents.OnClientCallbackError = "onCallbackError";
grid1.ClientSideEvents.OnClientDblClick = "fn_UpdateRecord";
}
Any Help would be appreciated:)