BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 07-15-2009, 01:44 AM   #1
jackofall
New Member
 
Join Date: Jul 2009
Model: 8320
PIN: N/A
Carrier: Mobilink
Posts: 9
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
shraddha294
Thumbs Must Hurt
 
shraddha294's Avatar
 
Join Date: Oct 2007
Location: Hyderabad
Model: 8800
PIN: N/A
Carrier: TMobile
Posts: 111
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
jackofall
New Member
 
Join Date: Jul 2009
Model: 8320
PIN: N/A
Carrier: Mobilink
Posts: 9
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
DeveloperDave
New Member
 
Join Date: Jul 2009
Model: 8300
PIN: N/A
Carrier: VZ
Posts: 13
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



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


OEM Dell XPS 8910 8920 8930 Alienware Aurora R5 R6 R7 Front Cooling Fan 7M0F5 picture

OEM Dell XPS 8910 8920 8930 Alienware Aurora R5 R6 R7 Front Cooling Fan 7M0F5

$12.11



Dell OEM Latitude Rugged Extreme 7404 Docking Connector Circuit Board picture

Dell OEM Latitude Rugged Extreme 7404 Docking Connector Circuit Board

$14.95



Dell OEM Latitude Rugged Extreme 5414 Driving Board Cable for Cable 5414VERTCBL picture

Dell OEM Latitude Rugged Extreme 5414 Driving Board Cable for Cable 5414VERTCBL

$8.95



Dell OEM Latitude Rugged Extreme 7404 Left and Right Mouse Buttons 00008 picture

Dell OEM Latitude Rugged Extreme 7404 Left and Right Mouse Buttons 00008

$5.95



NEW DELL OEM REPLACEMENT PROJECTOR LAMP FOR 4220 4320 GENUINE ORIGINAL  picture

NEW DELL OEM REPLACEMENT PROJECTOR LAMP FOR 4220 4320 GENUINE ORIGINAL

$198.22



DELL 330-6581 3306581 725-10229 OEM LAMP FOR 1510X 1610HD 1610X  - Made By DELL picture

DELL 330-6581 3306581 725-10229 OEM LAMP FOR 1510X 1610HD 1610X - Made By DELL

$39.98







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