We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Create PopupContainer Control with Code?

Thread ID:

Created:

Updated:

Platform:

Replies:

48941 Sep 6,2006 05:22 PM Sep 12,2006 02:57 PM ASP.NET Web Forms (Classic) 7
loading
Tags: Tools
David A. Gonzales
Asked On September 6, 2006 05:22 PM

Hi,
I have a web page that creates a web page with a GridGroupControl where some of the HeaderColumns are Buttons that are linked to a PopupControlContainer. The PopupControlContainer has a menu that is dynamically created in code and added to the PopupContainer. So, when the user does a right-click on the header the menu will popup. I would like to also create the PopupContainer dynamically in code but I am trying to figure out how to handle events? In the example I created (with help from Syncfusion - thanks guys!) the PopupContainerControl is already on the page and the client-side events are handled by checking _sfPopupContralContainer1.IsHidden in a client-side function. But how do I handle the client-side functions with dynamic control content? I do have an Event to catch the menu selection but I also need the column header index.

Thanks.
David.

Administrator [Syncfusion]
Replied On September 7, 2006 08:08 PM

Hi David,

The attached sample may fill up your requirement,regarding PopupControlContainer over the GridGroupingControl.

Actaully this Sample is the modified version from the link,
http://www.syncfusion.com/support/forums/message.aspx?MessageID=48626


The PopupContainer is made in such a way that it may popup when the user "Right Clicks" over the Button in Header of the Grid.

The handling of all client-side functions, mentioned in the sample, were made from the Server Side by specifying the parent control''s ID.

And too, its not possible to get the column header index from the popup control because we show the popup with respect to the header cell and not with respect to the button. So according to now we need separate poups for each columns.

I hope this Sample may help you and give the solution of your problem.

PopupMenuUnderGrid


Thanks,
G.Pradeep.

David A. Gonzales
Replied On September 8, 2006 12:46 PM

Thanks for the sample. It looks like it will do what I am after. The only problem is I cannot run the sample. The version number is 4.302.0.16 on the controls so I changed the version number to my (4.202.0.37) but now I cannot find the ClientObjectID for the PopupControlContainer. Is this because you are using the new version?

Thanks.
David.

Administrator [Syncfusion]
Replied On September 8, 2006 04:51 PM

Hi David,

Sorry for the Inconveniences caused.

The attached Sample contains the modified files of the previous Sample.

The ClientObjectId is the new property included into the latest version,

I have commented the lines of ClientObjectId under the C# Code Behind file and i have modified the Script Block by replacing the MyPopup1 and MyPopup2 with ''_sfPop1'' and ''_sfpop2'' respectively.

ModifiedMenuInHeaderSample



Thanks for using syncfusion products.

Thanks,
G.Pradeep



David A. Gonzales
Replied On September 11, 2006 12:37 PM

Thanks that works great. However I have a question regarding using this code in a paged grid. We have a custom paged grid (we handle all the paging with code and buttons). I put the menu on the column dynamically (using header template and popupcontrol containers) and I can do a right-click and bring up the menu. However, once I page I do a right-click and the menu no longer comes up. I do rebuild the header template and popupcontrol container each time. Do you have an example or at least tell me where I am going wrong. I am new to ASP.NET so it''s probably my lack of understanding.

Thank you.
David.

Pradeep G [Syncfusion]
Replied On September 11, 2006 05:27 PM

David,

I couldn''t reproduce the issue by using our Grid''s default pager Bar.

It could be glad if you furnish me a small Sample inorder to make us understand and reproduce the issue.

Thanks,
G.Pradeep.

David A. Gonzales
Replied On September 12, 2006 09:40 AM

Would it be possible to send your sample so I could see where I am going wrong? My sample is a bit complex (ie, multiple SQL databases, remote services, etc). I have a feeling its just in the way I am rebuilding everything after I page to a new set of data since I am handling all the paging myself.

Thanks.
David.

Administrator [Syncfusion]
Replied On September 12, 2006 02:57 PM

Hi David,

The attached Sample contains the default Navigator Bar Control from the GridGrouping Control.
MenuInheader_Navigation


For your kind attention, there is no much change in the samples code that we sent you previously. we just added the Navigation bar.

Thanks,
G.Pradeep.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;