Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Get and update selected cell in ListView


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-26-2008, 05:10 AM
Senior Member
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 128
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, 07:24 AM
alfcen's Avatar
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu
Posts: 424
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, 08:19 AM
Senior Member
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 128
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, 07:19 PM
Filippo's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Schwäb. Gmünd, Germany
Posts: 284
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hallo tsteward,

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

Code:
CellGet
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:
CellSet
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
PPC: HTC Touch Diamond, 4GB
______________________
Reply With Quote
  #5 (permalink)  
Old 04-29-2008, 11:43 AM
Senior Member
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 128
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, 04:45 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 650
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 On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 03:10 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0