Hi,
We have a rad grid for which , EnableHeaderContextMenu= true is set.
We are able to get the menu , but a few item gets repeated ( without checkbox). Please find the screen shot and the code attached.
Kindly help us resolving this issue as early as possible , as we have the deployment very soon.
Thanks,
Sudha.
We have a rad grid for which , EnableHeaderContextMenu= true is set.
We are able to get the menu , but a few item gets repeated ( without checkbox). Please find the screen shot and the code attached.
Kindly help us resolving this issue as early as possible , as we have the deployment very soon.
Thanks,
Sudha.
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function OnClientItemOpening(menu, args) {
var item = args.get_item();
item.get_items().getItem(0).get_element().style.display = "none";
item.get_items().getItem(1).get_element().style.display = "none";
item.get_items().getItem(7).get_element().style.display = "none";
item.get_items().getItem(8).get_element().style.display = "none";
item.get_items().getItem(12).get_element().style.display = "none";
item.get_items().getItem(13).get_element().style.display = "none";
}
</
script
>
</
telerik:RadCodeBlock
>
<
telerik:RadGrid
ID
=
"dgFileList"
OnItemDataBound
=
"dgFileList_ItemDataBound"
OnSortCommand
=
"dgFileList_SortCommand"
runat
=
"server"
Skin
=
"SLB"
CellSpacing
=
"1"
CellPadding
=
"0"
BorderStyle
=
"Solid"
BorderWidth
=
"0px"
Width
=
"100%"
Height
=
"359px"
AutoGenerateColumns
=
"False"
GridLines
=
"None"
AllowSorting
=
"True"
HeaderStyle-Height
=
"30px"
EnableEmbeddedSkins
=
"False"
ImagesPath
=
"~/Skins/SLB/Grid"
EnableHeaderContextMenu
=
"true"
>
<
HeaderContextMenu
OnClientItemOpening
=
"OnClientItemOpening"
>
</
HeaderContextMenu
>
<
ClientSettings
>
<
Scrolling
AllowScroll
=
"true"
UseStaticHeaders
=
"true"
/>
<
Selecting
AllowRowSelect
=
"true"
/>
<
ClientEvents
OnGridCreated
=
"GridCreated_FileList"
/>
<
Resizing
AllowResizeToFit
=
"true"
AllowColumnResize
=
"True"
AllowRowResize
=
"false"
ResizeGridOnColumnResize
=
"true"
ClipCellContentOnResize
=
"false"
EnableRealTimeResize
=
"true"
/>
</
ClientSettings
>
<
HeaderStyle
Font-Underline
=
"False"
Height
=
"30px"
Width
=
"100%"
/>
<
ItemStyle
Height
=
"100%"
/>
<
AlternatingItemStyle
Height
=
"100%"
/>
<
MasterTableView
AllowNaturalSort
=
"true"
AllowCustomSorting
=
"true"
ShowHeadersWhenNoRecords
=
"true"
NoMasterRecordsText
=
"No files found for the selected product."
>
<
Columns
>
<
telerik:GridBoundColumn
UniqueName
=
"FileID"
DataField
=
"FileID"
HeaderText
=
"FileID"
Display
=
"false"
>
<
HeaderStyle
Wrap
=
"False"
HorizontalAlign
=
"Center"
/>
<
ItemStyle
Wrap
=
"true"
HorizontalAlign
=
"Left"
CssClass
=
"RadGridRow"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"ProductDetails"
DataField
=
"ProductDetails"
HeaderText
=
"Description"
SortExpression
=
"ProductDetails"
Visible
=
"true"
Display
=
"true"
>
<
HeaderStyle
Width
=
"200"
Wrap
=
"false"
HorizontalAlign
=
"Center"
/>
<
ItemStyle
Wrap
=
"true"
HorizontalAlign
=
"Left"
CssClass
=
"RadGridRow"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Version"
DataField
=
"Version"
HeaderText
=
"Version"
SortExpression
=
"Version"
Visible
=
"true"
>
<
HeaderStyle
Width
=
"70"
Wrap
=
"False"
HorizontalAlign
=
"Center"
/>
<
ItemStyle
Wrap
=
"true"
HorizontalAlign
=
"Left"
CssClass
=
"RadGridRow"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Release"
DataField
=
"Release"
HeaderText
=
"Released"
SortExpression
=
"ReleaseDate"
HeaderStyle-Width
=
"65"
>
<
HeaderStyle
Width
=
"75"
Wrap
=
"False"
HorizontalAlign
=
"Center"
/>
<
ItemStyle
Wrap
=
"true"
HorizontalAlign
=
"Left"
CssClass
=
"RadGridRow"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"ContentType"
DataField
=
"ContentType"
HeaderText
=
"ContentType"
SortExpression
=
"ContentType"
Visible
=
"true"
>
<
HeaderStyle
Width
=
"93"
Wrap
=
"False"
HorizontalAlign
=
"Center"
/>
<
ItemStyle
Wrap
=
"true"
HorizontalAlign
=
"Left"
CssClass
=
"RadGridRow"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Published"
DataField
=
"Published"
HeaderText
=
"Published"
SortExpression
=
"PublishedDate"
Visible
=
"False"
>
<
HeaderStyle
Width
=
"80"
Wrap
=
"False"
HorizontalAlign
=
"Center"
/>
<
ItemStyle
Wrap
=
"true"
HorizontalAlign
=
"Left"
CssClass
=
"RadGridRow"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Platform"
DataField
=
"Platform"
HeaderText
=
"Platform"
SortExpression
=
"Platform"
Visible
=
"true"
>
<
HeaderStyle
Width
=
"105"
Wrap
=
"true"
HorizontalAlign
=
"Center"
/>
<
ItemStyle
Wrap
=
"true"
HorizontalAlign
=
"Left"
CssClass
=
"RadGridRow"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Description"
DataField
=
"Description"
HeaderText
=
"Description"
SortExpression
=
"Description"
Visible
=
"false"
>
<
HeaderStyle
Wrap
=
"False"
HorizontalAlign
=
"Center"
/>
<
ItemStyle
Wrap
=
"true"
HorizontalAlign
=
"Left"
CssClass
=
"RadGridRow"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridButtonColumn
UniqueName
=
"btnDetails"
ButtonType
=
"ImageButton"
Text
=
"Details"
HeaderText
=
"Details"
ImageUrl
=
"Images/Info.png"
>
<
HeaderStyle
Width
=
"50"
Wrap
=
"False"
HorizontalAlign
=
"Left"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
CssClass
=
"RadGridRow"
Font-Bold
=
"true"
/>
</
telerik:GridButtonColumn
>
<
telerik:GridButtonColumn
UniqueName
=
"btnDownload"
ButtonType
=
"ImageButton"
HeaderText
=
"Download"
Text
=
"Available for download"
ImageUrl
=
"Images/Download.png"
>
<
HeaderStyle
Width
=
"65"
Wrap
=
"False"
HorizontalAlign
=
"Left"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
CssClass
=
"RadGridRow"
/>
</
telerik:GridButtonColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"FileSize"
DataField
=
"formatedsize"
HeaderText
=
"Size[KB]"
SortExpression
=
"size"
Visible
=
"true"
>
<
HeaderStyle
Width
=
"70"
Wrap
=
"False"
HorizontalAlign
=
"Left"
/>
<
ItemStyle
Wrap
=
"true"
HorizontalAlign
=
"Left"
CssClass
=
"RadGridRow"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"ThirdPartyEnabled"
DataField
=
"ThirdPartyEnabled"
HeaderText
=
"ThirdPartyEnabled"
Visible
=
"false"
>
<
HeaderStyle
Wrap
=
"False"
HorizontalAlign
=
"Center"
/>
<
ItemStyle
Wrap
=
"true"
HorizontalAlign
=
"Left"
CssClass
=
"RadGridRow"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"FileName"
DataField
=
"FileName"
HeaderText
=
"FileName"
SortExpression
=
"FileName"
>
<
HeaderStyle
Width
=
"135"
Wrap
=
"False"
HorizontalAlign
=
"Center"
/>
<
ItemStyle
Wrap
=
"false"
HorizontalAlign
=
"Left"
CssClass
=
"RadGridRow"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"RelatedLinks"
DataField
=
"RelatedLinks"
HeaderText
=
"RelatedLinks"
SortExpression
=
"RelatedLinks"
>
<
HeaderStyle
Wrap
=
"false"
HorizontalAlign
=
"Center"
/>
<
ItemStyle
Wrap
=
"true"
HorizontalAlign
=
"Left"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"fileSizeValue"
DataField
=
"size"
HeaderText
=
"filesize"
Display
=
"false"
>
<
HeaderStyle
Width
=
"0px"
/>
<
ItemStyle
Width
=
"0px"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"MD5CheckSum"
DataField
=
"MD5CheckSum"
HeaderText
=
"MD5CheckSum"
Display
=
"false"
>
<
HeaderStyle
Width
=
"0px"
/>
<
ItemStyle
Width
=
"0px"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"CollectionName"
DataField
=
"CollectionName"
HeaderText
=
"CollectionName"
SortExpression
=
"CollectionName"
Visible
=
"false"
>
<
HeaderStyle
Width
=
"0"
Wrap
=
"false"
HorizontalAlign
=
"Center"
/>
<
ItemStyle
Wrap
=
"true"
HorizontalAlign
=
"Left"
/>
</
telerik:GridBoundColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
CancelImageUrl
=
"~/Skins/SLB/Grid\Cancel.gif"
EditImageUrl
=
"~/Skins/SLB/Grid\Edit.gif"
FilterControlAltText
=
"Filter EditCommandColumn column"
FilterImageUrl
=
"~/Skins/SLB/Grid\Filter.gif"
InsertImageUrl
=
"~/Skins/SLB/Grid\Update.gif"
SortAscImageUrl
=
"~/Skins/SLB/Grid\SortAsc.gif"
SortDescImageUrl
=
"~/Skins/SLB/Grid\SortDesc.gif"
UpdateImageUrl
=
"~/Skins/SLB/Grid\Update.gif"
>
</
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
</
telerik:RadGrid
>