dynamically create computed button column using getrow number as button.text

Hi,

      I'm trying to dynamically create a button column where
the text on the button is the number I get from using the
getrow() function.

I'm sort of stuck on trying figure out the correct syntax to
use with the create column command.

So far, I have something like this in C#:

dw1.Modify("create column(band=detail id=5 x=\"2662\"
y=\"8\" height=\"64\" width=\"279\" edit.limit=5
alignment=\"0\" font.face=\"Tahoma\" font.height=\"-8\"
font.weight=\"400\" font.charset=\"0\" font.pitch=\"2\"
font.family=\"2\" font.underline=\"0\" font.italic=\"0\"
font.strikethrough=\"0\" border=\"0\" color=\"0\"
background.mode=\"1\" background.color=\"536870912\" 
edit.autoselect=yes edit.autohscroll=yes edit.autovscroll=no
edit.focusrectangle=no )");


It seems like when I create a column, the id has to already
exist in the datawindow.  Is it possible to create a brand
new computed column that does not exist in the database? 
Thanks!
0
coder12345
6/20/2007 2:04:12 AM
sybase.datawindow.net 2302 articles. 0 followers. Follow

3 Replies
436 Views

Similar Articles

[PageSpeed] 23

Can you add the button to the row in the DataWindow Designer? If so
you can just use a DataWindow expression for the button text. 

Click on the little equals sign button with a slash through it next to
theText field on the General property tab and enter:

String(GetRow())

But back to your original question. Did you use the DWSyntax tool that
comes with the DataWindow Designer to get the syntax for creating a
DataWindow button using the Modify method? You can find it by clicking
on the New toolbar button and then clicking on the Tools tab. Modify
and Describe can be a real bear without it. 

And yes you can create a computed column for a column that doesn't
exist in a database table. You can do that in the SQL Painter in the
DataWindow Designer. Just click on the Compute tab towards the bottom
and enter it there. 

Another good way to figure out how to dynamically modify the
DataWindow at runtime is to export the DataWindow and review the
syntax in a text editor. Just right click on it in the system treeview
and select Export. 

Regards,
Dave Fish
Sybase

On 19 Jun 2007 19:04:12 -0700, coder12345 wrote:

>
>Hi,
>
>      I'm trying to dynamically create a button column where
>the text on the button is the number I get from using the
>getrow() function.
>
>I'm sort of stuck on trying figure out the correct syntax to
>use with the create column command.
>
>So far, I have something like this in C#:
>
>dw1.Modify("create column(band=detail id=5 x=\"2662\"
>y=\"8\" height=\"64\" width=\"279\" edit.limit=5
>alignment=\"0\" font.face=\"Tahoma\" font.height=\"-8\"
>font.weight=\"400\" font.charset=\"0\" font.pitch=\"2\"
>font.family=\"2\" font.underline=\"0\" font.italic=\"0\"
>font.strikethrough=\"0\" border=\"0\" color=\"0\"
>background.mode=\"1\" background.color=\"536870912\" 
>edit.autoselect=yes edit.autohscroll=yes edit.autovscroll=no
>edit.focusrectangle=no )");
>
>
>It seems like when I create a column, the id has to already
>exist in the datawindow.  Is it possible to create a brand
>new computed column that does not exist in the database? 
>Thanks!
0
Dave
6/20/2007 4:26:36 AM


Hi Dave,

      Thanks for the suggestions.  I don't know if it's me,
but I tried getting thru the dw tutorial twice and I kind of
gave up on it each time because it's just too confusing to
follow.  I did, however, manage to create the button and get
the text to show correctly by using the designer and your
descriptions of where everything was. =)

I was wondering if there is a way to create an entire column
of buttons?  Is the best way to just iterate and create a
button for each row?










