import * as React from 'react'; import JqxDropDownList, { IDropDownListProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownlist'; import JqxRadioButton, { IRadioButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxradiobutton'; export interface IState extends IDropDownListProps { bottomBtnChecked: IRadioButtonProps['checked']; topBtnChecked: IRadioButtonProps['checked'] } class App extends React.PureComponent<{}, IState> { private myDropDownList = React.createRef(); constructor(props: {}) { super(props); this.topBtnOnChecked = this.topBtnOnChecked.bind(this); this.bottomBtnOnChecked = this.bottomBtnOnChecked.bind(this); const source: any = { async: false, datafields: [ { name: 'CompanyName' }, { name: 'ContactName' } ], datatype: 'json', id: 'id', url: 'customers.txt' }; this.state = { bottomBtnChecked: false, dropDownVerticalAlignment: 'top', source: new jqx.dataAdapter(source), topBtnChecked: true } } public componentDidMount() { this.myDropDownList.current!.setOptions({ selectedIndex: 0 }); } public render() { return (

Alignment

Top Bottom
); } private topBtnOnChecked(): void { this.setState({ bottomBtnChecked: false, dropDownVerticalAlignment: 'top', topBtnChecked: true }); } private bottomBtnOnChecked(): void { this.setState({ bottomBtnChecked: true, dropDownVerticalAlignment: 'bottom', topBtnChecked: false }); } } export default App;