Home » Developer & Programmer » Forms » Radio button to select current row in multirecord block -6i (Forms 6i)
Radio button to select current row in multirecord block -6i [message #320173] Wed, 14 May 2008 04:28 Go to next message
rahul15june
Messages: 35
Registered: May 2008
Member
Hi,

I have the following scenario,

I have a non database "multirecord" block ( 5rows fixed without scrollbar)

I have created one Radio group with five radio buttons against each of these 5 rows.

Now, I display total expenses in thie form week(to_char(expense_date,IW) wise as seen beloew,
Week     Amount   Radio button
1        100       RB1
2         200      RB2
3         100      rb3
4         300      rb4
5         400      rb5

Now, idea is when user say selects rb2 then automatically it goes to another block and selects all expenses in that week for which Week 2 totals to 100.

My requirements,

1. I want to highlight the current row . So if I select RB2, complete Week 2 should be highlighted with a visual attribute

2. Which ever RB I choose that row should get highlighted and the previous one should go back to default.

Now, I have created everything only funtionality one and two do not happen. I am not able to link the Radio button with the Current record. i.e I am not able to associate RB2 with Week 2. and so on. I was able to do this with a checkbox not, able to do it with RB.

Please help

thanks,
Sunil

Upd Mod: Using 'code' tags makes for easier reading of data in columns.

[Updated on: Wed, 14 May 2008 21:25] by Moderator

Report message to a moderator

Re: Radio button to select current row in multirecord block -6i [message #320291 is a reply to message #320173] Wed, 14 May 2008 09:55 Go to previous messageGo to next message
rahul15june
Messages: 35
Registered: May 2008
Member
Okay let me rephrase this,

I have 5 row multirecords non database block. I want to add 5 radio buttons in front of that,

the 5 rows denote 5 weeks in a month. and expenses in the five weeks.

I need to syncronize the five buttons with the multireocrd block. Such that if I select radio button 1. Row one is selected.

If I select RB2, row two is selected.

If I select RB3 row three is selected.

so on so forth.

thanks,
Re: Radio button to select current row in multirecord block -6i [message #320374 is a reply to message #320173] Wed, 14 May 2008 21:18 Go to previous messageGo to next message
urnikhil
Messages: 42
Registered: March 2008
Member
I didnt understand your case exactly but I think when-radio-changed trigger and set_item_instance_property might help u...

- Nik
Re: Radio button to select current row in multirecord block -6i [message #320377 is a reply to message #320374] Wed, 14 May 2008 21:29 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Why not use a checkbox which you place on the 'block' as a non-database item?

Alternatively, use a 'radio_group' with a single Radio Button and place it on the block being displayed. Then when the Radio Button is selected the 'line'/record is automatically selected.

You can then highlight the row using the 'Current Record Visual Attribute Group' property of the block.

David
Re: Radio button to select current row in multirecord block -6i [message #320414 is a reply to message #320377] Thu, 15 May 2008 01:28 Go to previous messageGo to next message
rahul15june
Messages: 35
Registered: May 2008
Member
Thanks David,

I tried that option. There is one thing though. At the time of populating that block. I want to default the current weeks radio button. So if I have one radio button in the Radio group. Is it possible. Do I have to use the Current row attribute ? There after which ever Radio button I select that row should get highlighted.

Thanks in advance.
Re: Radio button to select current row in multirecord block -6i [message #320422 is a reply to message #320414] Thu, 15 May 2008 02:04 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Radio buttons are difficult in that when you 'select' one it is not possible to 'turn it off' except by selecting another one.

Try creating a second 'radio button' in the 'radio group' and set 'Visible' to 'No'. Then when you select a radio button on another record, EITHER loop through all the rows and set the value of any 'on' button to that of the hidden 'off' button OR store in a control item the row number of the row that has the 'on' button'. Then when another row is selected, get the stored value, update the stored value with this row number, go to the 'other' row', turn its button 'off', and then come back.

David
Re: Radio button to select current row in multirecord block -6i [message #320530 is a reply to message #320422] Thu, 15 May 2008 06:48 Go to previous message
rahul15june
Messages: 35
Registered: May 2008
Member
Thanks David, that was a good lead. I try it out.!
thanks
Previous Topic: sort data in no DB block
Next Topic: print syntax
Goto Forum:
  


Current Time: Sun Feb 09 06:09:58 CST 2025