XGrid with Master/Content Page

Topics: User Forum
Dec 8, 2006 at 11:12 AM
First of all lemme say, great work on extending the GridView...this xGrid has been a huge help.
But I'm facing problems when trying to use xGrid in Master-Content page structure. I'm a novice in ASP .net so may the questions I have can be described as stupid at best...but plz do answer them!
Ok here goes:
I have a master page say - SiteTemplate.master
=== code snippet ===
code
.......
.......
<body style="background-color:#ffffff;background-image:url('images/BSet1/back.gif');margin-left:0;margin-top:0">
.......
.......
/code

Now if I need contextmenu I need to add
code
onkeypress="<% = ContextMenu1.GetEscReference() %>"
onclick="<% = ContextMenu1.GetOnClickReference() %>"
code
in the <body> tag, right?

But the problem is I want, to use
code
....
<ctMenu:ContextMenu ID="ContextMenu1" runat="server" BackColor="#99CCCC" ForeColor="Maroon"
OnItemCommand="ContextMenu1_ItemCommand" RolloverColor="#009999" />
....
/code
in the content page (say memberInfo.aspx)

==== code snippet ====
code
....
<%@ Page Language="VB" MasterPageFile="~/SiteTemplate.master" AutoEventWireup="false" CodeFile="inc/memberInfo.aspx.vb" Inherits="memberInfo" title="Member Information" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
<ctMenu:ContextMenu ID="ContextMenu1" runat="server" BackColor="#99CCCC" ForeColor="Maroon"
OnItemCommand="ContextMenu1_ItemCommand" RolloverColor="#009999" />

....
/code

You can obviously understand that if I include <ctmenu:ContextMenu > in content page then the ContextMenu1.GetEscReference() and ContextMenu1.GetOnClickReference() functions need to be called in the content page!!
I hope I have put my problemacross clearly enough...please help me out!!