0 Replies Latest reply on Oct 22, 2009 5:48 AM by Zolotoj

    Combobox acting as textbox

    Zolotoj Level 3

      I am trying to use a combobox as an itemrenderer in the DataGrid. But for some rows I want to have the combo acting as a textbox. I am able to achieve the visual effect: some rows have comboboxes with different  dataProviders and one row has an editable texbox. The comboboxes are working fine. I can select different values without any problem. But I do have a problem with the textbox. Here is some code:

       

      1. In order to show a combo as a textbox I am using the following:

      setStyle("arrowButtonWidth", "0");

       

      2. I am assigning a dataProvider to combo/textbox anyway because if I dont then after entering any data into combo/textbox dataGrid's selectedItem for the row and column where the textbox is in will be dropping a field. Another words, lets say that selectedItem looks like this:

      <a1>

           <f1>1234</f1>

           <f2>5678</f2>

      </a1>

      then in combo's change event after typing a single character in grid's selectedItem will look like this:

       

      <a1>

           <f1>1234</f1>

      </a1>

      that makes kind of hard to track changes and everything.

       

       

      3. I am then assigning dataProvider to my combo/textbox. That in turn creates another problem. When I type into the textbox it does not accept any entry. Just single characters typed over. But if I check the change event the grid does not drop a field.

       

      Any idea how to get this working?

       

      Thanks