Insert class into input element generated by Ext Combobox (version 1.x to version 4.x upgrade)

  1. #1

    Insert class into input element generated by Ext Combobox (version 1.x to version 4.x upgrade)

    I'm trying to upgrade my Ext.Net to the latest version, however I'm hitting alot of runtime issues because the way we inserted classes into the elements are no longer working.

    Currently using 1.x Ext, the classes are inserted into the element for example like this in the code behind like this
    which would then append this class to the input element generated by the combobox control

    In the current Ext.Net version, what is the proper way of inserting classes to the child elements of the combobox div ? Such as the input etc generated by it

    Many thanks
  2. #2
    Hello @ohdra, and welcome to Ext.NET forums!

    There are two basic ways to fill the style in the v4 Ext.NET's combo box:

    1. Update the style selectors

    <style type="text/css">
        .xxx .x-form-trigger-wrap {
            border: 1px solid red;
        .xxx .x-form-text-wrap {
            border: 2px solid blue;
    You can learn what selectors works best for you if you use your browser's DOM inspector on a rendered Ext.NET page.

    2. Set the corresponding properties (at load time)

    cmbBx.BaseBodyCls = "xxx";
    cmbBx.BaseFieldCls = "xxx";

    This second approach works only when defining the combo box, so it won't work if you already have the page drawn and call this from code behind in any kind of AJAX call.

    Your code snip confuses me. It looks like server-side C#, yet you use single quotes in string, which won't work at all...

    Anyway, here's some related documentation:
    - Client-side documentation for combo box (Ext JS's).
    - Server side code documentation.
    - Intellisense is also your friend, when it comes to server-side calls, at least.

    Well, hope this helps!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 3
    Last Post: Feb 08, 2017, 5:31 PM
  2. Replies: 5
    Last Post: Aug 13, 2013, 4:52 PM
  3. Upgrade Version
    By lasantha in forum 1.x Help
    Replies: 0
    Last Post: Aug 07, 2013, 9:32 AM
  4. Upgrade library version
    By xMAC in forum 1.x Help
    Replies: 1
    Last Post: Jul 13, 2012, 9:15 PM
  5. Replies: 0
    Last Post: Jun 15, 2012, 9:42 AM

Posting Permissions