Suneido

Integrated Application Platform

  • Home
  • Learning
    • Suneido Manual
    • Beginners
      • Inside Suneido
      • The Suneido Programming Language
      • The Suneido Database
      • Installing Suneido
      • Building Suneido
      • IDE Go To Tour
      • Upgrading To A New Release
    • Advanced
      • Canvas Control
      • DrawControl Part 1
      • DrawControl Part 2
      • DrawControl Part 3
      • SAX Like XML Processing
      • A Plug-In Architecture
      • A Simple Wizard Framework
      • An HTML Include Facility
      • An RSS 2 Feed Creator
      • MIME Generation
      • A New Add-on Facility
      • Workspace Improvement Hack
    • Mockito for Suneido
    • The Suneido Task Scheduler
    • Contributing To Suneido
    • Contributor Assignment of Copyright
    • Language Translation
    • Future Directions
    • Interview With Andrew Mckinlay
  • Forum
    • Announcements
    • Internals & Enhancements
    • Cookbook
    • General
  • FAQ
  • Screenshots
  • Downloads
  • Links

Re: Re: How to access current row selection on a browse control

Integrated Application Platform › Forums › General › [SVD]How to access current row selection on a browse control › Re: Re: How to access current row selection on a browse control

August 20, 2014 at 2:36 pm #1080
jaska_lee
Participant

ok, adding the method List_Selection(selection) into controller seems to do the trick. Whenever a row is clicked on the browse control, this method will be triggered automatically. The selection parameter is passed in as a single element object that points to the index of current row that is clicked, e.g: #(0),#(1)..

But in this case, i avoided using row index to access browse row. Instead,
1) I created a reference to the browse control and another reference to the browse field control by using .FindControl method.

2) I also created a separate Field_ definition to handle heading and format stuff.

3) After that I put following code under List_Selection(selection) method,

	List_Selection(selection) {
if (selection isnt false)
{
.browse = .FindControl('browse_name') //a reference to the browse control
.newfield = .FindControl('newfield_name') //a reference to the new field i would like to show on access
.newfield.Set(.browse.GetField('browsefield_name')) //using .browse.GetField and control .Set to assign value
}

}
}

I think it will be a good practice to have all those essential methods added into controller for both access and browse, regardless if we are going to use it. That could save a lot of time to figure out what is what and what does it do.

Search Forums

Log In
Welcome to the new Suneido Web Site and Forum.
Register
Lost Password
users of the previous PHPBB Forum should be able to log in with their previous username and password.

Recent Topics

  • Alpha copy of gSuneido to play with
  • how to start jsuneido ?
  • Problem Starting Suneido…
  • Dialog not showing buttons
  • New link for Suneidojo

Contact Us | Legal Statement | Privacy Statement | SiteMap

Copyright © 2023 Axon® Development Corporation. All Rights Reserved. - Open Source Integrated Database and Programming Language