How to access and set row and column specific property using Modify()

How do you access and set (row,column)-specific property using Modify()?
The PB on-line documentations usng Modify() all shows accessing and setting
column specific-property using Modify() such that all rows in that column
had the new property - but what about specific to a "cell"?

I have asked this question before under a different subject line, and got
one person who responded that the only way to do this is to use he
Expressions tab in the dw painter.

I need a second opinion on others who may not have read the question
before.


Thanks,

John Salvo
0
Jesus
3/23/1998 12:44:45 AM
sybase.powerbuilder.datawindow 28057 articles. 5 followers. Follow

6 Replies
486 Views

Similar Articles

[PageSpeed] 55
Get it on Google Play
Get it on Apple App Store

Maybe I do not understand you question, but even use Expressions tab in the dw
painter, you can
not specific to a "cell", usually use if(b,t,f) to specific property to cells.

> How do you access and set (row,column)-specific property using Modify()?
> The PB on-line documentations usng Modify() all shows accessing and setting
> column specific-property using Modify() such that all rows in that column
> had the new property - but what about specific to a "cell"?
>
> I have asked this question before under a different subject line, and got
> one person who responded that the only way to do this is to use he
> Expressions tab in the dw painter.
>
> I need a second opinion on others who may not have read the question
> before.
>
> Thanks,
>
> John Salvo



0
Hou
3/22/1998 5:34:39 PM
Hmmm... you are right that there is no way of doing this with the
Expressions tab in the dw painter.

Sorry for not explaining clearly. In one dw, I compared the data value of
column A vs. the data value columns B, and based on whehter  A > B or A <=
B, the color of column B would be different. 

I was therefore able to have a datawindow where the "color propertty is
different for different rows in the same column".

Having done that, I now wanted to have a dw wherein if the user changed the
data value of a column, the font or color would change for that specific
row and column that was changed, allowing the user to see what changed are
pending to be updated or inserted to the database based on the font or
color.

I tried doing this with the dw painter, but realized that there is no
function that in dw painter that would test if the specific column was
changed (there was a rowchanged() function, but that would not tell me what
specific column was changed). Anyway, if there was such a function in the
dw painter, I wanted this to be a default behaviour in my dws so that I do
not have to do them everytime for each dw.

So I tried doing it with user objects (which I inherited from u_dw) and
thought of using Modify() to change the property for a specific cell, but
realized that Modify() also does not allow me to do so either. Using
Modify() changes the property column-wide. Whereas the Expressions tab is
evaluated for each row in the dw, Modify() changes the property for all
rows in the column.


I hope this is much clearer.

John Salvo



Hou Yue wen <hyw@trans-cosmos.com.cn> wrote in article
<35154BAE.5C2BCE2D@trans-cosmos.com.cn>...
> Maybe I do not understand you question, but even use Expressions tab in
the dw
> painter, you can
> not specific to a "cell", usually use if(b,t,f) to specific property to
cells.
> 
> > How do you access and set (row,column)-specific property using
Modify()?
> > The PB on-line documentations usng Modify() all shows accessing and
setting
> > column specific-property using Modify() such that all rows in that
column
> > had the new property - but what about specific to a "cell"?
> >
> > I have asked this question before under a different subject line, and
got
> > one person who responded that the only way to do this is to use he
> > Expressions tab in the dw painter.
> >
> > I need a second opinion on others who may not have read the question
> > before.
> >
> > Thanks,
> >
> > John Salvo
> 
> 
> 
> 
0
Jesus
3/24/1998 1:27:24 AM
Jesus,
Try this.  Place a "dummy" computed column in your select statement, as in:
, 0 as modified_row

Now, in the ItemChanged event of the datawindow, code:
this.SetItem( row, "modified_row", 1 )

You can then place an expression on the column color, based upon the value
in the modified_row column.
if( modified_row = 1, RGB(255,0,0), RGB(255,255,255))
/* red when modified, white when not modified */

Paul Horan
VCI
Springfield, MA

