hello
I am using a radgrid with a master table view and details table, I can update my master table view with a stored procedure however I cannot update detail table with another stored procedure. The two updates must be done simultaneously with the save button of radgrid in edit mode.
Here is what I did for my master table view, it works and i would like to do the same button on my detail table, Can you help me pls
protected void RadGrid1_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
GridEditableItem editedItem = e.Item as GridEditableItem;
string pID_OF = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["ID_OF"].ToString();
string pNO_WO = (editedItem["NO_OF"].Controls[0] as TextBox).Text;
string pRef = (editedItem["CodeArticle"].Controls[0] as TextBox).Text;
string pQte = (editedItem["QteLancee"].Controls[0] as TextBox).Text;
string pStatut_WO = (editedItem["StatutOF"].Controls[0] as TextBox).Text;
string pDate_WO = (editedItem["DateLancement"].Controls[0] as TextBox).Text;
string pID_Affectation = (editedItem["ID_Affectation"].FindControl("RadCombobox1") as RadComboBox).SelectedValue;
try
{
SqlDSListeOF.UpdateParameters["pID_OF"].DefaultValue = pID_OF;
SqlDSListeOF.UpdateParameters["pNO_WO"].DefaultValue = pNO_WO;
SqlDSListeOF.UpdateParameters["pRef"].DefaultValue = pRef;
SqlDSListeOF.UpdateParameters["pQte"].DefaultValue = pQte;
SqlDSListeOF.UpdateParameters["pStatut_WO"].DefaultValue = pStatut_WO;
SqlDSListeOF.UpdateParameters["pDate_WO"].DefaultValue = pDate_WO;
SqlDSListeOF.UpdateParameters["pID_Affectation"].DefaultValue = pID_Affectation;
SqlDSListeOF.Update();
}
catch (Exception ex)
{
e.Canceled = true;
ErrorAffectation.Text = "Impossible de mettre à jour . " + ex.Message;
}
}
Trying to use an ODataDataSource with a RadSearchBox. When I try to use it, I get the following error:
The query specified in the URI is not valid. The value for OData query '$orderby' cannot be empty.
Is there a way to set an orderby that I can pass? I don't see an option (or maybe I'm going nuts - could be) and it appears as though the ODataDataSource is just passing a blank $orderby= in the query string.
Thanks,
Richard
<telerik:RadODataDataSource runat="server" ID="ODataDataSourceIBQueue"> <Transport Read-DataType="JSONP"> <Read Url="http://localhost/NiceWebApp/InsadBlackBoxModelService.svc/" /> </Transport> <Schema> <telerik:DataModel ModelID="IBQueue" Set="IBQueues"> <telerik:DataModelField FieldName="Code" /> <telerik:DataModelField FieldName="Description" /> <telerik:DataModelField FieldName="Notes" /> <telerik:DataModelField FieldName="QueueID" /> <telerik:DataModelField FieldName="QueueType" /> </telerik:DataModel> </Schema> </telerik:RadODataDataSource> <telerik:RadComboBox runat="server" ID="RadComboBox1" EnableLoadOnDemand="true" DataModelID="IBQueue" DataTextField="Code" DataValueField="QueueID" ODataDataSourceID="ODataDataSourceIBQueue"> </telerik:RadComboBox><telerik:RadComboBox runat="server" ID="RadComboBox2" EnableLoadOnDemand="true"> <WebServiceSettings Path="http://localhost/NiceWebApp/InsadBlackBoxModelService.svc"> <ODataSettings ResponseType="JSONP"> <Entities> <telerik:ODataEntityType Name="IBQueue" DataValueField="QueueID" DataTextField="Code" /> </Entities> <EntityContainer> <telerik:ODataEntitySet EntityType="IBQueue" Name="IBQueues" /> </EntityContainer> </ODataSettings> </WebServiceSettings> </telerik:RadComboBox>
HTTP/1.1 302 FoundConnection: Keep-AliveContent-Length: 321Date: Tue, 18 Jun 2013 19:26:16 GMTLocation: /(S(1z3r2a0jbjtlcjtx4j00pwta))/Northwind/Northwind.svc/Orders?$callback=jQuery19107677443233304048_1371583576801&%24format=json&%24inlinecount=allpages&%24top=20&%24filter=&%24orderby=Server: Microsoft-IIS/7.5X-Powered-By: ASP.NETAccess-Control-Allow-Origin: *Access-Control-Allow-Methods: GETAccess-Control-Allow-Headers: Accept, Origin, Content-Type, MaxDataServiceVersionAccess-Control-Expose-Headers: DataServiceVersion<html><head><title>Object moved</title></head><body><h2>Object moved to <a href="/(S(1z3r2a0jbjtlcjtx4j00pwta))/Northwind/Northwind.svc/Orders?$callback=jQuery19107677443233304048_1371583576801&%24format=json&%24inlinecount=allpages&%24top=20&%24filter=&%24orderby=">here</a>.</h2></body></html><telerik:RadODataDataSource ID="dsComboBoxes" runat="server" ClientIDMode="Static"></telerik:RadODataDataSource> <telerik:RadComboBox ID="cbxQuickAdd" runat="server" Width="100%" Height="190px" Skin="Simple" EnableLoadOnDemand="true" EmptyMessage="Type to Filter" EnableItemCaching="true" ODataDataSourceID="dsComboBoxes" DataModelID="Resource" DataTextField="Description" DataValueField="ID"></telerik:RadComboBox>dsComboBoxes.Transport.Read.Url = ConfigurationManager.AppSettings.GetURL("BindingServiceURL");dsComboBoxes.Transport.Read.DataType = ODataSourceResponseType.JSONP; DataModel quickAdd = new DataModel(){ ModelID = groupType.Singularize(), Set = groupType};quickAdd.Fields.Add(new DataModelField() { FieldName = "ID" });quickAdd.Fields.Add(new DataModelField() { FieldName = "Description" });dsComboBoxes.Schema.Add(quickAdd);<telerik:RadODataDataSource ID="RadODataSource1" runat="server"> <Transport> <Read Url="http://localhost:8989/ODService.svc/" DataType="XML" /> </Transport> <Schema> <telerik:DataModel ModelID="Thing" Set="Things"> <telerik:DataModelField FieldName="Id" /> <telerik:DataModelField FieldName="Name" /> <telerik:DataModelField FieldName="Value" /> </telerik:DataModel> </Schema></telerik:RadODataDataSource><telerik:RadTreeView ID="RadTreeView1" Runat="server" DataFieldID="Id" DataModelID="Thing" ODataDataSourceID="RadODataSource1"></telerik:RadTreeView><?xmlversion="1.0"encoding="iso-8859-1"standalone="yes"?><feedxml:base="http://localhost:8989/ODService.svc/"xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"xmlns="http://www.w3.org/2005/Atom"><titletype="text">Things</title><id>http://localhost:8989/ODService.svc/Things</id><updated>2012-07-03T10:27:17Z</updated><linkrel="self"title="Things"href="Things"/><entry><id>http://localhost:8989/ODService.svc/Things(0)</id><titletype="text"></title><updated>2012-07-03T10:27:17Z</updated><author><name/></author><linkrel="edit"title="Thing"href="Things(0)"/><categoryterm="RadApp.Data.Model.Thing"scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><contenttype="application/xml"><m:properties><d:Idm:type="Edm.Int32">0</d:Id><d:Name>Thing0</d:Name><d:Value>e55187e0-1439-4ac8-984b-504236caf274</d:Value></m:properties></content></entry><entry><id>http://localhost:8989/ODService.svc/Things(1)</id><titletype="text"></title><updated>2012-07-03T10:27:17Z</updated><author><name/></author><linkrel="edit"title="Thing"href="Things(1)"/><categoryterm="RadApp.Data.Model.Thing"scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><contenttype="application/xml"><m:properties><d:Idm:type="Edm.Int32">1</d:Id><d:Name>Thing1</d:Name><d:Value>cfb491c8-9a07-4393-a539-5d7078cc9ded</d:Value></m:properties></content></entry><entry><id>http://localhost:8989/ODService.svc/Things(2)</id><titletype="text"></title><updated>2012-07-03T10:27:17Z</updated><author><name/></author><linkrel="edit"title="Thing"href="Things(2)"/><categoryterm="RadApp.Data.Model.Thing"scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><contenttype="application/xml"><m:properties><d:Idm:type="Edm.Int32">2</d:Id><d:Name>Thing2</d:Name><d:Value>7daecdaa-4a69-4f61-87f6-55eaca455ccc</d:Value></m:properties></content></entry></feed>
<div id="RadTreeView1" class="RadTreeView RadTreeView_Clear"> <input id="RadTreeView1_ClientState" name="RadTreeView1_ClientState" type="hidden" autocomplete="off" value="{"expandedNodes":[],"collapsedNodes":[],"logEntries":[],"selectedNodes":[],"checkedNodes":[],"scrollPosition":0}"></div>