DomAPI Home
DomAPI
Build: Unknown
Topic: listgrid inside pagecontrol?

  ricardo not registered wrote on Wednesday 10/2/02 at 5:50 PM (PST)  
 

Hi guys,

I'm trying to create a pagecontrol with a few tabs and insert a listgrid inside
one of the pages.

How do I do that?

If I have:

page = PageControl(null, null, 0, 0, 300, 200);
page.addPage("tab1", "DIV");
page.addPage("tab2", "DIV");
page.addPage("tab3", "DIV");

How would I create a listgrid such that it is inside (associated with) tab1? So
that when I click on tab2 the listgrid disappears, and is redrawn when tab1 is
clicked again?

Thanks
Ricardo

 
    RSS feed of forum  
  kabuki registered v4 wrote on Wednesday 10/2/02 at 6:35 PM (PST)  
 

Something like:

var pc1 = PageControl();
pc1.addPage("Tab1","DIV");
pc1.addPage("Tab2","DIV");
var lg1 = Listgrid(pc1.pages[0],null,null,null,null,880,400);
var lg2 = Listgrid(pc1.pages[2],null,null,null,null,880,400);

// you need this for multiple listgrids...
pc1.onchange=pc_onchange_cleanup;
pc_onchange_cleanup();


function pc_onchange_cleanup()
{
if (pc1.pageIndex == 0)
{
lg1.showHeaders = true;
lg2.showHeaders = false;
}
else if (pc1.pageIndex == 1)
{
lg1.showHeaders = false;
lg2.showHeaders = true;
}

lg1.reDraw();
lg2.reDraw();
}

 
    RSS feed of forum  
  Darin Kadrioski registered v4 wrote on Wednesday 10/2/02 at 6:46 PM (PST)  
 

ahh yes, the infamous cleanup code.

One of these days I gotta get around to fixing that.


Darin Kadrioski Darin Kadrioski
support@domapi.com

 
    RSS feed of forum  
  ricardo not registered wrote on Wednesday 10/2/02 at 7:20 PM (PST)  
 

thanks!!!

I'll give that a try

 
    RSS feed of forum  
  Karl O. not registered wrote on Thursday 10/3/02 at 7:13 PM (PST)  
 

What exactly does the cleanup code do? I had a similar problem with calendars within a pagecontrol within another pagecontrol and I noticed switching the top pagecontrol would hide the child pagecontrol but leave the calendar visible. So instead of setting the pagecontrols page visibility to hidden I simply create an extra swap element per page and do a tranferElm of the complete child pagecontrol... erm, yeah... hope everyone could follow ;)

Is that similar to what the cleanup code does or is it just a blaitantly stupid workaround of mine?

 
    RSS feed of forum  
  Darin Kadrioski registered v4 wrote on Thursday 10/3/02 at 9:09 PM (PST)  
 

Here's the deal, some components (like dropdowns and the calendar) use elms that aren't actually children, but are independant in the DOM tree. My technical excuse is for browser compatability, but the reality is that's the only way I could get them to work at the time, both relatively and absolutely.
So basically, you need to manually hide and show the disconnected bits when the tabs change on the pagecontrol.

*shrug*


Darin Kadrioski Darin Kadrioski
support@domapi.com

 
    RSS feed of forum  
  lancehilliard not registered wrote on Wednesday 11/12/03 at 8:19 AM (PST)  
 

Sorry to bring up an old topic, but I'm using the listgrid component within a pagecontrol component and need to know if the problem with listgrids on non-selected tabs being visible still exists in DOMAPI 4.x. Has this been fixed yet?

The names of my listgrids are dynamically generateed, so writing cleanup code, while possible, would be rather complex.

Thanks for your help.
lance

 
    RSS feed of forum  
  Darin Kadrioski registered v4 wrote on Wednesday 11/12/03 at 8:44 AM (PST)  
 

afaik, yes. haven't tested it though.

 
    RSS feed of forum  
  lancehilliard not registered wrote on Wednesday 11/12/03 at 9:02 AM (PST)  
 

Is there any way for prospective customers to test 4.x BETA if that code is what is motivating the purchase?

lance

 
    RSS feed of forum  
  Darin Kadrioski registered v4 wrote on Wednesday 11/12/03 at 9:43 AM (PST)  
 

There will be a public beta build at some point.

Probably after the Grids are complete since thats the component most people are interested in.

 
    RSS feed of forum  
You could respond to this post if you were logged in.
DHTML by www.domapi.com