Jesus M. Salvo Jr. wrote in message
<01bd56cd$6f2dd140$6300a8c0@ibm-thinkpad>...
>
>Hmmm... you are right that there is no way of doing this with the
>Expressions tab in the dw painter.
>
>Sorry for not explaining clearly. In one dw, I compared the data value of
>column A vs. the data value columns B, and based on whehter  A > B or A <=
>B, the color of column B would be different.
>
>I was therefore able to have a datawindow where the "color propertty is
>different for different rows in the same column".
>
>Having done that, I now wanted to have a dw wherein if the user changed the
>data value of a column, the font or color would change for that specific
>row and column that was changed, allowing the user to see what changed are
>pending to be updated or inserted to the database based on the font or
>color.
>
>I tried doing this with the dw painter, but realized that there is no
>function that in dw painter that would test if the specific column was
>changed (there was a rowchanged() function, but that would not tell me what
>specific column was changed). Anyway, if there was such a function in the
>dw painter, I wanted this to be a default behaviour in my dws so that I do
>not have to do them everytime for each dw.
>
>So I tried doing it with user objects (which I inherited from u_dw) and
>thought of using Modify() to change the property for a specific cell, but
>realized that Modify() also does not allow me to do so either. Using
>Modify() changes the property column-wide. Whereas the Expressions tab is
>evaluated for each row in the dw, Modify() changes the property for all
>rows in the column.
>
>
>I hope this is much clearer.
>
>John Salvo
>
>
>
>Hou Yue wen <hyw@trans-cosmos.com.cn> wrote in article
><35154BAE.5C2BCE2D@trans-cosmos.com.cn>...
>> Maybe I do not understand you question, but even use Expressions tab in
>the dw
>> painter, you can
>> not specific to a "cell", usually use if(b,t,f) to specific property to
>cells.
>>
>> > How do you access and set (row,column)-specific property using
>Modify()?
>> > The PB on-line documentations usng Modify() all shows accessing and
>setting
>> > column specific-property using Modify() such that all rows in that
>column
>> > had the new property - but what about specific to a "cell"?
>> >
>> > I have asked this question before under a different subject line, and
>got
>> > one person who responded that the only way to do this is to use he
>> > Expressions tab in the dw painter.
>> >
>> > I need a second opinion on others who may not have read the question
>> > before.
>> >
>> > Thanks,
>> >
>> > John Salvo
>>
>>
>>
>>


0
Paul
3/24/1998 1:51:01 PM
Thanks for that one, but that will change the color of the ENTIRE row. What
I needed was to change the color of a "Cell" (row,column) if that "cell"
has been changed or modified.

John Salvo

Paul A. Horan <paulh@twoplus.com> wrote in article
<hLqL5JyV9GA.129@forums.powersoft.com>...
> Jesus,
> Try this.  Place a "dummy" computed column in your select statement, as
in:
> , 0 as modified_row
> 
> Now, in the ItemChanged event of the datawindow, code:
> this.SetItem( row, "modified_row", 1 )
> 
> You can then place an expression on the column color, based upon the
value
> in the modified_row column.
> if( modified_row = 1, RGB(255,0,0), RGB(255,255,255))
> /* red when modified, white when not modified */
> 
> Paul Horan
> VCI
> Springfield, MA
> 

0
Jesus
3/25/1998 1:36:18 AM
I guess I need to explain my previous posting clearly. You are right that:

> > in the modified_row column.
> > if( modified_row = 1, RGB(255,0,0), RGB(255,255,255))

would change the color for a specific column, but the test evalution:

