Forums

Edit Items in ASPxGridView using stored procedures and sqldatasource

Last post 7/1/2009 1:23 PM by Arda Develioğlu. 0 replies.
Sort Posts: Previous Next
  • Arda Develioğlu

    Edit Items in ASPxGridView using stored procedures and sqldatasource

    7/1/2009 1:23 PM
    • Not Ranked
    • Joined on 7/1/2009
    • Posts 1

    Hi,

    I use an ASPxGridView to show data from multiple tables with an inner join query. I use a stored procedure to update these datas from multiple tables.

    I created a SqlDataSource to bind them to ASPxGridView.

    But, when I click to Edit button which is created by Columns in the smart tag of ASPxGridView, Nothing happens...

    I had two columns which are not used in stored procedure. For testing, I deleted them and try again, but still It did not work.

    Can anyone inform me about the details of binding stored procedures to ASPxGridView using SqlDataSource to use Edit fuction

    and instruct me about what to do?

     

    Thank you very much.

    Arda

     

     

     

    My ASPxGridView and SqlDataSource code is below:

    <dxwgv:ASPxGridView ID="ASPxGridView1" runat="server" 

                AutoGenerateColumns="False" DataSourceID="KullanicilarDataSource">

                <Columns>

    <dxwgv:GridViewCommandColumn VisibleIndex="0">

    <EditButton Visible="True">

    </EditButton>

    </dxwgv:GridViewCommandColumn>

    <dxwgv:GridViewDataTextColumn FieldName="UserId" VisibleIndex="0" 

    ReadOnly="True">

    </dxwgv:GridViewDataTextColumn>

    <dxwgv:GridViewDataTextColumn FieldName="UserName" VisibleIndex="2">

    </dxwgv:GridViewDataTextColumn>

    <dxwgv:GridViewDataTextColumn FieldName="Ad" VisibleIndex="3">

    </dxwgv:GridViewDataTextColumn>

    <dxwgv:GridViewDataTextColumn FieldName="Soyad" VisibleIndex="4">

    </dxwgv:GridViewDataTextColumn>

    <dxwgv:GridViewDataTextColumn FieldName="TelefonNo" VisibleIndex="5">

    </dxwgv:GridViewDataTextColumn>

    <dxwgv:GridViewDataTextColumn FieldName="TCKimlikNo" VisibleIndex="6">

    </dxwgv:GridViewDataTextColumn>

    <dxwgv:GridViewDataTextColumn FieldName="Adres" VisibleIndex="7">

    </dxwgv:GridViewDataTextColumn>

    <dxwgv:GridViewDataTextColumn FieldName="LoweredEmail" VisibleIndex="8">

    </dxwgv:GridViewDataTextColumn>

    <dxwgv:GridViewDataCheckColumn FieldName="IsLockedOut" VisibleIndex="9">

    </dxwgv:GridViewDataCheckColumn>

    <dxwgv:GridViewDataDateColumn FieldName="CreateDate" VisibleIndex="10" 

    ReadOnly="True">

    </dxwgv:GridViewDataDateColumn>

    <dxwgv:GridViewDataDateColumn FieldName="LastLoginDate" VisibleIndex="11" 

    ReadOnly="True">

    </dxwgv:GridViewDataDateColumn>

    </Columns>

                <Settings ShowFilterRow="True" />

            </dxwgv:ASPxGridView>

            <asp:SqlDataSource ID="KullanicilarDataSource" runat="server" 

                ConnectionString="<%$ ConnectionStrings:DemoConnectionString %>" 

     

    SelectCommand="SELECT aspnet_Users.UserId, aspnet_Users.UserName, KullaniciProfiller.Ad, KullaniciProfiller.Soyad, KullaniciProfiller.TelefonNo, KullaniciProfiller.TCKimlikNo, KullaniciProfiller.Adres, aspnet_Membership.LoweredEmail, aspnet_Membership.IsLockedOut, aspnet_Membership.CreateDate, aspnet_Membership.LastLoginDate FROM aspnet_Users INNER JOIN KullaniciProfiller ON aspnet_Users.UserId = KullaniciProfiller.KullaniciID INNER JOIN aspnet_Membership ON aspnet_Users.UserId = aspnet_Membership.UserId" 

    UpdateCommand="KullaniciGuncelle" UpdateCommandType="StoredProcedure">

    <UpdateParameters>

    <asp:Parameter Name="UserId" Type="Object" />

    <asp:Parameter Name="UserName" Type="String" />

    <asp:Parameter Name="Ad" Type="String" />

    <asp:Parameter Name="Soyad" Type="String" />

    <asp:Parameter Name="TelefonNo" Type="Int64" />

    <asp:Parameter Name="TCKimlikNo" Type="Int64" />

    <asp:Parameter Name="Adres" Type="String" />

    <asp:Parameter Name="Email" Type="String" />

    <asp:Parameter Name="IsLockedOut" Type="Boolean" />

    </UpdateParameters>

            </asp:SqlDataSource>

More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.