DetailGrid with RadComboBox SqlDataSource with SelectParameters souce of DatakeyName

2 posts, 0 answers
  1. Jerry
    Jerry avatar
    1 posts
    Member since:
    Sep 2016

    Posted 03 Aug 2017 Link to this post

    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>

  2. Eyup
    Admin
    Eyup avatar
    3818 posts

    Posted 08 Aug 2017 Link to this post

    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.
Back to Top