This is a migrated thread and some comments may be shown as answers.

DetailGrid with RadComboBox SqlDataSource with SelectParameters souce of DatakeyName

1 Answer 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jerry
Top achievements
Rank 1
Jerry asked on 03 Aug 2017, 02:02 PM

I have a Hierarchical grid with GridTemplateColumn containing a RadComboBox whose datasource is set to the source below.  I need to be able to pass parameters to the Selecting StoredProcedure.  The parameters will change each row.  I would like them to come from the datacontainer or datakeynames, both of which contain the values.  How do I configure the SelectParameters to achieve this?

 

 

    <asp:SqlDataSource ID="sqlProduct" runat="server" ConnectionString="<%$ ConnectionStrings:XRMConnectionString %>"
        SelectCommand="spDailyBalancing_ProductVolume_Select" SelectCommandType="StoredProcedure" OnSelecting="sqlProduct_Selecting">
        <SelectParameters>
            <asp:ControlParameter Name="UtilityId" ControlID="cboUtility" DefaultValue="0" PropertyName="SelectedValue" />
            <asp:ControlParameter ControlID="grdList" PropertyName="DataItemContainer" Name="ReceiptPointId"></asp:ControlParameter>
            <asp:ControlParameter ControlID="grdList" PropertyName="DataItemContainer" Name="BaseloadDate"></asp:ControlParameter>
        </SelectParameters>
    </asp:SqlDataSource>

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 08 Aug 2017, 07:41 AM
Hello Jerry,

I've already replied to this query in your formal support ticket. I suggest that we continue our technical conversation on the mentioned thread.

Nevertheless, I will post the reply here so other developers may find it useful as well:

As explained in the following section, the Batch editing generates only 1 single server-side control for each row and it is not possible to have different source for each separate row. Therefore, I am afraid this requirement is not supported with Batch editing:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/rows/accessing-cells-and-rows#accessing-controls-
in-batch-edit-mode


Also, using RadComboBox is not supported with Batch editing by default since it has complex features which are not automatically integrated with Batch mode. We suggest using RadDropDownList instead:
http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx

You can check InPlace editing mode as an alternative:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/data-editing/edit-mode/in-place

Regards,
Eyup
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Jerry
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or