Forums

get row value by checkbox

Last post 2/19/2009 7:21 AM by Wang Qi. 6 replies.
Sort Posts: Previous Next
  • snop bear

    get row value by checkbox

    2/12/2009 3:43 AM
    • Not Ranked
    • Joined on 2/9/2008
    • Egypt
    • Posts 11

     HI all i have got a problem with this issue

    i have aspxgridview  with checkbox in the header as the same as this project

    http://demos.devexpress.com/ASPxGridViewDemos/Selection/SelectionAdv.aspx

    and i have a bit field in the database for unactive users

    all i want to do just click on a button to get all rows value  that  were checked by loop in C#

    thank you devexpress support teamYesBig Smile

  • Nathan (DevExpress)

    Re: get row value by checkbox

    2/12/2009 4:05 AM
    • Top 25 Contributor
    • Joined on 4/23/2007
    • Posts 1,310

     Hello,

    You can use this method: GetSelectedFieldValues

    Thanks, Nathan.
    R&D, .NET Team, Developer Express Inc.
    P.S. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/Support/Center
  • snop bear

    Re: get row value by checkbox

    2/12/2009 6:12 AM
    • Not Ranked
    • Joined on 2/9/2008
    • Egypt
    • Posts 11

    Big Smile thank you for your reply

    i have been work with this technick but that am not looking for

    all i want just do get the rows values in the server side not  in the clint side by a loop shall you pleaseBig Smile

  • Nathan (DevExpress)

    Re: get row value by checkbox

    2/12/2009 6:31 AM
    • Top 25 Contributor
    • Joined on 4/23/2007
    • Posts 1,310

     You can use the server-side GetSelectedFieldValues method:

    List<object> selectedCities = ASPxGridView2.GetSelectedFieldValues("City");

    For information on traversing through data rows, please see Traversing Rows

    Thanks, Nathan.
    R&D, .NET Team, Developer Express Inc.
    P.S. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/Support/Center
  • snop bear

    Re: get row value by checkbox

    2/12/2009 8:01 AM
    • Not Ranked
    • Joined on 2/9/2008
    • Egypt
    • Posts 11

     Hi Nathan  thank you for your replay

    i think you miss understand what i am talking about or i didn't describe it will any way.......

    this is my project just only contain the web form i have mentioned before and i have uploaded into

    http://www.4shared.com/file/87302607/f1ccf47a/Vip-Gold.html

    http://rapidshare.com/files/197182807/Vip-Gold.rar

    so trace it and with one table in database

    all i want in click button get the primerykey value witch selected vai checkboxes and active the user  all of these process just done in the server side please..

    Which is in

    protected void btnActive_Click(object sender, EventArgs e)

     

     

  • Nathan (DevExpress)

    Re: get row value by checkbox

    2/13/2009 6:44 AM
    • Top 25 Contributor
    • Joined on 4/23/2007
    • Posts 1,310

     Hello,

    I think you'd better send your project or a sample project to our Support Center.

    Thanks, Nathan.
    R&D, .NET Team, Developer Express Inc.
    P.S. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/Support/Center
  • Wang Qi

    Re: get row value by checkbox

    2/19/2009 7:21 AM
    • Not Ranked
    • Joined on 2/19/2009
    • Posts 4

    Nathan (Developer Express):

     Hello,

    You can use this method: GetSelectedFieldValues

     

    hi,

     if this gridview have 2 rows . I select one row.   GetSelectedFieldValues("ID").Count = 1; And then I unselect this row, I want any row is selected.as result,GetSelectedFieldValues("ID").Count = 1, why is 1? it should be 0!

    Help

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.