RadGrid1 dont work in MySQL Provider + parameter

2 posts, 0 answers
  1. andalit
    andalit avatar
    2 posts
    Member since:
    Mar 2018

    Posted 01 Mar 2018 Link to this post

    RadGrid1 + SqlDataSource1(SQL NOT USED parameter) = WORK

    GridView1 (Standart) + SqlDataSource1(SQL USED parameter) = WORK

    RadGrid1 + SqlDataSource1 (SQL USED parameter) = NOT WORK

    Problem: Only telerik not updated schema and not set data in Grid(empty). Standalone GridView - worked. It is bub or please give informations what is user parameters in mySQL query.

    Manual dont worked (https://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/column-types/defaultcs.aspx)

     

    RadGrid1

    <telerik:RadGrid ID="RadGrid1" runat="server" Culture="ru-RU" DataSourceID="SqlDataSource1" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" OnDeleteCommand="RadGrid1_DeleteCommand" OnEditCommand="RadGrid1_EditCommand" AllowAutomaticDeletes="True" Skin="Glow" CellSpacing="-1" GridLines="Both" Width="603px">
    <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
            <ExportSettings>
                <Pdf PageWidth="">
                </Pdf>
            </ExportSettings>
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="SqlDataSource1">
                <Columns>
                    <telerik:GridBoundColumn DataField="id" DataType="System.Int32" FilterControlAltText="Filter id column" HeaderText="id" ReadOnly="True" SortExpression="id" UniqueName="id">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="title" FilterControlAltText="Filter title column" HeaderText="title" SortExpression="title" UniqueName="title">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="type" FilterControlAltText="Filter type column" HeaderText="type" SortExpression="type" UniqueName="type">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="city" FilterControlAltText="Filter city column" HeaderText="city" SortExpression="city" UniqueName="city">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="address" FilterControlAltText="Filter address column" HeaderText="address" SortExpression="address" UniqueName="address">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="area" DataType="System.Single" FilterControlAltText="Filter area column" HeaderText="area" SortExpression="area" UniqueName="area">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="comment" FilterControlAltText="Filter comment column" HeaderText="comment" SortExpression="comment" UniqueName="comment">
                    </telerik:GridBoundColumn>
                </Columns>
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>
            </MasterTableView>
    </telerik:RadGrid>

     

    SqlDataSource1

    <asp:SqlDataSource ID="SqlDataSource1"
        runat="server"
        ConnectionString="<%$ ConnectionStrings:xesko %>"
          ProviderName="<%$ ConnectionStrings:xesko.ProviderName %>"
        SelectCommand="SELECT id, title, type, city, address, area, comment FROM building WHERE (id IN (SELECT id_building FROM user_atributes WHERE (id_user = @id_user)))"
     
      <SelectParameters>
        <asp:Parameter Name="id_user" Type="Int32" DefaultValue="100" />
      </SelectParameters>
     
    </asp:SqlDataSource>

     

    GridView1 - standart - work

    <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1"></asp:GridView>

     

    USED:

    Visual Studio 2017 (15.5.7)

    MySQL server 5.6

    MySQL for Visual Studio 2.0.5 (MySQL Database (MySQL Data Provider))

    MySQL Connector/ NET  6.9.9

    Telerik ASP.NET Ajax 2017.2.503

     

     

  2. andalit
    andalit avatar
    2 posts
    Member since:
    Mar 2018

    Posted 01 Mar 2018 in reply to andalit Link to this post

    @id_user - parameter in query mySQL
Back to Top