Changing row color in datawindow

I need to know how we can change the color of a particular
column in a particular row without putting an expression in
datawindow background color. The requirement is For example
i want to change the color of column number 2 in only second
row without changing the color of any other coloumn and row
in the datawindow.

Appreciate your help in this issue.
0
Venugopal
10/15/2009 12:27:50 PM
sybase.powerbuilder.general 62418 articles. 16 followers. Follow

3 Replies
1129 Views

Similar Articles

[PageSpeed] 25

Hi,

why don't you want to put an expression in the
datawindow background color? AFAIK that is
the only way to achieve what you want.


Kind regards

Chris Werner
f+s software gmbh

<Venugopal> schrieb im Newsbeitrag 
news:4ad71546.732a.1681692777@sybase.com...
>I need to know how we can change the color of a particular
> column in a particular row without putting an expression in
> datawindow background color. The requirement is For example
> i want to change the color of column number 2 in only second
> row without changing the color of any other coloumn and row
> in the datawindow.
>
> Appreciate your help in this issue. 


0
Chris
10/15/2009 12:48:58 PM
You cant use expressions or you can change it dinamically?
Like this:

--------------------------------------------------------------------------
String ls_modify, ls_color1, ls_color2, ls_column, ls_error

ls_color1 = String(RGB(255,255,255))//White
ls_color2 = String(RGB(255, 0, 0))	//Red
ls_column = 'c_atendimento'

ls_modify =  ls_column+".background.mode = 0"+'~t'
ls_modify += ls_column+".backGround.color = '0~tif (getRow() = 2,
"+ls_color2+", "+ls_color1+")'"

