We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to hide combobox control on selection of value in another combobox

Thread ID:





146770 Aug 19,2019 09:37 AM UTC Aug 21,2019 03:55 AM UTC React - EJ 2 1
Tags: ComboBox
Amol Sonawane
Asked On August 19, 2019 09:37 AM UTC

how to hide combobox control on selection of specific value in another combobox

Narayanasamy Panneer Selvam [Syncfusion]
Replied On August 21, 2019 03:55 AM UTC

Hi Amol, 
Thanks for contacting Syncfusion support. 
As per your request we have hided the ComboBox control on value selection of another ComboBox control. Please refer the below code snippet, 

export class Cascading extends SampleBase { 
    constructor() { 
        this.tempCountry = 'country'; 
        //define the country ComboBox data 
        this.countryData = data[this.tempCountry]; 
        this.tempState = 'state'; 
        //define the state ComboBox data 
        this.stateData = data[this.tempState]; 
        // maps the country column to fields property 
        this.countryFields = { value: 'CountryId', text: 'CountryName' }; 
        // maps the state column to fields property 
        this.stateFields = { value: 'StateId', text: 'StateName' }; 
    onChange() { 
           this.stateObj.inputWrapper.container.style.display ="none"; 
    render() { 
        return (<div className='control-pane'> 
        <div className='control-section'> 
          <div id='cascade'> 
            <div style={{ paddingTop: '35px' }}> 
              <ComboBoxComponent id="countryList" dataSource={this.countryData} allowCustom={false} ref={(combobox) => { this.countryObj = combobox; }} popupHeight="auto" fields={this.countryFields} change={this.onChange.bind(this)}  close={this.onClose.bind(this)} placeholder="Select a country"/> 
            <div style={{ paddingTop: '35px' }}> 
              <ComboBoxComponent id="stateList" dataSource={this.stateData} allowCustom={false} ref={(combobox) => { this.stateObj = combobox; }} popupHeight="auto" fields={this.stateFields} placeholder="Select a state"/> 
Please find the sample below, 

Please let us know if you need any further assistance on this. 
Narayanasamy P. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon