We have a Radgrid with 12 template columns that contain radcombboxes, checkboxes, date pickers and regular text box fields. All of those have .net validation controls on them. My developer is losing her mind over a current issue wherein the Insert command is not firing. That is to say, that when you add a new record and click insert, a postback occurs, but the RadGrid1.InsertCommand never fires. When you click Insert, the grid simply reloads and the edit screen disappears and no record is inserted. The delete command DOES fire. It is auto generated. Here is our grid definition.
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" GridLines="None" Skin="Web20" AutoGenerateColumns="False" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" AllowFilteringByColumn="True" >
To troubleshoot and narrow the issue down, we have tried
1. Removing all the client side validation - that did not have any effect.
2. Commenting out the ItemCommand and ItemCreated commands
If anyone out there has any ideas on where to look, I would greatly appreciate it.
7 Answers, 1 is accepted
In the above given aspx code I cannot find the Event declaration for InsertCommand. Can you confirm whether you have set it in the code behind or not.
You can also refer the following code Library that I submitted to get more details on performing manual Insert/Update/Delete operation.
Manual Insert/Update/Delete operations using Auto-generated editform with sql statements from the code-behind
Well I'm able to trigger the Update, Delete and Insert Command methods now by setting the SQL Datasource with the following:
Therefore, even though the SQL Statement is empty, the Methods as mentioned above are still triggered. However, I've got a problem with regards to the RadGrid staying in InsertMode even after insert is completed. I have tried the following codes to aid in trying to switch the InsertMode off, but it has been to no avail.
Please advise. Thanks.
Thanks for the sample project. It did help and I appreciate the help provided too.
After some tracing, I finally figured out a workaround: if I deploy ASP.NET under the same "Microsoft Dynamics CRM" Site both RadGrid and GridView will not work; but if I create a new "Site" and deploy ASP.NET App over there, it works fine. (My guess is that, "CRM Site" will want to control/overwrite-part-of those Apps under its tree, thus changed those ASP.NETs' behavor and cause them not functioning as expected.)
Hope it helps...