I need some help ith one o the demos I am trying to use.
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx
I have created a very similar version except that I am using a pop up window instead and 2 ascx user control forms which just allows the user to enter all info and then edit some info.
The first problem is: with this code behind in the RadGrid1_PreRender event.
I get this error when my page loads.
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Now I am using a hierarchy grid which is pullong data from the same db.
The second issue I am having is the Insert and Update button in the user control form .ascx file. I have this code for the update button which is directly from the demo.
For some reason the DataItem is not liked and I am getting this web page request error when I go to edit a record.
Error: Sys.WebForms.PageRequestManagerServerErrorException: c:\test\Web Projects\Sites\Industries VS2008\ Industries\Board\Controls\Admin\EmailSettingsUpdate.ascx(172): error CS0103: The name 'DataItem' does not exist in the current context
Can anyone shed some light here?
Thanks
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx
I have created a very similar version except that I am using a pop up window instead and 2 ascx user control forms which just allows the user to enter all info and then edit some info.
The first problem is: with this code behind in the RadGrid1_PreRender event.
if (!this.IsPostBack) { this.RadGrid1.MasterTableView.Items[1].Edit = true; this.RadGrid1.MasterTableView.Rebind(); } I get this error when my page loads.
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Now I am using a hierarchy grid which is pullong data from the same db.
The second issue I am having is the Insert and Update button in the user control form .ascx file. I have this code for the update button which is directly from the demo.
<asp:Button ID="btnUpdate" Text="Update" runat="server" CommandName="Update" Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>' Font-Size="0.9em" /> </td> <td> <asp:Button ID="btnCancel" runat="server" Text="Cancel" CausesValidation="false" CommandName="Cancel" Font-Size="0.9em" />For some reason the DataItem is not liked and I am getting this web page request error when I go to edit a record.
Error: Sys.WebForms.PageRequestManagerServerErrorException: c:\test\Web Projects\Sites\Industries VS2008\ Industries\Board\Controls\Admin\EmailSettingsUpdate.ascx(172): error CS0103: The name 'DataItem' does not exist in the current context
Can anyone shed some light here?
Thanks