> Can you add the button to the row in the DataWindow
> Designer? If so you can just use a DataWindow expression
> for the button text.
>
> Click on the little equals sign button with a slash
> through it next to theText field on the General property
> tab and enter:
>
> String(GetRow())
>
> But back to your original question. Did you use the
> DWSyntax tool that comes with the DataWindow Designer to
> get the syntax for creating a DataWindow button using the
> Modify method? You can find it by clicking on the New
> toolbar button and then clicking on the Tools tab. Modify
> and Describe can be a real bear without it.
>
> And yes you can create a computed column for a column that
> doesn't exist in a database table. You can do that in the
> SQL Painter in the DataWindow Designer. Just click on the
> Compute tab towards the bottom and enter it there.
>
> Another good way to figure out how to dynamically modify
> the DataWindow at runtime is to export the DataWindow and
> review the syntax in a text editor. Just right click on it
> in the system treeview and select Export.
>
> Regards,
> Dave Fish
> Sybase
>
> On 19 Jun 2007 19:04:12 -0700, coder12345 wrote:
>
> >
> >Hi,
> >
> >      I'm trying to dynamically create a button column
> where >the text on the button is the number I get from
> using the >getrow() function.
> >
> >I'm sort of stuck on trying figure out the correct syntax
> to >use with the create column command.
> >
> >So far, I have something like this in C#:
> >
> >dw1.Modify("create column(band=detail id=5 x=\"2662\"
> >y=\"8\" height=\"64\" width=\"279\" edit.limit=5
> >alignment=\"0\" font.face=\"Tahoma\" font.height=\"-8\"
> >font.weight=\"400\" font.charset=\"0\" font.pitch=\"2\"
> >font.family=\"2\" font.underline=\"0\" font.italic=\"0\"
> >font.strikethrough=\"0\" border=\"0\" color=\"0\"
> >background.mode=\"1\" background.color=\"536870912\"
> >edit.autoselect=yes edit.autohscroll=yes
> edit.autovscroll=no >edit.focusrectangle=no )");
> >
> >
> >It seems like when I create a column, the id has to
> already >exist in the datawindow.  Is it possible to
> create a brand >new computed column that does not exist in
> the database?  >Thanks!
0
coder12345
6/21/2007 6:25:13 PM
I'm not clear on what you are trying to do. Can you provide more
details or an example? 

Regards,
Dave Fish
Sybase

On 21 Jun 2007 11:25:13 -0700, coder12345 wrote:

>
>
>
>Hi Dave,
>
>      Thanks for the suggestions.  I don't know if it's me,
>but I tried getting thru the dw tutorial twice and I kind of
>gave up on it each time because it's just too confusing to
>follow.  I did, however, manage to create the button and get
>the text to show correctly by using the designer and your
>descriptions of where everything was. =)
>
>I was wondering if there is a way to create an entire column
>of buttons?  Is the best way to just iterate and create a
>button for each row?
>
>
>
>
>
>
>
>
>
>
>> Can you add the button to the row in the DataWindow
>> Designer? If so you can just use a DataWindow expression
>> for the button text.
>>
>> Click on the little equals sign button with a slash
>> through it next to theText field on the General property
>> tab and enter:
>>
>> String(GetRow())
>>
>> But back to your original question. Did you use the
>> DWSyntax tool that comes with the DataWindow Designer to
>> get the syntax for creating a DataWindow button using the
>> Modify method? You can find it by clicking on the New
>> toolbar button and then clicking on the Tools tab. Modify
>> and Describe can be a real bear without it.
>>
>> And yes you can create a computed column for a column that
>> doesn't exist in a database table. You can do that in the
>> SQL Painter in the DataWindow Designer. Just click on the
>> Compute tab towards the bottom and enter it there.
>>
>> Another good way to figure out how to dynamically modify
>> the DataWindow at runtime is to export the DataWindow and
>> review the syntax in a text editor. Just right click on it
>> in the system treeview and select Export.
>>
>> Regards,
>> Dave Fish
>> Sybase
>>
>> On 19 Jun 2007 19:04:12 -0700, coder12345 wrote:
>>
>> >
>> >Hi,
>> >
>> >      I'm trying to dynamically create a button column
>> where >the text on the button is the number I get from
>> using the >getrow() function.
>> >
>> >I'm sort of stuck on trying figure out the correct syntax
>> to >use with the create column command.
>> >
>> >So far, I have something like this in C#:
>> >
>> >dw1.Modify("create column(band=detail id=5 x=\"2662\"
>> >y=\"8\" height=\"64\" width=\"279\" edit.limit=5
>> >alignment=\"0\" font.face=\"Tahoma\" font.height=\"-8\"
>> >font.weight=\"400\" font.charset=\"0\" font.pitch=\"2\"
>> >font.family=\"2\" font.underline=\"0\" font.italic=\"0\"
>> >font.strikethrough=\"0\" border=\"0\" color=\"0\"
>> >background.mode=\"1\" background.color=\"536870912\"
>> >edit.autoselect=yes edit.autohscroll=yes
>> edit.autovscroll=no >edit.focusrectangle=no )");
>> >
>> >
>> >It seems like when I create a column, the id has to
>> already >exist in the datawindow.  Is it possible to
>> create a brand >new computed column that does not exist in
>> the database?  >Thanks!
0
Dave
6/23/2007 8:15:21 PM
Reply:

