2 Replies Latest reply on Jul 23, 2008 8:29 PM by atta707

    DataGrid Conditional Row Hiding ?

      Hello Everyone, I am trying to solve this basic and simple Datagrid problem and could not find any help anywhere so I have to resort to the experts here.

      I have an XML with nodes that contain an attribute value that I'm checking for to decide if I should display the row or not. For example, consider this XML

      xmlVar:XML = <XML>
      <a row="1" visibility="Invisible" />
      <a row="2" visibility="Visible" />
      <a row="3" visibility="Visible" />
      <a row="4" visibility="Visible" />
      <a row="5" visibility="Invisible" />

      The dataprovider for the datagrid would simply be {xmlVar.a} and the datagridcoulmn's dataprovider would be say "@row" Now lets say I want to only display rows that have the visibility="Visible" So the datagrid would only display "row" 2, 3, and 4 In other words, a conditional display of a a datagrid row. Hope you guys understand what I mean here. Is this even possible to do ?? I know other solutions as using temporary variable to store the xml nodes that have visibility="Visible" and then use that to feed in to the datagrid. That is a very inefficient solution to this problem. Wondering if anyone of you have a smarter/efficient way of solving this issue.

      Thanks in advance.