Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Enabled set to false but still able to use datagrid

Reply
Thread Tools

Enabled set to false but still able to use datagrid

 
 
Dave E
Guest
Posts: n/a
 
      06-07-2004
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

 
Reply With Quote
 
 
 
 
Michelle Hlaing
Guest
Posts: n/a
 
      02-15-2005

--------------------
>From: =?Utf-8?B?RGF2ZSBF?= <(E-Mail Removed)>
>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.***

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set Enabled to false for multiple web controls elaine ASP .Net 2 05-24-2007 08:13 AM
False positive, false intrusion, false alarm Nick Computer Security 3 04-26-2006 07:40 PM
How Do I set enabled to false on all but one web control on a page Karen Grube ASP .Net Web Controls 0 11-24-2004 08:35 PM
Added CheckBox to a DataGrid Doesn't work with DataGrid.Enabled=False Amar ASP .Net 0 04-06-2004 10:14 AM
Added CheckBox to a DataGrid Doesn't work with DataGrid.Enabled=False Amar ASP .Net Building Controls 0 04-06-2004 10:14 AM



Advertisments