Hello Every One:
Can some one give me iDeas How do I disable the DataGrid controls in ItemCommand using VB.
For Example I have dropdownlist bound in my DataGrid. Now I want to Disable this control in Datagrid_ItemCo mmand.
I tried like this
''''''''''''''' ''''''''''''''
''''''''''''''' ''''''''''''''
But Unfortunately
CType(e.Item.Ce lls(15).FindCon trol("edit_ddlU serNett"), DropDownList)
returning "Nothing".
Thanx
Regards
Can some one give me iDeas How do I disable the DataGrid controls in ItemCommand using VB.
For Example I have dropdownlist bound in my DataGrid. Now I want to Disable this control in Datagrid_ItemCo mmand.
I tried like this
''''''''''''''' ''''''''''''''
Code:
Select Case e.CommandName Case "Edit" '//Edit Case dgIncentive.EditItemIndex = e.Item.ItemIndex Dim ddlOwner, ddlUser As DropDownList '' Disable ddlOwnerNett And ddlUserNet '' Dim str_Sql As String = "SELECT manager FROM Inc_Agency_Header " & _ " WHERE Incentive_ID = '" & ddlIncentive.SelectedValue & "'" Dim dsManager As DataSet = DataProvider.GetDataInterface.ExecuteQuery(str_Sql) If dsManager.Tables(0).Rows.Count > 0 Then If dsManager.Tables(0).Rows(0).Item("Manager") = 0 Then ddlUser = CType(e.Item.Cells(15).FindControl("edit_ddlUserNett"), DropDownList) ddlUser.Enabled = True End If End If
But Unfortunately
CType(e.Item.Ce lls(15).FindCon trol("edit_ddlU serNett"), DropDownList)
returning "Nothing".
Thanx
Regards
Comment