Selecting rows client side via checkbox

9 posts, 0 answers
  1. Telerik Admin
    Telerik Admin avatar
    1679 posts
    Member since:
    Oct 2004

    Posted 19 May 2006 Link to this post

     

    Requirements

    RadGrid for ASP .NET version

    3.2.0 and later

    .NET version

    1.x

    Visual Studio version

    2002/2003

    Programming language

    VB.NET

    Browser support

    all supported by RadGrid for ASP .NET



    Note: For extended version of the project that supports RadControls for ASP .NET AJAX please review this code library project.

    PROJECT DESCRIPTION

    This project illustrates how to toggle selection for grid row upon checking/unchecking a checkbox client side in GridTemplateColumn.
    Note that the item selection will change only when you click on the corresponding checkbox - clicking any where else will NOT select or deselect the row.
     
  2. Jonathan Channon
    Jonathan Channon avatar
    48 posts
    Member since:
    Nov 2005

    Posted 31 May 2006 Link to this post

    I don't suppose there is a .NET2 version anywhere is there as that is exactly what I am looking for!

    Thanks
  3. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 01 Jun 2006 Link to this post

    Hi Jonathan,

    The code from the example should work under .NET 2.x framework as well. Note that the essential part of it resides in WebForm1.aspx (grid definition and javascript logic) and is common for both .NET environments. Please try it out and let me know whether everything is OK.

    Best,
    Stephen
    the telerik team
  4. Jonathan Channon
    Jonathan Channon avatar
    48 posts
    Member since:
    Nov 2005

    Posted 16 Jun 2006 Link to this post

    This all works fine. I have adapted it but found a problem, I have changed it to a ASP checkbox within a ITemplate Column and added code to move rows client side but when I move the row after I have checked the checkbox it moves the row but sets the checkbox back to unchecked.  Any ideas. Thanks
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 16 Jun 2006 Link to this post


    Hi Jonathan,

    Unfortunately this is one of our "favorite IE features" and it cannot be avoided client-side (you can check this in FF for example) and in this case, we suggest you go ahead and accomplish your scenario with server-side rows reorder in AJAX mode.

    Let us know how it goes.

    Regards,
    Vlad
    the telerik team
  6. Jonathan Channon
    Jonathan Channon avatar
    48 posts
    Member since:
    Nov 2005

    Posted 16 Jun 2006 Link to this post

    That's what I thought. Could you give me an example of re-ordering rows server side.
  7. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 19 Jun 2006 Link to this post

    Hello Jonathan,

    You will find the example you request attached to this message. Note that the changes will be applied on the server when you click the Apply changes on server side button below the grid.

    Best,
    Stephen
    the telerik team
  8. Jeff Roberts
    Jeff Roberts avatar
    47 posts
    Member since:
    Jan 2007

    Posted 04 Apr 2007 Link to this post

    How would I find all the check boxes checked using this method?
  9. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 05 Apr 2007 Link to this post

    Hello Jeff,

    There is an easier way to identify all selected items and perform operations over them further. Please review the following demo demonstrating how to edit all selected items in one turn clicking a button from the command item:

    http://www.telerik.com/demos/aspnet/Grid/Examples/Programming/WebGrid/DefaultCS.aspx

    Further information about the internally recognized grid commands you can find in this documentation article:

    http://www.telerik.com/help/aspnet/grid/?grdCommandReference.html

    Note that the rows in the demo are selectable either when clicking them, dragging a region or via the checkbox from the GridClientSelectColumn.

    In order to restrict the selection only when a checkbox is clicked, refer to the article from the code library section on our site linked below:

    http://www.telerik.com/community/code-library/submission/b311D-ggmet.aspx

    Best regards,
    Stephen
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
Back to Top