Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Increment of Label

Status
Not open for further replies.

Jaidev

Programmer
Sep 24, 2002
1
IN
Hi all,

I had a data view with three Components .of which two are bound to a table and the third one is left blank .so here is my question ..How to set the auto increment for that label which is not bound to a table.

like if there are 5 records it should show like

Line#(not bound) Name(bound) Value(bound)
-----------------------------------
1 abc 100
2 def 200
3 ghi 300
4 jkl 400
5 mno 500

Line# should be auto increment.

Please Help me.
Thanks for your valuable time.

jaidev
 
What I do...

Create a variable for your page :

priatve int lineNumber = 1;

Put a label in your view such called lblLineNumber.

In the method handle_View_rowGenerateBegin (where "View" is the name of your view) just say:

lblLineNumber.setText(new String(lineNumber++));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top