ls_error = dw_2.modify(ls_modify)
if ls_error <> '' then messagebox('problems with the modify', 'modify:
'+ls_modify+'~nreturn: '+ls_error)
--------------------------------------------------------------------------
0
Dadald
10/15/2009 1:46:13 PM
Isn't that actually setting the expression? <G>
As Chris said, expressions are the way PB provides to compute properties at 
run time.
-- 
Report Bugs to Sybase:  http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests: 
http://my.isug.com/cgi-bin/1/c/submit_enhancement


"Dadald" <cdadald@hotmail.com> wrote in message 
news:a78fbbd0-5677-49e9-a126-3ceac26d8b82@b15g2000yqd.googlegroups.com...
> You cant use expressions or you can change it dinamically?
> Like this:
>
> --------------------------------------------------------------------------
> String ls_modify, ls_color1, ls_color2, ls_column, ls_error
>
> ls_color1 = String(RGB(255,255,255))//White
> ls_color2 = String(RGB(255, 0, 0)) //Red
> ls_column = 'c_atendimento'
>
> ls_modify =  ls_column+".background.mode = 0"+'~t'
> ls_modify += ls_column+".backGround.color = '0~tif (getRow() = 2,
> "+ls_color2+", "+ls_color1+")'"
>
> ls_error = dw_2.modify(ls_modify)
> if ls_error <> '' then messagebox('problems with the modify', 'modify:
> '+ls_modify+'~nreturn: '+ls_error)
> -------------------------------------------------------------------------- 


0
Jerry
10/15/2009 5:07:23 PM
Reply:

Similar Artilces:

change the color of a ROW in a datawindow
Can anyone tell me an easy way to change the color of a ROW in the detail band of a datawindow based on a value of a column in the row without using expressions on each column. Thanks in advance. Chris Chris, How about making all the columns transparent and only changing the band color? HTH, Sam Tai On Tue, 31 Aug 1999 16:48:05 -0400, in powersoft.public.powerbuilder.datawindow Chris <christopher.taylor@concert.com> wrote: >Can anyone tell me an easy way to change the color of a ROW in the detail >band of a datawindow based on a value of a column in the ...

Changing Row Color of DataWindow
I would like to have the rows of a datawindow alternate color. Kinda like simulating that old green-bar paper. (Client wants it) It seemed that the easiest way was to just let the datawindow object take care of the color change itself - thereby avoiding additional scripting. I wanted to use the expressions of the detail band to change the color depending on whether it is an even row or an odd row. However, I seem unable to get the datawindow to pay attention to anything I put in the expressions of the detail band (the color expressions). Timothy Madsen bdkmads@budget.state.ny....

Change color of row clicked in datawindow
I would like to change the color of a row in the dw when it is clicked on and the old row to go back to buttonface to better hightlight a clicked row. I tried putting a color formula in the detail band of the dw, but that doesn't seem to work once the rows are retrieved (not dynamic). I've experimented with putting a rectangle on the whole row and changing the properties of that rectangle but I can't change the properties for the rectangle on that specific row (changes rectangle color for all rows). Any ideas on how I can accomplish this dynamically as the user clicks ...

How to change row color between row
In order to let the userface more friendly,in a group datawindow,we want the row color changed between group,I write like following: "If(Mod(GetRow(),2) = 0, RGB(240,240,240), 553648127)" but this only works row by row,even changed color within one group.So how to realize when group change,the all rows in next group color changed? Thank you,wish to hear you guys soon. Try DW expression fuction Describe() ???? Jianbo_Li wrote: > In order to let the userface more friendly,in a group datawindow,we want > the row color changed between group,I write like...

Changing a row's text color in a datawindow
I am sorry that I forgot to mention a very important part to my question yesterday. Thanks to all of you guys who responded to my question previously posted. I am aware of the answers that you guys gave but that still doesn't help me in what I am trying to do. Here I will repost the same question with some of the additional stuff that I had missed: Let's assume that I have a datawindow(dw_client of type grid) with three columns client_first_name (char(50)),client_last_name and client_age. Lets say that this window returns 30 rows. Client First Name Client...

Changing a row's text color in a datawindow #2
Let's assume that I have a datawindow(dw_client) with two columns client_first_name (char(50)) and client_last_name. Lets say that this window returns 30 rows. Client First Name Client Last Name 1.)John Doe 2.)Gordon Summer .. .. .. 29.)Jo Guest 30.)John Smith How can I change the colors of the names at run time. I have no problem changing the color of the column text "Client First Name" but do have problems trying to change the color ...

How to conditionally change the text color of the row in a datawindow at the Script level
Hi, Can anyone tell me, how to conditionally change the text color or the color of a row in a data window at script level rather than at the datawindow level. thanks. Bye Gagan You can't directly. But here's what you can do... add a computed column (not a computed field. You'll have to add the computed column through the SQL. SELECT 0 AS computed_column). For the color of the text, use an expression to grab the value out of the computed column that you added. Then, in your script, you can just do a SetItem with the color you want the text to be. Bottom line....

Datawindow status changed after background color changed
I have a problem on the datawindow After I changed the background color and tab order of a column, in debug mode, I find the column by using gettext and getitemstring to get the data after retrieved. I can get the current row number and current column name, however, using gettext() is returned empty string, but using GetItemString() is return the actual data of this column. why the reason is different? Gettext() returns the value that is in the edit control that "floats" over datawindow columns (as the user tabs along). Thus, gettext() returns a value that may have...

change row color when the user check a row in gridview
Hello! I am posting this as a new thread. I got the answer from Alen. I wasn't able to make it work. This is the code.protected void gvMessages_RowDataBound(object sender, GridViewRowEventArgs e) {if (e.Row.RowType == DataControlRowType.DataRow) {e.Row.Attributes.Add("onclick", "this.style.backgroundColor='red'");e.Row.Style["cursor"] = "hand"; } } What is not working? Try this: e.Row.Attributes.Add("OnClick", "this.style.backgroundColor = 'Red';"); Thanks,MaxLet Me Google That For You! Than...

Changing Gridview row color based on value in that row
Hello, I am having difficulty changing the row color of my gridview. My gridview is displaying order information. It allows the user to select, edit and delete rows. I would like to display all rows with the delivery value of YES to green, and the delivery value of NO to red. Below is my code for the sqlDataSource and the gridview. I would greatly appreciate any help.<asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" DeleteCommand="DELETE FROM [OrderDetail] WHERE [OrderID] = @...

Changing the color of the Row in a Gridview on click of Radio Button in the Row
I have a GridView. One of its columns contain Radio Buttons. NOw on click of Radio button in a particular Row, I want to change the Background and Foreground Colors of that Gridview Row. Once the next Row is clicked, I want the color to change back to the original color. I am using the following template for Radio Button because of other functional requirement.                           <asp:TemplateField HeaderText="Select">   &nbs...

Changing Background color of grid row when row checkbox selected
What option should I choose:1) Write java script for this2) Write server code and have grid in UpdatePanel?Not clear what the best guidline would be. I am already using update panel for that grid.Rafal Zikbay.com - Free Classifieds (Search Over 5 mln jobs on Zikbay.com) DNN Direct I guess the best solution should be if I have defined this background color in CSS.. I guess I could use java script to change the class name dynamicly and have that class defined in CSS. Not sure how to do it... Rafal Zikbay.com - Free Classifieds (Search Over 5 mln jobs on Zikbay.com) DNN Direct Here&#...

