Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 32

Thread: Get record data from treegrid

  1. #21
    Senior Member
    Join Date
    Apr 2012
    Location
    United Kingdom
    Posts
    655
    Quote Originally Posted by barrymavin View Post
    From what i understand a page navigation panel will do this for you.

    See the example_navpane2 app

    Attachment 2789
    Hi Barry,

    I don't want to use that as I will have a tree control in there and it also messes up the UI layout I want.

    The user is on the record for the egg weight, the want to look at the previous entry from when tehy weighed the egg last time.

    They just click on the row in the tree grid in the centre of the section in which they can see some the data for the last and are taken to that record, to look at notes lets say

    The tree grid is in the centre of the section, easy to access, very quick and no distractions when they are weight say 200 eggs in an after noon.

    They do not want to go off to a panel somewhere else to find the recod as it's right in front of them on the grid.

  2. #22
    Senior Member
    Join Date
    Apr 2012
    Location
    United Kingdom
    Posts
    655
    Quote Originally Posted by barrymavin View Post
    If the TreeGrid is in the same section that you want to refresh I dont see how that can work as the TreeGrid itself will get refreshed.

    So why not have a grid section above this form that relates to this form. You seem to be wanting to relate other form content inside a section.

    If thast what you want you are making work for yourself unnecessarily as you are bypassing a lot of built-in functionality.
    Hi Barry,

    How am I wanting to relate other form content inside a section. the section is just for the egg weights, the grid shows data form previous weighings for the same egg , I simply want to move from record 2 to record 6 of the weights for the same eggs that is shown in section 1.

    I have the PK of the egg weight taken from the grid and want to use that to move to another record in egg weights. Its all the same data, just another record

  3. #23
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,781
    Blog Entries
    18
    Hi David

    Thats fine. I just want to make you or others reading this thread aware of best practices that work effortlessly in web and mobile apps too.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  4. #24
    Senior Member
    Join Date
    Apr 2012
    Location
    United Kingdom
    Posts
    655
    Hi Barry,

    Appreciate that

    I'm going to do this app just for desktop as that is enough for me to learn for the moment to get the hang of Lianja

    I need the layout in a very specific fashion on this particular page.

    I must say the way it works makes it VERY easy to set stuff up, once you figure =out how to reference stuff.

    Using my stuff in Xcase moved over to meta data in an import routine I'm playing with will make UI really easy as the meta data wil take care of most of it, so almost no coding needed in the UI

    David
    Last edited by avianmanagement; 2022-03-24 at 07:57.

  5. #25
    Senior Member
    Join Date
    Apr 2012
    Location
    United Kingdom
    Posts
    655
    Hi Barry,

    I seem to have gotten around the click issue by using the after row change delegate with a locate.

    local lcEggWeightPK
    lcEggWeightPK = (this.item(this.activerow,8))
    locate for deggweight.cpk_deggweight = lcEggWeightPK
    Lianja.getElementByID("page1.EggWeight").refresh()

    David

  6. #26
    Senior Member
    Join Date
    Apr 2012
    Location
    United Kingdom
    Posts
    655
    Hi Barry,

    Oh well, nearly.

    When I tab out of any control in the UI the grid goes back to the first row and so the section goes back to the first record.

    I assume the coming out of the control, via TAB, is firing the refresh of the grid, and so as you said before that fires the click event on the first row.

    Is there anyway to turn that behaviour off since I don't want a refresh to click on the grids 1st row and keep moving the records in the grid.

    Let's say I was on the third record and had code that highlighted the row the user had selected, all of a sudden they are taken back to the first record in the grid and that gets highlighted.

    David

  7. #27
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,150
    BTW: David: TreeGrid is not available in Web.

    Looking at what you have, if Visual Components could be run in FormGrid cells, you could get the look you want and also have it run on the web.

    Hank

  8. #28
    Senior Member
    Join Date
    Apr 2012
    Location
    United Kingdom
    Posts
    655
    Hi Hank,

    Thanks for the heads up on that.

    I've decided to do this as a desktop app only as it's too much of a learning curve for me at the moment to do it for web as well.

    I know web is the way to go, but I'd have to code i Java script which I'd have to learn. So for now I'l just going to use this to learn how to use Lianja.

    By the time I get to that stage then I will look at web stuff.

    I'm going to use meta data for a lot of the rules and things like UI components changing back colour depending on the data values, and all my business logic will be separate from any code in the UI, not that there will be a lot of that the way Barry has designed this with the use of Meta data.

    I'll take a look at formgrids, so much to learn here !

    David

  9. #29
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,150
    Hi David,

    The amount of JavaScript you have to learn I could show you in 15 minutes, FWIW. Anytime you want. Your friend in exports.conf, which I can show you in 2 minutes.

    Think of a formgrid as columns and rows.

    Each "cell" has a starting row and column, and a number of columns wide and high.

    There are a couple of missing pieces to the puzzle. A grid cannot be used in a canvas section, and so cannot become a visual component. Also, a visual component cannot be used in a formgrid cell. I can understand the complexity involved. Maybe some day.

    Ideally, any section could be saved into a Visual Component. And doing so would be devilishly difficult.

    Anyway, very little to be concerned about in terms of difficulty of web apps, in general. Complicated VFP data stuff will still be run in VFP on the server.

    Hank

    The formgrid model is an easy-to-use form of how layout happens on the web, in general.

    There's more.

  10. #30
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,781
    Blog Entries
    18
    Hi Hank

    I will implement the canvas TreeGrid for the Web in a forthcoming release. As you correctly point out FormGrids are very powerful and responsive.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

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
  •  
Journey into the Cloud
Join us