Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Get and update selected cell in ListView

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-26-2008, 04:10 AM
Basic4ppc Veteran
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 223
Send a message via MSN to tsteward
Question Get and update selected cell in ListView

Love the listview library its great and much more visually appealing than the Table.

How do I get the contents of a selected cell.

mylv.CELLGET(?,mylv.SelectedRow)

How can I programitacly get the colname of the selected cell?

Thanks
Tony
Reply With Quote
  #2 (permalink)  
Old 04-27-2008, 06:24 AM
alfcen's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu Islands
Posts: 810
Send a message via Skype™ to alfcen
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi Steward
Please try this:

Msgbox(lv1.Cellget(lv1.ColName(0),lv1.SelectedRow) )
Reply With Quote
  #3 (permalink)  
Old 04-27-2008, 07:19 AM
Basic4ppc Veteran
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 223
Send a message via MSN to tsteward
Default

Quote:
Originally Posted by alfcen View Post
Hi Steward
Please try this:

Msgbox(lv1.Cellget(lv1.ColName(0),lv1.SelectedRow) )
Yeah I understand how to use as above which works if a user clicks the first column.

I want to know what the cell contains that the user clicks on assuming its not the first column.

Maybe listview does not allow this and I will have to stick to table!

Ta
Tony
Reply With Quote
  #4 (permalink)  
Old 04-28-2008, 06:19 PM
Filippo's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Schwäb. Gmünd, Germany
Posts: 977
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hallo tsteward,

Here is a part of help-file Listview.chm.

Code:
<b>CellGet</b>
Get the value of a specific cell in a 
ListView.
 
Syntax: CellGet (ColName 
As String, RowNumber As Integer) As String
 
Example:
value = lv.CellGet(
"Col1"0)  'Gets the value of the first row in a column named "Col1"
Code:
<b>CellSet</b>
Sets the value of a specific cell in a 
ListView.
 
Syntax:CellSet (ColName 
As String, RowNumber As Integer, Cell As String)
 
Examples:
lv.CellSet(
"Col1"0"Erel")  'Sets the value of the first row in a column named "Col1" 
 
' Fills the first row with the value "Something" in all cells.
For i = 0 To lv.ColCount-1
     lv.CellSet (lv.ColName(i), 
0"Something")
Next

Ciao,
Filippo
__________________
PPC: MDA Pro, 2GB SD
Device: HTC Desire , Android 2.2
______________________
Reply With Quote
  #5 (permalink)  
Old 04-29-2008, 10:43 AM
Basic4ppc Veteran
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 223
Send a message via MSN to tsteward
Default

Yeah I realise how to getcell but how do I know exactly what sell a user has tapped/selected.

I need colselected as well as rowselected
Reply With Quote
  #6 (permalink)  
Old 04-29-2008, 03:45 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 1,057
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

As I understand the ListView table, you can only select a row but not a column.

Tapping on a different column in an already selected row, there is even no selectionChanged event fired. (see help file for "selectionChanged" => Occurs whenever the selected Row is changed.)

specci48
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Harware, get selected text from other application levi Questions (Windows Mobile) 3 07-15-2008 12:40 PM
currently-selected email message, contact, or appointment John F. Eldredge Questions (Windows Mobile) 2 04-30-2008 12:21 PM
Settings for User's selected 'theme' willisgt Questions (Windows Mobile) 2 02-21-2008 04:06 PM
Newbie-Filling a table but selected fields enonod Questions (Windows Mobile) 7 10-13-2007 12:24 PM
Tablecell 0 not selected Scubaticus Bug Reports 4 07-30-2007 09:03 PM


All times are GMT. The time now is 09:20 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0