3 Replies Latest reply on Mar 9, 2010 9:38 AM by Karl_Sigiscar_1971

    Datagrid - if item exists?


      I am doing a project with the datagrid being my shopping cart. It has two columns one holding the name of the book being purchased and the other column being an item renderer of type text. what i want to achieve is - if a customer adds an already existing item in the shopping cart, the value in the text item renderer incriments by one, rather than the item appearing on a new row every time a user adds the same item into the shopping cart


      The questions are

      1. does datagrid have a sort of ' if exists' property

      2. if it does not have such a property how can my shopping cart achieve the above scenario


      Help will be much appreciated


      More information


      i am not sure if this is helpful but nonetheless it will make it more clear


      my e-commerce draws data from an XML file which in turn draws data from MySQL database. the book information includes

      1. bookID
      2. bookName

      3. bookDescription

      4. listPrice



      I figured the bookID could be used to identify if  it exists in the shopping cart but so far am still stuck. if any of this info does not make sense please ignore