Help for grid panel edit in form

47 katselukertaa
Siirry ensimmäiseen lukemattomaan viestiin

hanks

lukematon,
21.1.2015 klo 0.37.3421.1.2015
vastaanottaja net...@googlegroups.com
Does anyone know how to set combo of form as “readonly” by condition before show edit_in_form. please help me!!

Sreenivasulu

lukematon,
21.1.2015 klo 0.54.2821.1.2015
vastaanottaja net...@googlegroups.com
We can do in two ways
1. In edit form, for that combo box field set the property like disabled: true
2. init_component set that field disabled through by setting flag in edit mode.

On Wed, Jan 21, 2015 at 11:07 AM, hanks <huang...@gmail.com> wrote:
Does anyone know how to set combo of form as “readonly” by condition before show edit_in_form. please help me!!

--
You received this message because you are subscribed to the Google Groups "Netzke" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netzke+un...@googlegroups.com.
To post to this group, send email to net...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netzke/da05130f-4032-4cf4-9419-45a6d1e979c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks and Regards
Sreenivasulu T

Sreenivasulu

lukematon,
21.1.2015 klo 0.56.2021.1.2015
vastaanottaja net...@googlegroups.com
or set the property readonly: true in edit form alone.

neo

lukematon,
21.1.2015 klo 1.03.0821.1.2015
vastaanottaja net...@googlegroups.com
but i want to determine some condition 
if true set combo :read_only => true
what can i do?   thank.

sreenivasulu於 2015年1月21日星期三 UTC+8下午1時56分20秒寫道:

Sreenivasulu

lukematon,
21.1.2015 klo 1.09.2221.1.2015
vastaanottaja net...@googlegroups.com
write one method and set the value there like this.
for example:
readonly: check_condition

def check_condition
   if condition1
       true
   else
      false
  end
end


For more options, visit https://groups.google.com/d/optout.

neo

lukematon,
21.1.2015 klo 1.36.1221.1.2015
vastaanottaja net...@googlegroups.com
it's work.
and how can i get the combo value?
this is my code :
   netzke_attribute :sales_type, :xtype =>combo, :mode => :local, store => [['M','Marking'],['S','In Stock']], :hidden_name => :salesType,
         :trigger_action => :all, :read_only => ?? === 'M'


thank.

sreenivasulu於 2015年1月21日星期三 UTC+8下午2時09分22秒寫道:

Sreenivasulu

lukematon,
21.1.2015 klo 2.59.1221.1.2015
vastaanottaja net...@googlegroups.com
where you need the value, after submit the form it stores into db, before submit if you need find out the field and you will get object through that you will get the value.


For more options, visit https://groups.google.com/d/optout.

neo

lukematon,
21.1.2015 klo 3.47.5021.1.2015
vastaanottaja net...@googlegroups.com
sorry i unclear you mean.

The grid get row data by db.
When i edit in form,how can I get the combo value compare to  'M' to determine the combo read_only true or false.
thank.

sreenivasulu於 2015年1月21日星期三 UTC+8下午3時59分12秒寫道:

neo

lukematon,
22.1.2015 klo 1.28.3822.1.2015
vastaanottaja net...@googlegroups.com
sreenivasulu  thank you!

finally,i do it at method of init component.

Vastaa kaikille
Vastaa kirjoittajalle
Välitä
0 uutta viestiä