Enabled set to false but still able to use datagrid

D

Dave E

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
 
M

Michelle Hlaing

--------------------
From: =?Utf-8?B?RGF2ZSBF?= <[email protected]>
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.***
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top