EasyUI Forum

General Category => General Discussion => Topic started by: Alfred on November 06, 2019, 09:31:11 PM



Title: How to check if a combogrid exist
Post by: Alfred on November 06, 2019, 09:31:11 PM
I need to check if a combogrid exist. I used the following code but it does not work..
Code:
if(!('#mycombo').combogrid('grid')){
   //combogrid does not exist
} else {
  //combogrid exist
}


Regards,
Alfred


Title: Re: How to check if a combogrid exist
Post by: jarry on November 07, 2019, 11:53:45 PM
Please try this code.

Code:
if ($('#mycombo').data('combogrid')){
  // combogrid exists
}


Title: Re: How to check if a combogrid exist
Post by: Alfred on November 09, 2019, 08:31:22 PM
Thanks, it works.