Enabled set to false but still able to use datagrid

Discussion in 'ASP .Net Datagrid Control' started by Dave E, Jun 7, 2004.

  1. Dave E

    Dave E Guest

    On my ASP.NET page (using VB.NET) when the user performs a particular action on the page I wish the datagrids to be disabled and not allow their page to be changed or the link button commands to be actioned. Once the user's action is complete I wish to re-enable the grids

    However, when I set the Enabled property to false the grids become greyed out as expected but the user can still change the page, select a different item and click on the various item command link buttons in the grid

    How can I disable the whole grid so that the user can still see it but cannot perform any actions on it

    Thanks
    Dave E, Jun 7, 2004
    #1
    1. Advertising

  2. --------------------
    >From: =?Utf-8?B?RGF2ZSBF?= <>
    >Subject: Enabled set to false but still able to use datagrid
    >Date: Mon, 7 Jun 2004 04:21:02 -0700
    >On my ASP.NET page (using VB.NET) when the user performs a particular action on the page I wish the datagrids to be disabled and not allow their

    page to be changed or the link button commands to be actioned. Once the user's action is complete I wish to re-enable the grids.



    However, when I set the Enabled property to false the grids become greyed out as expected but the user can still change the page, select a different item
    and click on the various item command link buttons in the grid.



    How can I disable the whole grid so that the user can still see it but cannot perform any actions on it?



    Thanks.


    >


    Off the top of my head, a quick workaround could be for you to put an IF clause in the events.

    eg In Datagrid_EditCommand
    if (datagrid.enabled = true)
    {
    //carry out function
    }

    so that if datagrid.enabled is false, it doesn't do anything (though the postback will still occur)

    Hope that helps,

    Michelle

    ***Disclaimer: This posting is provided "as is" with no warranties and confers no rights.***
    Michelle Hlaing, Feb 15, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Amar
    Replies:
    0
    Views:
    540
  2. jrodguitar
    Replies:
    1
    Views:
    266
    =?Utf-8?B?RFdT?=
    Feb 28, 2006
  3. elaine
    Replies:
    2
    Views:
    429
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    May 24, 2007
  4. Amar
    Replies:
    0
    Views:
    207
  5. Karen Grube
    Replies:
    0
    Views:
    122
    Karen Grube
    Nov 24, 2004
Loading...

Share This Page