Alpha Video Training
Results 1 to 11 of 11

Thread: How to get data from current cell in browse

  1. #1
    Member
    Real Name
    Jeff Fried
    Join Date
    Aug 2000
    Posts
    589

    Default How to get data from current cell in browse

    I would like to capture into two variables information about the currently selected cell of a browse.

    The two variables are 1) the field name of the column I am in and 2) the value in the cell that has focus.

    This is probably simple, but I'm not finding it.

    Thanks.

    Jeff

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: How to get data from current cell in browse

    You need to code an event to do that. Onfetch or onrowdblclick seem appropriate.

    this.Active_Drilldown() 'will return the path to the active cell
    eval(this.active_drilldown()+".value") 'will return the cell's value

    Note: There is no event fired when you switch from cell to cell in the same row.
    Last edited by Stan Mathews; 12-03-2013 at 02:09 PM.
    There can be only one.

  3. #3
    Member
    Real Name
    Jeff Fried
    Join Date
    Aug 2000
    Posts
    589

    Default Re: How to get data from current cell in browse

    Quote Originally Posted by Stan Mathews View Post
    You need to code an event to do that. Onfetch or onrowdblclick seem appropriate.

    this.Active_Drilldown() 'will return the path to the active cell
    eval(this.active_drilldown()+".value") 'will return the cell's value

    Note: There is no event fired when you switch from cell to cell in the same row.
    This is perfect. You really know your Xbasic.

    The type of event will either be onrowdblclick or I may have a separate button to trigger this. I just couldn't find the way to capture the data.

    Thank you very much. This is going to be very useful. Never needed it before.

    Jeff

  4. #4
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: How to get data from current cell in browse

    If you mean a separate button on the form containing the browse you'll have to adjust the code. Active_drilldown() for the button is different than for the browse and "this" is no longer pertinent.
    There can be only one.

  5. #5
    Member
    Real Name
    Jeff Fried
    Join Date
    Aug 2000
    Posts
    589

    Default Re: How to get data from current cell in browse

    Quote Originally Posted by Stan Mathews View Post
    If you mean a separate button on the form containing the browse you'll have to adjust the code. Active_drilldown() for the button is different than for the browse and "this" is no longer pertinent.
    Glad you added that bit of wisdom. Thanks.

    Jeff

  6. #6
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: How to get data from current cell in browse

    You can also do it with a button in the browse column. Unzip and add the table to a database you have.


    btest.zip
    There can be only one.

  7. #7
    "Certified" Alphaholic Ray in Capetown's Avatar
    Real Name
    Ray Hendler
    Join Date
    Jan 2009
    Location
    South Africa
    Posts
    2,036

    Default Re: How to get data from current cell in browse

    Using v10 I see the variety of cell functions and supercontrols/ no buttons apparent
    There must be a new kind button method in v11 ? or something I haven't learned ?
    Column / Properties/other/display format/button is the only method I know in v10

  8. #8
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: How to get data from current cell in browse

    Ray,

    Slow on the uptake this morning. Did you have a question or were you commenting?
    There can be only one.

  9. #9
    "Certified" Alphaholic Ray in Capetown's Avatar
    Real Name
    Ray Hendler
    Join Date
    Jan 2009
    Location
    South Africa
    Posts
    2,036

    Default Re: How to get data from current cell in browse

    Quote Originally Posted by Stan Mathews View Post
    You can also do it with a button in the browse column. Unzip and add the table to a database you have.
    btest.zip
    Ya there is a question. I was a bit too brief explaining
    Your example browse, described as having a button in the browse column. I cant see a button. I can see the other examples in different columns.
    Q. is there a column with a button in your example?, if so either I cant see it with V10 or I'm not looking too well.

    Quite by chance I did some mentoring yesterday with a client who uses v11 - and saw a new item on the browse edit toolbar that he used to place a button in a browse column. So i'm wondering if the button you created was done with v11 and is not usable by v10
    In v10 we can of course create cell buttons.

    So is it possible I cant see those in your example because V11 does it differently?

  10. #10
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: How to get data from current cell in browse

    The example was created in v11 which might explain the "invisibility" somehow. It does use the Column / Properties/other/display format/button method you mentioned. Did you try viewing in design mode?

    Image 1.png

    Speaking of the embedded browse on the form, not the saved browse.
    There can be only one.

  11. #11
    "Certified" Alphaholic Ray in Capetown's Avatar
    Real Name
    Ray Hendler
    Join Date
    Jan 2009
    Location
    South Africa
    Posts
    2,036

    Default Re: How to get data from current cell in browse

    Yes
    That was it
    I was being obtuse.

Similar Threads

  1. browse cell color
    By gmeredith17 in forum Alpha Five Version 10 - Desktop Applications
    Replies: 4
    Last Post: 09-12-2010, 11:44 PM
  2. Browse Cell Image ?? HOW??
    By M.Richard in forum Alpha Five Version 9 - Desktop Applications
    Replies: 18
    Last Post: 03-28-2010, 02:01 AM
  3. Saving the value from a selected cell in a browse
    By Andrew Robb in forum Alpha Five Version 6
    Replies: 12
    Last Post: 06-15-2005, 04:12 PM
  4. browse cell
    By Schulzie in forum Alpha Five Version 4
    Replies: 3
    Last Post: 07-10-2000, 03:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •