Search the web
Sign In
New User? Sign Up
ydn-javascript · Yahoo! User Interface Library Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Is that possible to have a DataTable inside a panel ?   Message List  
Reply | Forward Message #38848 of 52127 |
Re: Is that possible to have a DataTable inside a panel ?

Tahnks Satyam and Philip for your suggestions. I have figured out
the problem. I was passing my panel div tag as a conatiner (instead
of DataTable div tag unsurprisingly! )inside the initialization
method of the DataTable..

It works fine except when I click the lick it looks like that panel
is being refreshed because it is loading the DataTable. It will work
fine for now.

I am hoping that YUI might have solved this problem in their new
release.


Thanks a lot..


--- In ydn-javascript@yahoogroups.com, "kpshah4" <kpshah4@...> wrote:
>
> Philip : Here is my code.
>
> ASPX Codde:
>
> ** This is the link where I pop up the panel on the click event of
> the link. *******
>
> <a href="#" id="lnkClusterSettings"
> onclick="GetCustomClusterSettingsScript();">Custom Cluster
> Settings</a>
>
> *** HTML Code for the Panel ***********
>
> <div id="divCustomClusterSettings">
> <table>
> <tr><td>
> <div id="divClusterSettingDataTable"></div>
> </tr></td>
>
> <tr><td>
>
> <span class="metaheader">School
CoordinatorSettings:</span><br />
> <input type="radio" id="rbtLockClusterSettings"
runat="server"
> name="ClusterLockSettings"/> Lock Settings
> <input type="radio" id="rbtUnLockClusterSettings"
runat="server"
> name="ClusterLockSettings"/> Unlock Settings
> </tr></td>
>
> </table>
>
> </div>
>
> JavaScript Code:
>
>
> function PanelClusterSettingsFunction() {
> $CLI.PanelClusterSettings = new YAHOO.widget.Panel
> ("divCustomClusterSettings",
> {
> fixedcenter: false,
> visible: false,
> constraoviewport: true,
> zIndex:600,
> xy: [150, 100],
> width: "630px",
> height: "250px",
> close: true,
> modal:true
> });
> $CLI.PanelClusterSettings.render();
>
> YAHOO.util.Event.addListener("lnkClusterSettings", "click",
> $CLI.PanelClusterSettings.show, $CLI.PanelClusterSettings, true);
> }
> YAHOO.util.Event.onDOMReady(PanelClusterSettingsFunction);
>
> *** This is the function I am executing to define the DataTable ***
>
> function LoadCourseData()
> {
> YAHOO.util.Event.throwErrors = true;
>
> var Dom = YAHOO.util.Dom;
> var Ex = YAHOO.example;
>
> //---Define Column Definitions For A DataTable------
> YAHOO.example.ClientPagination = new function() {
> var myColumnDefs =
> [
> { key: "Select", label: "Select",
formatter:"checkbox",
> width:50},
> { key: "School", sortable: true, label: "School",
> width:250 },
> { key: "City", sortable: true, label: "City",
> width:150 },
> {key: "State", sortable: true, label: "State"}
> ];
>
> //---Define DataSource For A DataTable------
> Ex.myDataSource = new YAHOO.util.DataSource
> ($CLI.CustomClusterSettings.data);
> Ex.myDataSource.responseType =
> YAHOO.util.DataSource.TYPE_JSON;
> Ex.myDataSource.responseSchema = {
> resultsList: "items",
> fields: [
> { key: "SchoolID" },
> { key: "School" },
> { key: "City" },
> { key: "State" }
> ]
> };
>
> //---Instatiate a DataTable------
> Ex.myDataTable = new YAHOO.widget.DataTable
> ('divCustomClusterSettings', myColumnDefs,
> Ex.myDataSource);
> };
> };
>
> *** This is the function I am calling on the click of the
> Link "lnkClusterSettings" ****
>
> function GetCustomClusterSettingsScript()
> {
> var schoolId = 1015;
> var ClusterId = 1048;
> PageMethods.GetCustomClusterSettingsInfo
> (schoolId,ClusterId,SuccessGetCustomClusterSettingsScript);
> }
>
> function SuccessGetCustomClusterSettingsScript(result)
> {
> var d=YAHOO.lang.JSON.parse(result);
> $CLI.CustomClusterSettings = d;
> LoadCourseData();
> }
>
> Satyam : Here I have put my code. Can you correct me if I am doing
> any mistake with <div> tag you talked about in your reply?
>
>
> --- In ydn-javascript@yahoogroups.com, Philip Tellis <philip@>
> wrote:
> >
> > k dropped bits saying:
> >
> > > I have created a panel having some HTMl controls like radio
> buttons,
> > > textboxes and a DataTable. But the problem is that as soon as
the
> > > panel pops up, it shows HTML controls for a second and then it
> shows
> > > the DataTable and all other HTML controls get disappeared.
> > >
> > > So I dont know if it is possible to create a DataTable inside
a
> Panel.
> > > I have heard that you can create a Calendar control inside a
> Panel but
> > > for that you have to do some trick.
> >
> > show us the code
> >
>





Tue Oct 7, 2008 2:18 pm

kpshah4
Offline Offline
Send Email Send Email

Forward
Message #38848 of 52127 |
Expand Messages Author Sort by Date

I have created a panel having some HTMl controls like radio buttons, textboxes and a DataTable. But the problem is that as soon as the panel pops up, it shows...
kpshah4
Offline Send Email
Oct 7, 2008
1:02 pm

... show us the code...
Philip Tellis
philiptellis
Offline Send Email
Oct 7, 2008
1:22 pm

Philip : Here is my code. ASPX Codde: ** This is the link where I pop up the panel on the click event of the link. ******* <a href="#" id="lnkClusterSettings"...
kpshah4
Offline Send Email
Oct 7, 2008
1:55 pm

Tahnks Satyam and Philip for your suggestions. I have figured out the problem. I was passing my panel div tag as a conatiner (instead of DataTable div tag...
kpshah4
Offline Send Email
Oct 7, 2008
2:18 pm

When you click on what? Please explain. Satyam...
Satyam
satyamutsa
Offline Send Email
Oct 7, 2008
4:07 pm

Fist I have a link "Cluster" on my page. A panel having a DataTable should be poped up when that link(Cluster) is clicked. When I click the link it looks like...
kpshah4
Offline Send Email
Oct 8, 2008
1:44 pm

You certainly can but make sure you put a <div> inside the panel that will serve as a container for the DataTable. If you put the DataTable straight in the...
Satyam
satyamutsa
Offline Send Email
Oct 7, 2008
1:25 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help