I'm having a bit of a problem between IE and other browsers:
In the other browsers (Firefox and Opera) my tablePane will not auto
wrap text in columns. This is how the table should look:
http://img218.imageshack.us/img218/2950/firefoxpz4.jpg
But in IE the column will autowrap and change the size of the table,
this is no good as I am using absolute positioning on my pages:
http://img215.imageshack.us/img215/2631/ieel8.jpg
I have tried setting nowrap="true" in the tablePane, but this has not
done anything.
I don't really want to have to set the CSS styles for the table pane
in every page, could someone give me a workaround for this?
Thanks.
I think this is a bug. I have duplicated this and will talk to
development.
-Al
On Oct 2, 6:46 am, "mathew.march...@googlemail.com"
Is this another bug? or do I need to do something else?
On Oct 2, 12:06 pm, Albert Goins <Albert.Go...@intersystems.com>
wrote:
I'm sorry, I don't quite understand. The column name is defined by
the query. What do you expect "column1-column2 As Disc" to do? I
believe the only acceptable values for colName are the literal column
name or some Zen Runtime Expression that will result in a valid column
name. If your query contained an aggregate function that was renamed
with "As", then the column name should be whatever the As defined the
column name.
-Al
On Oct 2, 9:53 am, "mathew.march...@googlemail.com"
-Al
On Oct 2, 10:13 am, "mathew.march...@googlemail.com"
On Oct 2, 3:23 pm, "mathew.march...@googlemail.com"
I see now. You are using the "general description" method of
constructing the SQL. We should probably update the documentation for
the colName control to reflect this capability.
As for the "width" issue, I will investigate.
Thanks,
Al
On Oct 2, 10:26 am, "mathew.march...@googlemail.com"
Maybe I was doing something wrong, but I wasn't able to force onclick
action to work for a simple dynaGrid component. Could you advise me,
what I was doing wrong, please?
XData Contents [XMLNamespace="http://www.intersystems.com/zen"]
{
<page xmlns="http://www.intersystems.com/zen" title="">
<dynaGrid id="dynaGrid" onclick="zenPage.test();">
<gridRow label="row1"/>
<gridRow label="row2"/>
<gridColumn id="col1" label="col1"/>
<gridColumn id="col2" label="col2"/>
</dynaGrid>
</page>
}
Method test() [ Language = javascript ]
{
alert('OK');
}
Thanks,
Maxim
Thanks,
Maxim
What needs to be added to the documentation? Let me know and I'll add
it.
Here is the current description of the colName attribute for
<tablePane>:
The name of the SQL data column that this column is associated with.
The colName value can be a literal string, or it can contain a Zen
#()# expression. See Zen Runtime Expressions.
If any colName values in the <tablePane> are duplicates, the second
column displays as "(duplicate) colName" to indicate that unless the
second column is renamed, <tablePane> behavior will be unexpected.
If no colName is specified for a column, the column is displayed
without a data value. Typically this technique is used to display a
link action in a row.
Thanks,
Susan
On Oct 2, 10:38 am, Albert Goins <Albert.Go...@intersystems.com>
> > > > > > > > > Thanks.- Hide quoted text -
>
> - Show quoted text -
It seems that it is also possible to put SQL style functions and
aliasing in the colName as this user is doing with:
<column colName="Items_ExtendedNetValue-Items_ExtendedDiscountValue
As Disc" header="Disc" width="20" />
I just tested this myself in ZENTest.TableTest with:
<column colName="Salary-1000 As SalaryMinus1000" width="10"
filterType="text"
filterOp="BETWEEN"
filterLabel=" Range (Min,Max):"
/>
Or:
<column colName="max(Salary) As SalaryMax" width="100"
filterType="text"
filterOp="BETWEEN"
filterLabel=" Range (Min,Max):"
/>
Also, I was unable to duplicate the width issue in this case in either
Firefox or IE 7.
-Al
Yes, I am trying to use a generic one. Since it is available for dynaGrid, I was expecting it would be possible to use it. Also, as I mentioned before, I was trying onkey… events and they didn’t work too. As I understand these events are used by dynaGrid itself to highlight, select and edit cells, but having access to those ‘on<smth> properties mean that you can add functionality if needed. E.g. our client wants to start editing values by using single click instead of double click, so I was thinking about using onclick action to switch particular cell into the edit mode.
You are right onclickrow and onclickcolumn work fine.
Cheers,
Maxim
> > > - Show quoted text -- Hide quoted text -
Yes, I am trying to use a generic one. Since it is available for dynaGrid, I was expecting it would be possible to use it. Also, as I mentioned before, I was trying onkey... events and they didn't work too. As I understand these events are used by dynaGrid itself to highlight, select and edit cells, but having access to those 'on<smth> properties mean that you can add functionality if needed. E.g. our client wants to start editing values by using single click instead of double click, so I was thinking about using onclick action to switch particular cell into the edit mode.
I believe if there is a possibility to specify onclick action, then it should work, otherwise it is confusing. As I could see there is no other possibility to specify this action for cells. onclickrow and onclickcolumn work only for row/column titles, but not inside the grid.
Alex,
Thank you for your answer. Yes, component offers these handlers, so I tried to override those handlers and they don’t work too. And I still believe that if we offer user a possibility to specify onclick property, it should work.
By the way, I was trying to workaround the problem, using onselectcell attribute of the component and I noticed that it invokes specified method for 3 times and also trying to get selected row and cell in the method returns values of a previously selected cell, so you can’t do anything with a cell which is being selected.
Regards,
{
<page xmlns="http://www.intersystems.com/zen" title="">
<dynaGrid id="dynaGrid" onclick="zenPage.test();">
<gridRow label="row1"/>
<gridRow label="row2"/>
<gridColumn id="col1" label="col1"/>
<gridColumn id="col2" label="col2"/>
</dynaGrid>
</page>
}
Method test() [ Language = javascript ]
{
alert('OK');
}
Thanks,
Maxim
Respectfully
Alex Schaefer
Integration Specialist
InterSystems Corporation
Thank you,
Yes, you are right, stupid mistake, because, I was more thinking about dynaGrig attributes so I treated handlers the same automatically.
So, this works for handlers:
/// User.MyGrid
Class User.MyGrid Extends
%ZEN.Component.dynaGrid
{
Parameter NAMESPACE = "http://www.intersystems.com/myApp";
Method cellClickHandler(row, col) [ Language = javascript ]
{
alert('cellClickHandler - ' + row +
':' + col);
}
}
Anyway, I think oncklick thing should be reported as a problem
Cheers,
Maxim
From:
Alex Schaefer [mailto:Alex.S...@intersystems.com]
Sent: 04 October 2007 11:09
To: Maxim Vershinin
Subject: Re: [InterSystems-Zen]
Re: dynaGrid onclick action
This won't work... you have to subclass the component and override the methods in there. They are part of the component, NOT of the page.
Everybody starts at some point :) I would like to keep the community included though, other people will learn from this as well.
On Oct 4, 2007, at 6:06 AM, Maxim Vershinin wrote:
Alex,
Sorry for that email “ping-pong”. As you know, I am quite a new SE here, so, probably I was doing something wrong.
Here is a class I am playing with:
/// Created using the page template:
Default
Class User.GridTest
Extends %ZEN.Component.page
{
/// Class name of
application this page belongs to.
Parameter APPLICATION = "User.TestApp";
/// Displayed name of
this page.
Parameter PAGENAME = "";
/// Domain used for
localization.
Parameter DOMAIN = "";
/// This Style block
contains page-specific CSS style definitions.
XData Style
{
<style type="text/css">
</style>
}
/// This XML block
defines the contents of this page.
XData Contents [XMLNamespace="http://www.intersystems.com/zen"]
{
<page xmlns="http://www.intersystems.com/zen"
title="" >
<dynaGrid id="dynaGrid"
onselectcell="zenPage.test(zenThis);">
<gridRow label="row1"/>
<gridRow label="row2"/>
<gridColumn id="col1"
label="col1"/>
<gridColumn id="col2"
label="col2"/>
</dynaGrid>
</page>
}
Method test(grid) [ Language = javascript ]
{
alert('onselectcell
- ' + grid.getCurrRow() + ':' + grid.getCurrColumn());
}
Method cellClickHandler(row, col) [ Language = javascript ]
{
alert('cellClickHandler
- ' + row + ':'
+ col);
}
Method cellDblClickHandler(row, col) [ Language = javascript ]
{
alert('cellDblClickHandler
- ' + row + ':'
+ col);
}
Method selectCellHandler(row, col) [ Language = javascript ]
{
alert('selectCellHandler
- ' + row + ':'
+ col);
}
}
You might want to remove onselectcell to test click handlers.
Thanks,
Maxim
From: InterSys...@googlegroups.com [mailto:InterSys...@googlegroups.com]
On Behalf Of Alex Schaefer
Sent: 04 October 2007 10:25
To: InterSys...@googlegroups.com
Subject: [InterSystems-Zen] Re:
dynaGrid onclick action
I have used the cell click handlers without problems before, can you please post a simple sample? I agree with you in general, but frankly how would you expect onclick to work for a dynaGrid? Aren't you trying to influence the cell click specifically? I'm not sure why you want the click for the entire component to work.
On Oct 4, 2007, at 5:22 AM, Maxim Vershinin wrote:
Alex,
Thank you for your answer. Yes, component offers these handlers, so I tried to override those handlers and they don't work too. And I still believe that if we offer user a possibility to specify onclick property, it should work.
By the way, I was trying to workaround the problem, using onselectcell attribute of the component and I noticed that it invokes specified method for 3 times and also trying to get selected row and cell in the method returns values of a previously selected cell, so you can't do anything with a cell which is being selected.
Regards,
Maxim
http://www.intersystems.com/zen" title="">
<dynaGrid id="dynaGrid" onclick="zenPage.test();">
<gridRow label="row1"/>
<gridRow label="row2"/>
<gridColumn id="col1" label="col1"/>
<gridColumn id="col2" label="col2"/>
</dynaGrid>
</page>
}
Method test() [ Language = javascript ]
{
alert('OK');
}
Thanks,
Maxim
InterSystems Corporation