Click here to Skip to main content
15,847,077 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to disable the ajax cascading DropDown list? I want to disable the cascading drop down in edit mode of gridview to disallow users to change the drop down values...
I would add this functionality in selected index changed event of grid view
Posted
Updated 25-Sep-12 19:49pm
v2
Comments
[no name] 26-Sep-12 0:58am    
Any suggestion is appreciated
[no name] 26-Sep-12 1:27am    
solved......

1 solution

protected void GridName_ItemCreated(object sender, GridItemEventArgs e)
{

    if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
    {
        GridEditableItem editFormItem = (GridEditableItem)e.Item;
        //here by specifying any controls's ID u can do READONLY or ENABLED property to TRUE or FALSE
        (DropDownList)editFormItem.FindControl("DropDownIDName").ReadOnly=true;
    }
}


All d Best.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900