Selecting rows client side via checkbox

Thread is closed for posting
9 posts, 0 answers
  1. 63F75A2C-1F16-4AED-AFE8-B1BBD57646AD
    63F75A2C-1F16-4AED-AFE8-B1BBD57646AD avatar
    1572 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. DDC49215-ADA0-4A70-B7D4-9F75DDD90E0B
    DDC49215-ADA0-4A70-B7D4-9F75DDD90E0B 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. C7498A83-7E2E-418C-8791-93EF573A7569
    C7498A83-7E2E-418C-8791-93EF573A7569 avatar
    9934 posts
    Member since:
    Nov 2016

    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. DDC49215-ADA0-4A70-B7D4-9F75DDD90E0B
    DDC49215-ADA0-4A70-B7D4-9F75DDD90E0B 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. 6AB3838B-B392-4EDE-97F0-B3F5916D8900
    6AB3838B-B392-4EDE-97F0-B3F5916D8900 avatar
    11100 posts
    Member since:
    Jan 2017

    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. DDC49215-ADA0-4A70-B7D4-9F75DDD90E0B
    DDC49215-ADA0-4A70-B7D4-9F75DDD90E0B 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. C7498A83-7E2E-418C-8791-93EF573A7569
    C7498A83-7E2E-418C-8791-93EF573A7569 avatar
    9934 posts
    Member since:
    Nov 2016

    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. 1890EBE3-A611-4AF6-8750-3E01EBA61ED6
    1890EBE3-A611-4AF6-8750-3E01EBA61ED6 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. C7498A83-7E2E-418C-8791-93EF573A7569
    C7498A83-7E2E-418C-8791-93EF573A7569 avatar
    9934 posts
    Member since:
    Nov 2016

    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

This Code Library is part of the product documentation and subject to the respective product license agreement.