dw.Rows and dw.Columns in dw.NET 1.5

Hi,

I have extended (in VB.NET) the datawindow.NET 1.5 by adding 2 simple 
collections : Columns and Rows.

I can now use the datawindow / datastore just like the .NET DataTable.

For example (VB.NET) :

To enumerate columns and set the backcolor to red :
For each col As DatawindowColumn in dw.Columns
  Debug.WriteLine("column " & col.ColumnName & " type " & col.ColumnType)
  col.BackColor = Color.Red
Next

To set the value of 0 to column "foo" of each rows :
For each row As DatawindowRow in dw.Rows
   row("foo") = 0
Next

To get the value of "foo" of the 30th row :
Debug.WriteLine(dw.Rows(30)("foo"))

if the value is NULL it returns DBNull.Value
the value is always in the good type.

New classes in my Company.Datawindow namespace :
DatawindowColumn (a dw column, expose some properties to handle the modify / 
describe (ie BackColor))
DatawindowColumns (Inherits System.Collections.DictionaryBase)
DatawindowRow (a simple row)
DatawindowRowEnumerator (Implements IEnumerator)
DatawindowRows (Implement IEnumerable)
Datawindow (Inherits Sybase.Datawindow.DatawindowControl)
Datastore (Inherits Sybase.Datawindow.DataStore)

I create Rows and Columns collections by overriding the function 
OnDataWindowCreated.

=========================================================================
Also added to the original control :
-SetAlternRow (simply set the datawindow to alternate the background color 
of the detail band),
-SetSelectionType (backcolor, selectrow, multiple/single),
-SaveImagesToDatabase (save images of a datawindow to an MSSQL database),
-RestoreImagesFromDatabase,
-SaveToDatabase (save the "FullState / Changes" of a datawindow to an MSSQL 
database),
-LoadFromDatabase,
-RenderBarcode (generate barcode 3 of 9 on the fly for a given field, no 
special font needed)
-Translate (translate datawindow labels to a given language using a simple 
caption system)
-Event RowClick (with the datawindow object clicked // the famous 
ObjectUnderMouse hehehe)
-Event RowDoubleClick
=========================================================================

If you need tips to add this kind of features to your Datawindow, I'm here 
to help you !

S�bastien Chandonnet 


0
S
3/31/2006 6:15:41 PM
sybase.datawindow.net 2302 articles. 0 followers. Follow

1 Replies
1253 Views

Similar Articles

[PageSpeed] 36

