CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Wishes

 Allow default page size on a grid to be a variable

Print topic Send  topic

Author Message
Benjamin Krajmalnik
Posted: 12/16/2005, 9:58 PM

Riht now, the IDE requires that the page size on a grid be a constant
integer. I would like to see it be a text item so we can place a variable
in there.
Let me explain the reasoning.
I hae a product which I have PDA enabled. By default, I had set the page
size to 10, which is a good size when viewing on a regulat monitor
(1024x769). I created a browse detection clas which is fired in the login
page. If a PDA browser is detected, it loads an alternate template set
(which is formatted for a PDA). For a PDA, due to display limitations, it
is preferable to have 5 items per page. Tihs will heep scrolling to an
acceptable level on such a device.

The Browse detection class sets a session variable with the number of items
to fill. Now, I need to go to every single ASP page and chage the Pagesize
value when empty to Session("DefaultPageSize") instead of the hardcoded
value.

The downside is that this now breaks the code maintenance for the
class_initialize of every such grid. Now, if I make any design changes
(such as adding controls), I need to back out my mods, have it regenerate,
and then replace the mods.

If that value were allowed to be a text item instead of having numeric
validation, it could be maintained in the IDE 100%.



Walter Kempees
Posted: 12/17/2005, 4:07 AM

Agreed, very usefull!
Compare it to the language/locale setting or even the dynamic styles.

Meanwhile Benjamin,
Workaround suggestion: Is it more work to have to do the code maintenance
you describe, or to just build an extra set of the same pages formatted for
the PDA?

Walter

"Benjamin Krajmalnik" <kraj@illumen.com> schreef in bericht
news:do09e9$cnb$1@news.codecharge.com...
> Riht now, the IDE requires that the page size on a grid be a constant
> integer. I would like to see it be a text item so we can place a variable
> in there.
> Let me explain the reasoning.
> I hae a product which I have PDA enabled. By default, I had set the page
> size to 10, which is a good size when viewing on a regulat monitor
> (1024x769). I created a browse detection clas which is fired in the login
> page. If a PDA browser is detected, it loads an alternate template set
> (which is formatted for a PDA). For a PDA, due to display limitations, it
> is preferable to have 5 items per page. Tihs will heep scrolling to an
> acceptable level on such a device.
>
> The Browse detection class sets a session variable with the number of
> items
> to fill. Now, I need to go to every single ASP page and chage the
> Pagesize
> value when empty to Session("DefaultPageSize") instead of the hardcoded
> value.
>
> The downside is that this now breaks the code maintenance for the
> class_initialize of every such grid. Now, if I make any design changes
> (such as adding controls), I need to back out my mods, have it regenerate,
> and then replace the mods.
>
> If that value were allowed to be a text item instead of having numeric
> validation, it could be maintained in the IDE 100%.
>
>
>
>

DonB
Posted: 12/17/2005, 7:11 AM

Have you considered setting the PageSize property in the Before Select or
Before Show event of your grids? I'm confused why you decided to edit the
Class Initialize code.

--
DonB

http://www.gotodon.com/ccbth


"Benjamin Krajmalnik" <kraj@illumen.com> wrote in message
news:do09e9$cnb$1@news.codecharge.com...
> Riht now, the IDE requires that the page size on a grid be a constant
> integer. I would like to see it be a text item so we can place a variable
> in there.
> Let me explain the reasoning.
> I hae a product which I have PDA enabled. By default, I had set the page
> size to 10, which is a good size when viewing on a regulat monitor
> (1024x769). I created a browse detection clas which is fired in the login
> page. If a PDA browser is detected, it loads an alternate template set
> (which is formatted for a PDA). For a PDA, due to display limitations, it
> is preferable to have 5 items per page. Tihs will heep scrolling to an
> acceptable level on such a device.
>
> The Browse detection class sets a session variable with the number of
items
> to fill. Now, I need to go to every single ASP page and chage the
Pagesize
> value when empty to Session("DefaultPageSize") instead of the hardcoded
> value.
>
> The downside is that this now breaks the code maintenance for the
> class_initialize of every such grid. Now, if I make any design changes
> (such as adding controls), I need to back out my mods, have it regenerate,
> and then replace the mods.
>
> If that value were allowed to be a text item instead of having numeric
> validation, it could be maintained in the IDE 100%.
>
>
>
>

Benjamin Krajmalnik
Posted: 12/18/2005, 5:41 PM

Walter,

I hae a dynamically loaded alternate template set. I modified the template
class (this project is still on 2.3) so that I can use alternate templates.
The entire rendering is different in the templates. The problem is with the
code layer, not the presentation layer.

The code layer sets the number of records displayed in a gridautomatically
based on the setting for the grid. I would have to have suplicate products,
which then become a PITA to maintain featurewise.

If you want I can show exactly what I am doing privately. It is in ASP,
howeve, and not PHP.

Benjamin Krajmalnik
Posted: 12/18/2005, 6:09 PM

Don,

Thanks for your suggestion. Although it did not work, it got me thinking.
I jumped back into the generated code and the classes, and was able to find
a solution.

When I tried setting the property in either the before show or the before
build select of the grid, it was too late in the binding process for it to
take effect. However, by placing the code in the "After Page Initialize" I
obtained the desired results.

I had initially looked at the documentation looking at the grid runtime
properties, and pagesize was not one of them.
Turns out it was a propert of the datasource ...
Once I identified it as such, binding it there solved the problem.

Thanks for getting me thinking.


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.