Help for grid panel edit in form

46 views
Skip to first unread message

hanks

unread,
Jan 21, 2015, 12:37:34 AM1/21/15
to 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

unread,
Jan 21, 2015, 12:54:28 AM1/21/15
to 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

unread,
Jan 21, 2015, 12:56:20 AM1/21/15
to net...@googlegroups.com
or set the property readonly: true in edit form alone.

neo

unread,
Jan 21, 2015, 1:03:08 AM1/21/15
to 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

unread,
Jan 21, 2015, 1:09:22 AM1/21/15
to 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

unread,
Jan 21, 2015, 1:36:12 AM1/21/15
to 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

unread,
Jan 21, 2015, 2:59:12 AM1/21/15
to 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

unread,
Jan 21, 2015, 3:47:50 AM1/21/15
to 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

unread,
Jan 22, 2015, 1:28:38 AM1/22/15
to net...@googlegroups.com
sreenivasulu  thank you!

finally,i do it at method of init component.

Reply all
Reply to author
Forward
0 new messages