1 Reply Latest reply on Mar 5, 2009 7:44 PM by Newsgroup_User

    Problem with text field in datagrid when the number of rows exceeds the datagrid size

    priyanka.k2003
      Hi,

      I am new to flex and i have an issue with textbox in data grid.

      I am trying to add a datagrid which displays the list of items. The quantity field will be displayed as InputText. When user enters the quantity it will be validated and the border color will be converted to red if the validation fails. This is working fine when the number of rows fit the size of datagrid.

      But the problem raises when all the rows cant fit the size of datagrid. Here a scroll bar will be given. If the user enters an invalid quantity then the TextInput's border will be changed to red but if we scroll down the InputText below also gets changed to red. This happens since the datagrid will maintain the details of the rows which are currently displayed and when the scrollbar is moved the same references will be given to the new rows because of which the changes applied to the first one will be reflected in the later ones.

      The code is attached below.

      Thanks in advance.
      Priyanka
        • 1. Re: Problem with text field in datagrid when the number of rows exceeds the datagrid size
          Level 7

          "priyanka.k2003" <webforumsuser@macromedia.com> wrote in message
          news:goo80a$1do$1@forums.macromedia.com...
          > Hi,
          >
          > I am new to flex and i have an issue with textbox in data grid.
          >
          > I am trying to add a datagrid which displays the list of items. The
          > quantity
          > field will be displayed as InputText. When user enters the quantity it
          > will be
          > validated and the border color will be converted to red if the validation
          > fails. This is working fine when the number of rows fit the size of
          > datagrid.
          >
          > But the problem raises when all the rows cant fit the size of datagrid.
          > Here a
          > scroll bar will be given. If the user enters an invalid quantity then the
          > TextInput's border will be changed to red but if we scroll down the
          > InputText
          > below also gets changed to red. This happens since the datagrid will
          > maintain
          > the details of the rows which are currently displayed and when the
          > scrollbar is
          > moved the same references will be given to the new rows because of which
          > the
          > changes applied to the first one will be reflected in the later ones.

          http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf Q2