BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-15-2009, 01:44 AM   #1 (permalink)
New Member
 
Join Date: Jul 2009
Model: 8320
PIN: N/A
Carrier: Mobilink
Posts: 9
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Grid control help needed!

Please Login to Remove!

hi,

i am developing a form with three verticalfield manager to hold data like three coloumns and one horizontal field manager to hold these three fieldmanager's.

1.
This is working fine but there is no space between the data , i want to put some kind of vertical border with these three vertical field managers.
Obviously,i can put space in between , but i just want to check can i put border with each managers
2.
One of my VerticalFieldManager contain editfield in it , i am not able to access these , before that i was accessing them using this.getField;
How can i do that?

Here is my code!



HorizontalFieldManager rowHolder = new HorizontalFieldManager(HorizontalFieldManager.VERT ICAL_SCROLL | HorizontalFieldManager.NO_HORIZONTAL_SCROLL);

//We use 3 columns here. VerticalFieldManager rows[] = new VerticalFieldManager[3];

//Now lets add 3 columns of data for (int count = 0; count < 3; ++count) { rows[count] = new VerticalFieldManager(VerticalFieldManager.NO_HORIZ ONTAL_SCROLL | VerticalFieldManager.NO_VERTICAL_SCROLL);



//Add 21 rows of data to the column
for (int rowCount = 0; rowCount <str_Data.length; rowCount=rowCount+2)
{
if(count==0)
{

rows[count].add(new LabelField(str_Data[count], LabelField.NON_FOCUSABLE));
}
if(count==1)
{

rows[count].add(new LabelField(str_Data[count], LabelField.NON_FOCUSABLE));
}
if(count==2)
{
for (int rowCount = 0; rowCount <str_Data.length; rowCount=rowCount+2)
{
rows[count].add(new EditField("","",5,EditField.FILTER_NUMERIC));
}
}

//Add the row to the rowHolder.
rowHolder.add(rows[count]);
}
this.add(rowHolder);





Thanks & Regards
Offline  
Old 07-16-2009, 04:58 AM   #2 (permalink)
Thumbs Must Hurt
 
shraddha294's Avatar
 
Join Date: Oct 2007
Location: Hyderabad
Model: 8800
PIN: N/A
Carrier: TMobile
Posts: 111
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

To answer ur first query...
To add spaces between your columns... instead of spaces you can add non-focusable label fields. Something like this might help:

LabelField spacerfield = new LabelField(" | ", LabelField.NON_FOCUSABLE);

make 2 spacer fields for 3 columns.
Add column 1, then spacer 1.. add column 2, then spacer 2 and lastly add column 3.
Offline  
Old 07-19-2009, 11:53 PM   #3 (permalink)
New Member
 
Join Date: Jul 2009
Model: 8320
PIN: N/A
Carrier: Mobilink
Posts: 9
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default how to access the editfield with in an verticalmanager?

Quote:
Originally Posted by shraddha294 View Post
To answer ur first query...
To add spaces between your columns... instead of spaces you can add non-focusable label fields. Something like this might help:

LabelField spacerfield = new LabelField(" | ", LabelField.NON_FOCUSABLE);

make 2 spacer fields for 3 columns.
Add column 1, then spacer 1.. add column 2, then spacer 2 and lastly add column 3.
Thanks for your reply,

I solved the space problem but i am not getting the entered value from editfield.
any help?
Thanks & Regards,
Offline  
Old 07-20-2009, 08:29 AM   #4 (permalink)
New Member
 
Join Date: Jul 2009
Model: 8300
PIN: N/A
Carrier: VZ
Posts: 13
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jackofall View Post
I solved the space problem but i am not getting the entered value from editfield.
any help?
Thanks & Regards,
You're going to need to keep a reference of your EditField so you can get it's value.

PHP Code:
rowsxxx91;countxxx93;.add(new EditField("","",5,EditField.FILTER_NUMERIC)); 
should be

PHP Code:
// set a private var
_editNumber = new EditField("","",5,EditField.FILTER_NUMERIC); 
rowsxxx91;countxxx93;.add(_editNumber); 
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.