> > if( modified_row = 1,

will not test for changes on a specific column, but it will test for
changes on any column on the row. If I therefore apply:

> > if( modified_row = 1, RGB(255,0,0), RGB(255,255,255))

in the color Expressions tab on all columns, it would eventually change the
color of all columns in the row that was modified, regardless of what
column was modified.  This is similar to the rowchanged() function in
Expressions tab of dw painter. Unfortunately, the Expressions tab of dw
painter does not have a function to test if a specific column has been
changed or modified.


Thanks anyway for your suggestion.

John Salvo


Jesus M. Salvo Jr. <jmsalvo@skyinet.net> wrote in article
<01bd5797$d83b8720$6300a8c0@ibm-thinkpad>...
> Thanks for that one, but that will change the color of the ENTIRE row.
What
> I needed was to change the color of a "Cell" (row,column) if that "cell"
> has been changed or modified.
> 
> John Salvo
> 
> Paul A. Horan <paulh@twoplus.com> wrote in article
> <hLqL5JyV9GA.129@forums.powersoft.com>...
> > Jesus,
> > Try this.  Place a "dummy" computed column in your select statement, as
> in:
> > , 0 as modified_row
> > 
> > Now, in the ItemChanged event of the datawindow, code:
> > this.SetItem( row, "modified_row", 1 )
> > 
> > You can then place an expression on the column color, based upon the
> value
> > in the modified_row column.
> > if( modified_row = 1, RGB(255,0,0), RGB(255,255,255))
> > /* red when modified, white when not modified */
> > 
> > Paul Horan
> > VCI
> > Springfield, MA
> > 
> 
> 
0
Jesus
3/25/1998 1:49:50 AM
Then have a <col>_modified computed column in the datawindow Select for each
modifiable column.
In the ItemChanged event,
   this.SetItem( row, dwo.Name + "_modified" , 1 )

Then the expression can be made specific to the modified column.
  If( <col>_modified, RGB(255,0,0, RGB(255,255,255) )

Paul Horan
VCI
Springfield, MA

Jesus M. Salvo Jr. wrote in message
<01bd5799$bbefa720$6300a8c0@ibm-thinkpad>...
>
>I guess I need to explain my previous posting clearly. You are right that:
>
>> > in the modified_row column.
>> > if( modified_row = 1, RGB(255,0,0), RGB(255,255,255))
>
>would change the color for a specific column, but the test evalution:
>
>> > if( modified_row = 1,
>
>will not test for changes on a specific column, but it will test for
>changes on any column on the row. If I therefore apply:
>
>> > if( modified_row = 1, RGB(255,0,0), RGB(255,255,255))
>
>in the color Expressions tab on all columns, it would eventually change the
>color of all columns in the row that was modified, regardless of what
>column was modified.  This is similar to the rowchanged() function in
>Expressions tab of dw painter. Unfortunately, the Expressions tab of dw
>painter does not have a function to test if a specific column has been
>changed or modified.
>
>
>Thanks anyway for your suggestion.
>
>John Salvo
>
>
>Jesus M. Salvo Jr. <jmsalvo@skyinet.net> wrote in article
><01bd5797$d83b8720$6300a8c0@ibm-thinkpad>...
>> Thanks for that one, but that will change the color of the ENTIRE row.
>What
>> I needed was to change the color of a "Cell" (row,column) if that "cell"
>> has been changed or modified.
>>
>> John Salvo
>>
>> Paul A. Horan <paulh@twoplus.com> wrote in article
>> <hLqL5JyV9GA.129@forums.powersoft.com>...
>> > Jesus,
>> > Try this.  Place a "dummy" computed column in your select statement, as
>> in:
>> > , 0 as modified_row
>> >
>> > Now, in the ItemChanged event of the datawindow, code:
>> > this.SetItem( row, "modified_row", 1 )
>> >
>> > You can then place an expression on the column color, based upon the
>> value
>> > in the modified_row column.
>> > if( modified_row = 1, RGB(255,0,0), RGB(255,255,255))
>> > /* red when modified, white when not modified */
>> >
>> > Paul Horan
>> > VCI
>> > Springfield, MA
>> >
>>
>>


0
Paul
3/25/1998 6:34:20 PM
Reply:

Similar Artilces:

How can I count number of rows in each datawindow in composit datawindow then access and set item in each row in each datawindow!
This is a multi-part message in MIME format. ------=_NextPart_000_004F_01C308EA.58A195E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi friends, I created a composite datawindow includes three datawindow. How can I count the number of rows in each datawindow? (Rowcount() function can = not works). Also, I need access in each row then reset the value that I want = in each row in each datawindow. I use the property to access to get data in each row in each datawindow, but the right value only happens in the = fi...

How can I count number of rows in each datawindow in composit datawindow then access and set item in each row in each datawindow!
Hi friends, I created a composite datawindow includes three datawindow. How can I count the number of rows in each datawindow? (Rowcount() function can not works). Also, I need access in each row then reset the value that I want in each row in each datawindow. I use the property to access to get data in each row in each datawindow, but the right value only happens in the first row of each datawindow. It seems I used the loop access the value it doesn't work. Indeed, It has the all data for me but just right for the first row in each data window. Could you have any ideas, please!...

How can I count number of rows in each datawindow in composit datawindow then access and set item in each row in each datawindow! #2
This is a multi-part message in MIME format. ------=_NextPart_000_0043_01C308EA.0E4861E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi friends, I created a composite datawindow includes three datawindow. How can I count the number of rows in each datawindow? (Rowcount() function can = not works). Also, I need access in each row then reset the value that I want = in each row in each datawindow. I use the property to access to get data in each row in each datawindow, but the right value only happens in the = fi...

How to set a column invisible in a datawindow for a specific row.
anyone can help??? Hi, depends on how the specific row is specified. In general you have to use an expression for the visible property of the column. To hide the column in the first row, the expression is if( getRow() = 1 , 0, 1) If the expression returns 1, the column is visible, if 0 unvisible. It depends on your PB version, where to code this expression in the datawindow painter. Chris Werner "KIWA" <angtoonyew@hotmail.com> schrieb im Newsbeitrag news:Ss2r4oW6CHA.181@forums.sybase.com... > anyone can help??? > > KIW...

How can I set Background Color Of Datawindow Column For a Specific Row ?
Respected Friends, Using following code I can change datawindow background colour of a column. Datawindowcontrol.Object.column.Background.Color = RGB(255,128,0) But this will change colour of whole column. I want to change colour of this column , for certain specific ROWS depending on Runtime condition, and not all Rows. Can somebody give me a clue. Milind Vartak You can code it in the Font/Background color of the column. Ex: if(myCol = 1, rgb(255,255,255)...

Setting And Modifying Access 8.0 Table Properties In Datawindow
Can Anyone Help With This One It is my understanding that you can set and modify table properties of and MS Access 8.0 database through datawindow and indeed create and delete indexes and primary and foriegn keys. At least this is what the online help files and the written documentation with Power++ 2.0 specify. The technos at Sybase in Sydney Australia say that it depends on what information the ODBC drive for Access 8.0 send to the datawindow builder but this is contradictory to the documentation. Is this correct or have I just got a piece of software that has has a faulty s...

Setting And Modifying Access 8.0 Table Properties In Datawindow
Can Anyone Help With This One It is my understanding that you can set and modify table properties of and MS Access 8.0 database through datawindow and indeed create and delete indexes and primary and foriegn keys. At least this is what the online help files and the written documentation with Power++ 2.0 specify. The technos at Sybase in Sydney Australia say that it depends on what information the ODBC drive for Access 8.0 send to the datawindow builder but this is contradictory to the documentation. Is this correct or have I just got a piece of software that has has a faulty s...

Set font for specific column of specific row
How do you set the height, weight of a specific column of a specific row (either at runtime or design time)? TIA, Scott Expressions for font.height, font.weight Scott Crystal wrote in message <9Hzv#kdeBHA.318@forums.sybase.com>... >How do you set the height, weight of a specific column of a specific row >(either at runtime or design time)? >TIA, >Scott > > By setting up an expression for each of these properties, based on the condition that you want to control them... Can you give me an example, based on the text of a column equaling some va...

set background color for a specific column and specific row
- Using powerscript, how do I change the background color of a row for a specific column? P.S: I cannot change from datawindow because, I will need some nested if statements to determine the color to chag to and datawindow does not accept nested if right? - how do i highlight the whole row of a selected row? I used SelectRow() option. but if i click on a column (it will hightlight the whole row except for that column. That column will only be highlighted for the length of the text. I want the whole of the clicked column to be highlighted. Thank You. 1) Using power...

superreview granted: [Bug 297573] Modify JSS tests such that they access certs from platform specific directories : [Attachment 186564] Modified JSS/JSSE Client-Server tests to use platform specific
glen beasley <glen.beasley@sun.com> has granted Sandeep Konchady <Sandeep.Konchady@Sun.COM>'s request for superreview: Bug 297573: Modify JSS tests such that they access certs from platform specific directories https://bugzilla.mozilla.org/show_bug.cgi?id=297573 Attachment 186564: Modified JSS/JSSE Client-Server tests to use platform specific cert directory https://bugzilla.mozilla.org/attachment.cgi?id=186564&action=edit ------- Additional Comments from glen beasley <glen.beasley@sun.com> The logic is fine, but please fix the identation. ...

To set/not to set 'Visible' property of datawindow columns ?
Hello, If I have a datawindow and I have say 10 columns in the datawindow, which retrieve data, but need not be displayed... Is it advisable to set the 'Visible' property to '0' for such columns or does it have no performance impact at all ? TIA, Ganesh It's probably more advisable to delete the DW Column Objects. Deleting the objects in the presentation layer just means that the values are not visible; these data set column values are still accessible through Get/SetItem()'s, dw expressions, etc... Good luck, Terry [TeamPS] and Sequel...

Setting column's property in a datawindow from composite datawindow
Hi I know this is easy but I cant get it to work. I have two datawindows controls (dw_1, dw_2) in a composite datawindow (dw_report). I want to change Text of a header column of dw_2, so I try it using: 1. GetChild and Modify ------ datawindowchild ldw_child Int li_Rtn String ls_Error dw_Report.SetTransObject ( SQLCA ) li_Rtn = dw_Report.GetChild ( "dw_2", ldw_Child ) /* This returns 1, no problem */ If li_Rtn = 1 Then ls_Error = ldw_Child.Modify ( "item_number_t.Text = ~'New Text~' ") /* ls_Error is empty string, no problem, but report do...

How to set visible property of Gridview columns using column name instead of index
How to  set visible property of Gridview  columns using column name instead of index Dear janacpp, the columns collection of gridview has no indexer for column name. So you can do something like that:  in your code section you want to set the visible property add this code : GridView1.Columns[GridView1.Columns.IndexOf(GetField("FieldName"))].Visible=false;  where FieldName is the name of your field. and add this function:DataControlField GetField(string name) {DataControlFieldCollection fields = GridView1.Columns.CloneFields();for (int i = 0; i < f...

problem with the datawindow Rows-Update Properties
i am trying to set up a datawindow for a table with a compound primary key where one of the columns is a datetime column (ASE 11.5) : xpkactivity_action_note clustered, unique activity_num, action_datetime, resource_id, activity_action_id The action_datetime column doesn't appear in the Unique Key Columns() list box in the Specify Update Properties which results in the update not working properly because the where clause is incorrect... (the column is in the Updateable Columns list). when i press the Primary Key button, it selects the other 3 columns. i can't find a...

Web resources about - How to access and set row and column specific property using Modify() - sybase.powerbuilder.datawindow

Specific - Wikipedia, the free encyclopedia
Specific Pathogen Free , of a laboratory animal guaranteed free of particular (i.e., specific and named) pathogens "Specific" generally means ...

Specific activity - Wikipedia, the free encyclopedia
... SI quantity related to the phenomenon of natural and artificial radioactivity. The SI unit of "activity" is becquerel, Bq, while that of "specific ...

Post Planner Launches Time Zone-Specific Facebook Posting Feature
So your company is based in San Francisco, but you’ve got a big fan base in Berlin. Posting to your Facebook page at 3 p.m. from California means ...

PSA: Apple hasn’t fixed the Gatekeeper vulnerability, only blocked specific apps using it
... Gatekeeper reports that the vulnerability remains despite two security patches applied by the company. Each, he says, only blocks the specific ...

Facebook Tests Interest-Specific News Feeds on Mobile - Digital - Advertising Age
... have sections, and now so does Facebook's news feed, at least for some people. The social network has been experimenting with category-specific ...

Mad Catz launching Samsung-specific game controllers
... their game controllers to Samsung Mobile. Mad Catz is revealing at CES 2016 that they are developing controllers and game pads that are specifically ...

Navy Football to Feature Position-Specific 'Navy Fleet' Helmets for Army Game - Bleacher Report
For the first time in NCAA history, a college football team will have its players wearing different helmets during the game based on the position ...

The FTC has finally given some specific guidance on what native ads are meant to look like
... on a journalism website. The FTC has been exploring how to effectively police native advertising since 2013. On Tuesday it released specific ...

Nashua Public Schools Closed Following ‘Specific’ Threat Of Violence
All public schools in Nashua, NH, will be closed Monday after school officials received a detailed threat of violence involving the city's two ...

Obama: No 'specific and credible' holiday threat
CNN Obama: No 'specific and credible' holiday threat CNN Washington (CNN) President Barack Obama insisted Thursday that Americans should feel ...

Resources last updated: 1/18/2016 5:41:56 PM