I'm new to the Rad Toolset and I'm trying to figure some things out. I've done a lot of google and reading on the forums and can't find what I'm looking for.
My setup is as follows: The DAL was created by SubSonic. I've created an ObjectDataSource and have a RadGrid hooked up to that. The ObjectDataSource points to the controller source generated by SubSonic for that table. In this instance I'm doing two identical lookup tables for facilities and divisions. I'm trying to create a radgrid with the edit, insert, and delete functions.
Two problems:
1. The insert and edit functions work great on the division table, but not the facilities table. I've checked the source and the two pages are identical. An update on the facilites page results in an error message:
ObjectDataSource could not find a non-generic method 'Update' that has parameters: FacilityName, FacilityDescription, FacilityID, original_FacilityID.
That is true. The signature doesn't include the original_FacilityID. But the update for the Division table doesn't include the original_DivisionID in it either, and it works fine. I can't figure out where this parameter comes from as it's not in any list in the page:
<telerik:GridBoundColumn DataField="DivisionID"
HeaderText="DivisionID" SortExpression="DivisionID"
UniqueName="DivisionID" DataType="System.Int32" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FacilityID" DataType="System.Int32"
HeaderText="FacilityID" SortExpression="FacilityID"
UniqueName="FacilityID" Visible="False">
</telerik:GridBoundColumn>
And the DataSource contains the same definitions:
<asp:ObjectDataSource ID="CmdbDivision" runat="server" DeleteMethod="Delete"
InsertMethod="Insert" OldValuesParameterFormatString="original_{0}"
SelectMethod="FetchAll" TypeName="CMDB.TblDivisionController"
UpdateMethod="Update">
<DeleteParameters>
<asp:Parameter Name="DivisionID" Type="Object" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="DivisionID" Type="Int32" />
<asp:Parameter Name="DivisionName" Type="String" />
<asp:Parameter Name="DivisionDescription" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="DivisionName" Type="String" />
<asp:Parameter Name="DivisionDescription" Type="String" />
</InsertParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DeleteMethod="Delete"
InsertMethod="Insert"
OldValuesParameterFormatString="original_{0}"
SelectMethod="FetchAll"
TypeName="CMDB.TblFacilityController"
UpdateMethod="Update">
<DeleteParameters>
<asp:Parameter Name="FacilityID" Type="Object" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="FacilityID" Type="Int32" />
<asp:Parameter Name="FacilityName" Type="String" />
<asp:Parameter Name="FacilityDescription" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="FacilityName" Type="String" />
<asp:Parameter Name="FacilityDescription" Type="String" />
</InsertParameters>
</asp:ObjectDataSource>
I believe the second problem to be related, as the delete function works on neither page. The facility page fails because of the same signature problem, whereas the division page just refreshes and doesn't do the delete.
Any suggestions? I'm hoping that someone here has some SubSonic with Rad Grid experience and can help me. If not, maybe you're familiar with ways to work around this problem with the original_ID problem.
My setup is as follows: The DAL was created by SubSonic. I've created an ObjectDataSource and have a RadGrid hooked up to that. The ObjectDataSource points to the controller source generated by SubSonic for that table. In this instance I'm doing two identical lookup tables for facilities and divisions. I'm trying to create a radgrid with the edit, insert, and delete functions.
Two problems:
1. The insert and edit functions work great on the division table, but not the facilities table. I've checked the source and the two pages are identical. An update on the facilites page results in an error message:
ObjectDataSource could not find a non-generic method 'Update' that has parameters: FacilityName, FacilityDescription, FacilityID, original_FacilityID.
That is true. The signature doesn't include the original_FacilityID. But the update for the Division table doesn't include the original_DivisionID in it either, and it works fine. I can't figure out where this parameter comes from as it's not in any list in the page:
<telerik:GridBoundColumn DataField="DivisionID"
HeaderText="DivisionID" SortExpression="DivisionID"
UniqueName="DivisionID" DataType="System.Int32" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FacilityID" DataType="System.Int32"
HeaderText="FacilityID" SortExpression="FacilityID"
UniqueName="FacilityID" Visible="False">
</telerik:GridBoundColumn>
And the DataSource contains the same definitions:
<asp:ObjectDataSource ID="CmdbDivision" runat="server" DeleteMethod="Delete"
InsertMethod="Insert" OldValuesParameterFormatString="original_{0}"
SelectMethod="FetchAll" TypeName="CMDB.TblDivisionController"
UpdateMethod="Update">
<DeleteParameters>
<asp:Parameter Name="DivisionID" Type="Object" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="DivisionID" Type="Int32" />
<asp:Parameter Name="DivisionName" Type="String" />
<asp:Parameter Name="DivisionDescription" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="DivisionName" Type="String" />
<asp:Parameter Name="DivisionDescription" Type="String" />
</InsertParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DeleteMethod="Delete"
InsertMethod="Insert"
OldValuesParameterFormatString="original_{0}"
SelectMethod="FetchAll"
TypeName="CMDB.TblFacilityController"
UpdateMethod="Update">
<DeleteParameters>
<asp:Parameter Name="FacilityID" Type="Object" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="FacilityID" Type="Int32" />
<asp:Parameter Name="FacilityName" Type="String" />
<asp:Parameter Name="FacilityDescription" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="FacilityName" Type="String" />
<asp:Parameter Name="FacilityDescription" Type="String" />
</InsertParameters>
</asp:ObjectDataSource>
I believe the second problem to be related, as the delete function works on neither page. The facility page fails because of the same signature problem, whereas the division page just refreshes and doesn't do the delete.
Any suggestions? I'm hoping that someone here has some SubSonic with Rad Grid experience and can help me. If not, maybe you're familiar with ways to work around this problem with the original_ID problem.