Title: Disable combobox editor in a datagrid programatically Post by: thecyberzone on June 26, 2019, 02:08:06 AM In a editable datagrid a combobox editor column (CALDATE) is populated from a php url (code is given below). Now I cannot disable this combox editor when no record returned from the php call. Please help me.
Code: onBeforeEdit: function(index,row){ Title: Re: Disable combobox editor in a datagrid programatically Post by: stworthy on June 27, 2019, 07:21:15 AM With the 'onBeginEdit' event, you can get the combobox editor and disable it.
Code: onBeginEdit: function(index,row){ Title: Re: Disable combobox editor in a datagrid programatically Post by: thecyberzone on June 27, 2019, 08:19:26 AM But how I will determine that php url return zero number of rows? That is how to determine the length of data populeted in combobox. Actually I want to disable combobox when there is no rows in combobox dropdown.
Title: Re: Disable combobox editor in a datagrid programatically Post by: stworthy on June 27, 2019, 11:32:14 PM You can listen to the 'onLoadSuccess' event. If no data returned then disable it.
Code: { Title: Re: Disable combobox editor in a datagrid programatically Post by: thecyberzone on June 28, 2019, 01:20:59 AM What I have done is given below, but still now combobox is functioning, typing can be done in this combobox, 'Disabled' not done.
Code: var colDate = $(this).datagrid('getColumnOption', 'CALDATE'); Although in combobox there is no row displayed. Title: Re: Disable combobox editor in a datagrid programatically Post by: stworthy on June 29, 2019, 12:56:51 AM The code should be:
Code: onLoadSuccess: function(data){ Title: Re: Disable combobox editor in a datagrid programatically Post by: thecyberzone on June 29, 2019, 07:57:50 AM Thanks, working successfully.
|