Excellent! Thanks for sharing this. Another way to share this with the
user community is to create an example application and upload it to
the DataWindow .NET section on CodeXchange
(http://codexchange.sybase.com).

Thanks for helping other DataWindow .NET customers!

Regards,
Dave Fish
Sybase

On 31 Mar 2006 10:15:41 -0800, "S�bastien Chandonnet"
<sebastien.chandonnet@Groupe-Thibodeau.com> wrote:

>Hi,
>
>I have extended (in VB.NET) the datawindow.NET 1.5 by adding 2 simple 
>collections : Columns and Rows.
>
>I can now use the datawindow / datastore just like the .NET DataTable.
>
>For example (VB.NET) :
>
>To enumerate columns and set the backcolor to red :
>For each col As DatawindowColumn in dw.Columns
>  Debug.WriteLine("column " & col.ColumnName & " type " & col.ColumnType)
>  col.BackColor = Color.Red
>Next
>
>To set the value of 0 to column "foo" of each rows :
>For each row As DatawindowRow in dw.Rows
>   row("foo") = 0
>Next
>
>To get the value of "foo" of the 30th row :
>Debug.WriteLine(dw.Rows(30)("foo"))
>
>if the value is NULL it returns DBNull.Value
>the value is always in the good type.
>
>New classes in my Company.Datawindow namespace :
>DatawindowColumn (a dw column, expose some properties to handle the modify / 
>describe (ie BackColor))
>DatawindowColumns (Inherits System.Collections.DictionaryBase)
>DatawindowRow (a simple row)
>DatawindowRowEnumerator (Implements IEnumerator)
>DatawindowRows (Implement IEnumerable)
>Datawindow (Inherits Sybase.Datawindow.DatawindowControl)
>Datastore (Inherits Sybase.Datawindow.DataStore)
>
>I create Rows and Columns collections by overriding the function 
>OnDataWindowCreated.
>
>=========================================================================
>Also added to the original control :
>-SetAlternRow (simply set the datawindow to alternate the background color 
>of the detail band),
>-SetSelectionType (backcolor, selectrow, multiple/single),
>-SaveImagesToDatabase (save images of a datawindow to an MSSQL database),
>-RestoreImagesFromDatabase,
>-SaveToDatabase (save the "FullState / Changes" of a datawindow to an MSSQL 
>database),
>-LoadFromDatabase,
>-RenderBarcode (generate barcode 3 of 9 on the fly for a given field, no 
>special font needed)
>-Translate (translate datawindow labels to a given language using a simple 
>caption system)
>-Event RowClick (with the datawindow object clicked // the famous 
>ObjectUnderMouse hehehe)
>-Event RowDoubleClick
>=========================================================================
>
>If you need tips to add this kind of features to your Datawindow, I'm here 
>to help you !
>
>S�bastien Chandonnet 
>
>

0
dfish
3/31/2006 9:54:08 PM
Reply:

Similar Artilces:

What's compatible with DW.NET 2.0 and DW.NET 2.5
The group I work with does nothing but PB applications. Finally there is some interest in moving some of our applications away from PB towards the .Net area. Currently we are not interested in what PB 11 is offering in the .NET area. We would like to be in a more 'native' .NET environment. Now with that being said , we are in the VERY early stages of using Visual Studio and Datawindow.NET. We have already found some issues with DW.NET 2.5 and VS 2008 that are making it difficult to move forward. So here is my question. What versions of VS and DW.NET actually work well tog...

What's compatible with DW.NET 2.0 and DW.NET 2.5?
The group I work with does nothing but PB applications. Finally there is some interest in moving some of our applications away from PB towards the .Net area. Currently we are not interested in what PB 11 is offering in the .NET area. We would like to be in a more 'native' .NET environment. Now with that being said , we are in the VERY early stages of using Visual Studio and Datawindow.NET. We have already found some issues with DW.NET 2.5 and VS 2008 that are making it difficult to move forward. So here is my question. What versions of VS and DW.NET actually work well tog...

Composite Report Rendering Problem in ASP.net using DW.Net 1.5.1
Hi, I have a Problem in displaying composite and nested web datawindows in .aspx page . the generated out put is not formatted as it is in the DW designer. I am using "xhtml" rendering format. and also specified "UrlPath" but it still not works. can anyone help around this issue. thanx in advance ...

DW.NET 1.5 support for ADO.NET
Does the new version 1.5 support ADO.NET from Sybase? Only via OLE-DB. On 21 Dec 2004 05:34:43 -0800, "Germano" <gsilva3891@yahoo.com> wrote: >Does the new version 1.5 support ADO.NET from Sybase? > Will a future version support it? It does not make much sense to have support for Microsoft's ADO.NET and not Sybase's own ADO.NET "Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com> wrote in message news:bdegs01trng2706pugk8kracqg7elq250r@4ax.com... > Only via OLE-DB. > > On 21 Dec 2004 05:34:43 -0800, "...

Support of PB 11.5.1 datawindow syntax in DW.NET 2.5
Hello, we have migrated our PowerBuilder development to PowerBuilder 11.5.1. Until now, we were simultaneously using our datawindows (developed in PB for our main Client/Server app) in ASP.NET application with Datawindow.NET. Now, when trying to use datawindow from PB 11.5.1 in DW.NET, we are getting error: "Line 2 Column 65; incorect syntax." I assume that DW.NET 2.5 does not support PB 11.5.1 datawindow syntax yet. Is there any workaround for this issue, or will there be a newer DW.NET release supporting this new datawindow syntax? LM use C:\Program Files\Sybase\...

Selecting rows in DW .NET 1.5 versus PB
From an interface perspective, can anybody recommend a good way to handle selecting rows in a DW .NET 1.5 datawindow? In our PB application, we have many windows in which we present a list of items to the user, have him click on one or more of the items, and then click a button to perform some action on the selected item(s). When the user clicks on a row, we indicate it as selected in what I believe is the standard PB way -- we highlight the entire row. However, it seems like implementing the same behavior in DW .NET would be difficult to do. I am toying with some other ideas (...

DW.NET 1.5 ASP.NET support
Hi there, I am new to DW.NET (and indeed VS.NET). I have a pretty mature PB app and have been waiting for DW.NET to appear so I can work on porting to the web as a .NET app. I am well aware from this newsgroup that 1.5 is not out yet but I want to get started in my initial thoughts on the best way forward. If I do some initial work on Winforms, will I come across fundamental differences in the way Sybase have implemented the ASP.NET support in v1.5? Basically, should I wait for 1.5 or carry on with Winforms and then be able to apply what I have done when Webforms support a...

question about datawindow.net 1.5(beta) 's dropdown dw
hello, I use dw.net1.5beta to test datawindow.net. I create one pbl file that contains three datawindow objects. They are dw_mian, dw_child,dw_other. dw_child and dw_other are used by dw_mian as dropdown datawindow. I use vs.net2003 to create a windows control that will be run in a web page, and the windows control will show the dw_main datawindow. When i run the windows control at one web page,the datawindow retrieves the right data, and the dropdown datawindow works correctly; then i retrieve the data again or insert one new row, the dropdown datawindow can not work,it's se...

Dynamically Refreshing a Drop Down on ItemChange of Another column (DW .Net 1.5 )
How do I dynamically refresh a drop down on a column of datawindow on itemchange of another column ? Ravi Use the itemchanged event and there code GetChild, SetTransaction and Retrieve for the child. On 16 Feb 2006 10:47:56 -0800, "Ravi" <sas@sasintl.com> wrote: >How do I dynamically refresh a drop down on a column of datawindow on >itemchange of another column ? > >Ravi > ...

DW.Net 1.5
I can assign a Datawindow object at run time, throws error. Any idea why? i mean't i can not... "vipin wagh" <vwagh@spherix.com> wrote in message news:41ba0d96$1@forums-1-dub... > I can assign a Datawindow object at run time, throws error. > Any idea why? > > vipin wagh wrote: > i mean't i can not... > "vipin wagh" <vwagh@spherix.com> wrote in message > news:41ba0d96$1@forums-1-dub... > >>I can assign a Datawindow object at run time, throws error. >>Any idea why? >> >> > &g...

DW Designer 2.5 & DW.net with VS 2008 on Vista
Hi, Due to a recent disk failure, I now find myself working with Visual Studio 2008 on Vista. Previously, I had VS 2005 on XP. My first problem is that the library painter in the DW Designer only shows the Public folder under Users, so I can't navigate to my Documents folder. This somewhat surprising, since the Open Project dialogue shows all available paths. Does anyone know how to solve this? Secondly, when I run the application, I'm getting a message telling me that I'm running a trial version of the datawindow.net and that it expires in 0 days. Where has...

Height of Rows in Web DW's (DW.NET 2.0)
How does dw.net calculate the height of a div for a web dw? I have a dw which has one autosized height column. This column can contain thousands of words. DW.net is adjusting the height of the column properly but is leaving a very large empty gap between rows (we're sometimes talking about 500 pixels here). The gap is not constant - the more text the column contains (thus greater the height) the greater the gap. ...

DW.NET 1.0 vs. 1.5 (and beyond)
Ladies & Gents I've got the dw.NET 1.0 that came with our PB 10 Enterprise license. I've been tinkering here & there, and I want to venture into using the little beastie to do some more involved development in .NYET. I've been using PB for over 10 years so datawindows are pretty much second nature. I've avoided .NYET because of the phenomenal headaches I've encountered attempting to do data access and presentation. Before I get too deep, my question(s) is (are), what can 1.5 do that 1.0 can not? Are there major shortcomings in 1.0 that are address...

Is DataWindow 2.5 in Dw.Net is same as DataWindow in PB11.2
Hi there , Can anybody confirm the said subject is a valid statement ? Dw.Net2.5 = PB11.2.DataWindow ???? How about the future enhancements which are planned for PB11.5 and future releases of PB... Will it not always be in the same codestreamline ? Regards , Van I mean how will be co-relate the three products from Sybase 1) DataWindow.Net 2.5 for Visual Studio 2008 2) PocketPowerBuilder Datawindows 3) PowerBuilder11.2 and Powerbuilder1x.x Datawindows All everthing is remain the same in all the above three products as far as Datawindow properties / events /...