Similar Artilces:

I Want to create a tool box,toolbox contains image button and fileupload.These two buttons can be added at runtime(user can add any number of image button and fileupload button dynamically by click)
I Want to create a tool box,toolbox contains image button and fileupload buttons.These two buttons can be added at runtime(user can add any number of image button and fileupload button dynamically by click).for every image user will browse images using fileuploader and he will add the image to that imagebutton at runtime. how to write server side coding to upload the selected image and to set that image to imagebutton at runtime? is it possible? any other way to do it?  advance thanks ask123: I Want to create a tool box,toolbox contains image button and fileupload b...

Creating a Dynamic button from another Dynamic Button
Hi, I have created a button Dynamically as follows: Button b=new Button(); b.Text="Hello"; this.Controls.Add(b); b.Show(); How to create another Button(some Button) when clicked on the above created button. You have to handle the on click event of the dynamic button. In the onclick event you can create another button in the same way as you have done. Remember to create the dynamic button on every post back other wise you will not be able to capture the click event..Vikram www.vikramlakhotia.comPlease mark the answer if it helped you try this link: http://support.mic...

How to get the value of dynamically created text box which is created dynamically on click of button control.
<p>Dear AllI am new in asp.net.I am doing one project there I have one doubt.what I want is I have taken two  button controls in my page, in click of first button1 I have  dynamically created one textbox and I added this textbox to my page and also set the id for this textbox,.after that in click of second button2 I want that the value of the textbox will be print in my page by getting the value of the textbbox. some codes are given below. <form id="form1" runat="server">    <div>      ...

In vb.net/asp.net why we use Me.textbox1.text, what is the reason using Me in front of every textbox or button.
In vb.net/asp.net  why we use Me.textbox1.text,  what is the reason using Me in front of every textbox or button.   please tell me why?   thank you maxmax Me is just a qualifier that is used to refer to a current instance of the class you are in. Some people use them for clarification, but they aren't needed and are sometimes considered redundant. I use "Me" (VB.Net) or "this" (C#) when referring to methods or properties within the current class, but that's just a personal choice. You too can choose to use or not. http://msdn2.microsof...

dynamically create buttons/checkbox/radiobuttons in datawindow based on number of rows?
?dynamically create buttons/checkbox/radiobuttons in datawindow based on number of rows? e.g. if I have 5 rows in datawindow with one column name. John, Jack, Joe, Jill, Cynthia. I want to create 5 buttons or radio-buttons based on that data so user can click on them. The following syntax is for creating buttons (You will need to substitute your text,x,y,etc... with what ever you want). The CheckBox/Radio Buttons are a property setting in the column (style type) so you would just need to modify the appropriate column. lsMod = 'create button(band=detail text="B...

Please guide
Hi, I am creating dynamic panels and each of these panels have an image and a button. I would like to show a modal popup when the button of the panel is clicked. Contents of popup depend on which button was clicked. I would sincerely appreciate if some one could guide me if this is possible with Ajax and AjaxControltoolkit. Till now I tried to create modalpopupextended dynamically in the click event of button and page fails with an error message that TargetControl could not be found. Please guide. Regards & thanks Kapil    Hi Kapil, Unfortunately, the ModalPopup must h...

Buttons Creating Buttons
I'm working on a web app where I dynamically add controls depending on the results from a sql query, no problem so far. One of the controls is a button that calls an event. Within that event I dynamically add some more controls to the page, including some more buttons that are supposed to call other events. Here is the problem, the second level of buttons do not call their events. You click the button and the page does a postback without the button events firing. From what I've found the reason is that the assigning of the event handler for the second buttons happens in an ...

dynamically create button column
Hi, is there a way to dynamically create a datawindow with a button column? Right now, I am using something similar to: string DataWindowSyntax = DataWindowSyntaxGenerator.DataWindowSyntaxFromSql(SqlTransaction , SQLSelectStatement, DataWindowStyle.Grid); DataWindowControl1.Create(DataWindowSyntax); The Modify method accepts a create keyword that allows you to dynamically create controls. The syntax is best determined by looking at the syntax for existing controls. On 14 May 2007 02:18:18 -0700, coder12345 wrote: > >Hi, is there a way to dynamically create a dat...