Change color of gridview row when we click row checkbox clear when we unclick
Hi frinds//  I have question.. I needto change the color of gridive when we click checkbox in the gridview..sam time when we unselected selected checkbox it should come previous color can any one help me ASAP thanks..   hi, i'm not sure if you want the gridview to change color or the gridview row containing the checked/unchecked checkbox to change color upon selection. I assume the gridviewrow and as such i have written a small sample code. To try the sample, add a new .aspx page into your project and replace it's contents with the following code and run :  &l...

Change color of a row.
Dear all, How to change the background color of a specific row in a datawindow. For example, row 1,6,7 in red but 2,3,4,5,8,9 in blue. Thanks in advance. Regards, Thomas. Thomas, Place an expression in the color attribute of the detail band. In your specific example, the expression would be: CASE( getrow() when 1, 6, 7 then RGB( <whatever red is> ) when 2,3,4,5,8,9 then RGB( <whatever blue is> ) ELSE RGB(255,255,255)) Paul Horan [TeamSybase] Buffalo, NY "Thomas Kwong" <tomkwong@i-cable.com> wrote in message news:4axBHU6SAHA.162@forums.s...

Web resources about - Changing row color in datawindow - sybase.powerbuilder.general

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Intelligent Versus Surrogate Keys
Should I use business columns as primary key fields for tables in thedatabase, or generate artificial primary key values? When business-related ...

chevy volt
ProEXR File Description =Attributes= channels (chlist) compression (compression): Zip dataWindow (box2i): [0, 0, 5119, 2475] displayWindow (box2i): ...

Enable - A comprehensive solution for the localization of PowerBuilder applications Untitled Document ...
Enable is localization/ translation tool used by PowerBuilder developers to make their applications multilingual.Enable is a powerful tool that ...

comp.lang.clipper.visual-objects - Google Groups
comp.lang.clipper.visual-objects 1-20 von 33006 Themen werden angezeigt Integrity of a file marcosm...@gmail.com 09:35 Combobox value Lu 08:12 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
Developers can choose Win32 or newer style .Net development

PowerToTheBuilder - PowerBuilder UI Controls
HOME - COMPONENTS - PB UI DESIGNER - DOWNLOAD\PURCHASE - SUPPORT - FAQ - ABOUT Take Control of your UI with PB Ultimate Suite PowerToTheBuilder.com ...

Beautiful iPad Mini 3 Concept Reimagines Appleā€™s Tablet With iPhone 6 Design, Gold Color [Images]
The iPhone 6 may be grabbing all of the recent headlines due to its impending announcement, but spare a thought for those who prefer to stay ...

Java Networking - Real's HowTo
Real's HowTo Custom Search Java Language String and Number Applet AWT Swing Environment IO Javascript interaction JDBC Thread Networking JSP ...

Business Intelligence Products - Database Management, Data Warehousing & Mobility Software - Sybase Inc ...
Sybase offers a variety of Business Intelligence (BI) software like products for database management, data warehousing and mining, data integration ...

Resources last updated: 11/22/2015 12:36:39 AM