Web resources about - dw.Rows and dw.Columns in dw.NET 1.5 - sybase.datawindow.net

Politics, Political News - The Capitol Column
Covering the politics of science, technology, business, entertainment, Capitol Hill, and health.

Column (typography) - Wikipedia, the free encyclopedia
In typography , a column is one or more vertical blocks of content positioned on a page, separated by gutters and/or rules . Columns are most ...

Column 8
&quot;I await the usual outrage after the announcement that the price of postage stamps is set to rise,&quot; writes Susan Tomlin, of Port Stephen. ...

Paris attacks: column in IS magazine warns of 9/11-scale attack to come
Under the byline of a hostage British journalist, Islamic State warns that it may attempt a terrorist attack even bigger than 9/11.

The 10 Best Online Columns Of All Time . . .
Former Biglaw partner and inhouse columnist Mark Herrmann identifies the ten best online columns of all time.

Should the Washington Post’s Ties to Reagan Library Be Disclosed in Columns Attacking Bill O’Reilly?
Much has been discussed regarding the recent spat between Washington Post columnist and Fox News contributor George Will and Fox News host and ...

Patt Rall Column: A little 'Therapy' goes a long way
Patt Rall Column: A little 'Therapy' goes a long way Bemidji Pioneer The entire ensemble is small but intense in their artistic pursuits: Norwood ...

Check out the highest-rated comment on this WaPo column, "The American Dream? I thought so, until I had ...
... maternity leave to be with a child you chose to have while still eating out, watching HBO, and buying a new car." The author of the column is ...

Tim O'Sullivan column: Giving thanks to our father figures on this holiday
Concord Monitor Tim O' Sullivan column: Giving thanks to our father figures on this holiday Concord Monitor That man would be Celtics basketball ...

‘Carol’ Producer Stephen Woolley: Todd Haynes Film A Cautionary Tale For Threatening Times – Guest Column ...
As the Oscar-nominated producer of The Crying Game and Made In Dagenham , stories about gender and equality have always spoken to me, and none ...

Resources last updated: 12/10/2015 9:02:24 PM