Hello everybody,
I have seen many posts and comments about this but none do works,
I have a RadGrid with a GridDropDownColumn, I tend to make it invisible in Edit Mode(when I click Edit Button of selected row) under specific Condition in Code Behind.It is not in Inplace Mode.Here Is My Source Code :
I want to hide "SiteOwnerId" under Specific Condition.
I have seen many posts and comments about this but none do works,
I have a RadGrid with a GridDropDownColumn, I tend to make it invisible in Edit Mode(when I click Edit Button of selected row) under specific Condition in Code Behind.It is not in Inplace Mode.Here Is My Source Code :
I want to hide "SiteOwnerId" under Specific Condition.
<
telerik:RadGrid
ID
=
"RadGridUserInfo"
CssClass
=
"myRadGrid"
GridLines
=
"None"
runat
=
"server"
AllowAutomaticDeletes
=
"True"
PageSize
=
"12"
AllowPaging
=
"True"
AutoGenerateColumns
=
"False"
OnItemUpdated
=
"RadGridUserInfo_ItemUpdated"
OnItemDeleted
=
"RadGridUserInfo_ItemDeleted"
OnItemInserted
=
"RadGridUserInfo_ItemInserted"
OnDataBound
=
"RadGridUserInfo_DataBound"
AllowFilteringByColumn
=
"True"
OnItemCreated
=
"RadGridUserInfo_ItemCreated"
OnInsertCommand
=
"RadGridUserInfo_InsertCommand"
OnUpdateCommand
=
"RadGridUserInfo_UpdateCommand"
OnNeedDataSource
=
"RadGridUserInfo_NeedDataSource"
OnEditCommand
=
"RadGridUserInfo_EditCommand"
OnItemDataBound
=
"RadGridUserInfo_ItemDataBound"
OnDeleteCommand
=
"RadGridUserInfo_DeleteCommand"
oncolumncreated
=
"RadGridUserInfo_ColumnCreated"
>
<
SelectedItemStyle
Font-Names
=
"Tahoma"
Font-Size
=
"11px"
ForeColor
=
"#8abe23"
/>
<
MasterTableView
Width
=
"100%"
CommandItemDisplay
=
"TopAndBottom"
DataKeyNames
=
"UserInfoId"
HorizontalAlign
=
"NotSet"
AutoGenerateColumns
=
"False"
Font-Names
=
"Tahoma"
EditFormSettings-FormStyle-ForeColor
=
"Black"
Font-Size
=
"11px"
>
<
CommandItemTemplate
>
<
div
style
=
"padding: 5px 5px;"
dir
=
"rtl"
>
asp:LinkButton ID="LinkButton4" runat="server" Font-Names="Tahoma" CommandName="RebindGrid"><
img
style
=
"border:0px;vertical-align:middle;"
alt
=
""
src
=
"../Images/Icons/Refresh.gif"
/>به روزآوري اطلاعات</
asp:LinkButton
>
</
div
>
</
CommandItemTemplate
>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
UniqueName
=
"EditCommandColumn"
>
<
ItemStyle
CssClass
=
"MyImageButton"
/>
</
telerik:GridEditCommandColumn
>
<
telerik:GridButtonColumn
ConfirmText
=
"آيا از حذف ركورد جاري مطمئنيد؟"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"حذف ركورد جاري"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
Text
=
"حذف"
UniqueName
=
"DeleteColumn"
>
<
ItemStyle
HorizontalAlign
=
"Center"
CssClass
=
"MyImageButton"
/>
</
telerik:GridButtonColumn
>
<
telerik:GridDropDownColumn
DataField
=
"SiteOwnerId"
EditFormColumnIndex
=
"1"
HeaderText
=
"شركت فروشنده پنل"
UniqueName
=
"SiteOwnerId"
ListTextField
=
"SiteOwnerName"
ListValueField
=
"SiteOwnerId"
DataSourceID
=
"sds_SiteOwner"
ColumnEditorID
=
"GridDropDownEditor"
>
</
telerik:GridDropDownColumn
>
</
Columns
>
<
EditFormSettings
ColumnNumber
=
"3"
CaptionDataField
=
"UserInfoId"
CaptionFormatString
=
"ويرايش اطلاعات"
InsertCaption
=
""
>
<
EditColumn
ButtonType
=
"ImageButton"
InsertText
=
"ثبت پنل"
UpdateText
=
"ويرايش پنل"
UniqueName
=
"EditCommandColumn1"
CancelText
=
"لغو ويرايش"
>
</
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
</
telerik:RadGrid
>