Hi,
Well, i have a problem with the radcontextmenu. Inside an ItemTemplate i use a RadListView to list some contracts i can choose from.
This radcontextmenu i add on an imageclick. It shows up when i click on a image. The folowing i added to the webusercontrol.
Ok, I explain now what problem i got now, and what i allready tried to get it work properly.
First thing, i have everything placed in a radAjaxPanel. When i click my image (imgContractBtn1), it shows the contextmenu! It has the radListView filled with some contracts with images and some text on it. Then when i click the imgButton (imgMasker), it fires the onitemcommand of the RadListView and it postback. So my selected item is selected and everything works great, except ajax. It loads my screen with everything what should work. Everything works great, except for the ajax thing.
so, when i try putting on a radajaxpanel inside the radmenu itemtemplate of the radcontextmenu, Ajax works fine, but the contextmenu stays open with all the items of the radListView. It close when i click the white space in the radcontextmenu! so, the functionality of the radmenuitem works.
My final question is, how can i make this work properly?
i didn't found such scenary yet on the forum, so can someone help me? ofcoarse i allready tried a lot of things like instead of the normal image button i used a radbutton, no effect.
ofcoarse there is another solution for this, is that i add a lot of controls to the ajaxmanager, but then again, the contextmenu didn't close when i clicked my imgMasker (imagebutton)
Best regards,
Fandy Backers
Well, i have a problem with the radcontextmenu. Inside an ItemTemplate i use a RadListView to list some contracts i can choose from.
This radcontextmenu i add on an imageclick. It shows up when i click on a image. The folowing i added to the webusercontrol.
function showMenuC(e) {
var contextMenu1 = $find("<%= RadContextC1.ClientID %>");
contextMenu1.showAt(20, 135);
$telerik.cancelRawEvent(e);
}
<
asp:ImageButton
ID
=
"imgContractBtn1"
Visible
=
"true"
OnClientClick
=
"showMenuC(event);"
ImageUrl
=
"/images/someimage.png"
runat
=
"server"
/>
<
Telerik:RadContextMenu
id
=
"RadContextC1"
runat
=
"server"
EnableViewState
=
"false"
EnableRoundedCorners
=
"true"
EnableShadows
=
"true"
OnClientItemOpened
=
"itemOpened"
>
<
Items
>
<
telerik:RadMenuItem
CssClass
=
"Contracts"
text
=
"ContractSelectie"
>
<
ItemTemplate
>
<
div
id
=
"CatWrapper"
class
=
"Wrapper"
>
<
telerik:RadListView
ID
=
"RLVContractSelectie1"
runat
=
"server"
AllowPaging
=
"false"
EnableAjaxSkinRendering
=
"true"
RegisterWithScriptManager
=
"true"
EnableViewState
=
"false"
OnItemDataBound
=
"RLVContracts_ItemDataBound"
GroupItemCount
=
"1"
AllowMultiItemSelection
=
"false"
onneeddatasource
=
"RLVContracts_NeedDataSource"
>
<
ItemTemplate
>
<
fieldset
class
=
"myClass"
>
<
div
id
=
"div-image"
>
<
asp:ImageButton
ID
=
"Image1"
runat
=
"server"
SkinID
=
"imgNoPicture"
CssClass
=
"imageStyle"
/>
</
div
>
<
div
id
=
"textbox"
>
some text
</
div
>
<
div
id
=
"div-masker"
>
<
asp:ImageButton
ID
=
"imgMasker"
CommandName
=
"Select"
CommandArgument='<%#DataBinder.Eval(Container.DataItem, "intContractPID")%>' runat="server" SkinID="imgMasker" CssClass="imageStyleMasker" />
</
div
>
</
fieldset
>
</
ItemTemplate
>
</
telerik:RadListView
>
</
div
>
</
ItemTemplate
>
</
telerik:RadMenuItem
>
</
Items
>
</
Telerik:RadContextMenu
>
Ok, I explain now what problem i got now, and what i allready tried to get it work properly.
First thing, i have everything placed in a radAjaxPanel. When i click my image (imgContractBtn1), it shows the contextmenu! It has the radListView filled with some contracts with images and some text on it. Then when i click the imgButton (imgMasker), it fires the onitemcommand of the RadListView and it postback. So my selected item is selected and everything works great, except ajax. It loads my screen with everything what should work. Everything works great, except for the ajax thing.
so, when i try putting on a radajaxpanel inside the radmenu itemtemplate of the radcontextmenu, Ajax works fine, but the contextmenu stays open with all the items of the radListView. It close when i click the white space in the radcontextmenu! so, the functionality of the radmenuitem works.
My final question is, how can i make this work properly?
i didn't found such scenary yet on the forum, so can someone help me? ofcoarse i allready tried a lot of things like instead of the normal image button i used a radbutton, no effect.
ofcoarse there is another solution for this, is that i add a lot of controls to the ajaxmanager, but then again, the contextmenu didn't close when i clicked my imgMasker (imagebutton)
Best regards,
Fandy Backers