--------------------
>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.***
|