Can I use asp:button create a reset button?
Can I use asp:button create a reset button? on the clients it's source would be <input type="reset" name="reset" value="reset"> I'm not sure but you can certainly mix asp buttons and (old-school) HTML buttons on one page. Ofcourse you can also create a normal button and write code that resets all the data. But personally I would go for the HTML button.Support your local bands!! You cannot use <asp:Button> to make a reset button. But you can use your original HTML or, if you want it to be a "server-side" control where you c...

Radio button list, how to display text under the button or before the button?
Hello Everyone, I am using radio button list in web form in horizontal direction. Radio button are coming first then text relevant to button. I want radio buttons to be displayed in that text should be displayed in bottom of radio button. (it is just like radio button in 1st row and text in 2nd row). Please also guide how I can display text before radio button. Thanks in anticipation, Regards, Haansi Use TextAlign for the right/left.  To have the text show below the radio button, I can only think of using RadioButton controls instead, ...

Dynamically created button & event handler for the button
I know that this question has been addressed a few times on these forums. I have looked over the posts that are refering to this process but I am still very confused. So I am posting here to see if someone could clear it up for me, I am a beginner at this so I must not be understanding previous posts. Here is the run down of what I am trying to accomplish. I have a page that has one button on it (button1) and a panel (panel1). When I click button1 I would like it to display another button (button2) on panel1. Then when you click button2 it will display a label on the panel. Panel1 a...

button.click for dynamically created button(Please help!)
Hi, I have a simple webform with only 2 web controls (panel1 and button1) Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim _btn As Button = New Button _btn.Text = "Submit" _btn.Visible = True _btn.ID = "btnSubmit" AddHandler _btn.Click, AddressOf Me.submitBtnClicked Me.Panel1.Controls.Add(_btn) End Sub Private Sub submitBtnClicked(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim s As String = &q...

on click event is not working properly for dynamically generated buttons in asp.net using vb.net
Hi All,          While creating buttons dynamically,the on click event is not getting called.below is my code Dim btn As New Button() btn.ID=x btn.text="delete" ---------------- AddHandler btn.click,AddressOf btn_Click   Private Sub btn_Click(ByVal sender as Object,ByVal e as System.EventArgs) MsgBox("Hi") End Sub Thanks in advance  what is the code you are calling with the button?  You can't call javascript like that if your example is the code..."If God exists, I hope he has a good excuse....

when is button not a button?
How can I substitute an .gif file for the default display of the button? I know there must be a simple way to do so.iisdem furoribus Use an asp:imagebutton and set the ImageUrl ... http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebUIWebControlsImageButtonClassTopic.asp...

Web resources about - dynamically create computed button column using getrow number as button.text - sybase.datawindow.net

Placebase team at Apple file “Schematic Maps” patent dynamically detailing important data
In a report from Computerworld way back in 2009, we learned that Apple had quietly acquired Maps API company Placebase. Then, founder of Placebase ...

Apple's Lightning port dynamically assigns pins to allow for reversible use
... a closer look at how Apple's new Lightning connector works, and has come to the conclusion that the 8 pins on each side of the plug are dynamically ...

In a dynamically typed language, is it a bad idea to return different data types?
In some cases, returning different types from a single function works.

Urlbox Launches Screenshots-as-a-Service Platform to Dynamically Update Galleries
... changes. Launched yesterday, Urlbox allows anyone with a gallery displaying website screenshots to automate the process and keep them dynamically ...

Everything.me launcher dynamically adapts to what you’re doing right now
... phone according to what you’re doing. Perform a search for ‘football’ and your background will change to the NFL logo. A launcher that dynamically ...


A YouTube Experiment Resizes the Player Dynamically
There's a new YouTube experiment that changes the video player's size, depending on the browser window's size. When resizing Chrome's window, ...

Apple Granted “Dynamically Changing Cursor for User Interface” Patent, Originally Filed in 2003
... a utility patent that covers the use of the mouse cursor that changes according to the context of the task it is engaged in. Called a “Dynamically ...

Atmel's FPSLIC II Dynamically Reconfigurable SoC Supports "Silicon-Sharing" For Peripherals & Interfaces ...
Silicon-Sharing Fits 200K Gate Design into 40K Gate FPSLIC II's, Cuts Power Drain by 97%

Everything.me Launcher Wants to Dynamically Change Phones Based on Location, Interests, and Mental State ...
What if your phone’s launcher dynamically changed based upon interests, your location, or topics you had in mind at a specific moment? A new ...

Resources last updated: 11/26/2015 11:12:50 PM