Link to home
Start Free TrialLog in
Avatar of liltyga
liltyga

asked on

Get value of selected item from dataGrid component

Hi,

I have a datagrid that is pulling data in dynamically from a database. There are three fields of data that are being queried, and what I need to do is check if one of those fields equals a certain criteria, and if true, make the button selectable.

Basically, I would draw out the desired functionality like this:

dg_someData results:

field1       field2       field3
------       -------      -------
id1          title1        typea    <------- if field3 = 'typea', btn_select enabled = true; else btn_select enabled = false
id2          title2        typeb
id3          title3        typec

        [btn_select]

Can anyone help me out and let me know how I can determine the value of the data in 'field3' above, for dg_someData, and enable the select button if the selected item matches the criteria?

Thanks in advance!
Avatar of negatyve
negatyve

If with "button" you mean the whole row, then there's no property to do that (datagrid.selectable is a global property). You should create a custom cell renderer...
ASKER CERTIFIED SOLUTION
Avatar of liltyga
liltyga

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You are making it invisible after pressing on it?
Avatar of liltyga

ASKER

only if the criteria is not equal to 'typea' data  - they shouldn't be allowed to submit an edit request for the other values
good work - showed me something:)
Avatar of liltyga

ASKER

thanks so much - that's something refreshing to hear :)
no worries - thanks for sharing the solution with us

billystyx