Hiding Parent from the grid ??

Dear Team
  beside the parent in the grid there is a "+" if it is pressed the details will be
  shown
  At the top right of the caption there is 2 small buttons, 1 to goback to parent, 2
  to hide parent
  HOW to make the grid shows only the details directly without doing this steps
  
  any idea  
  Thank you very much



Answer this question

Hiding Parent from the grid ??

  • David Roberts

    Mr Alex
      Thanks for replying
      for ex : the order and orderdetails
      if the datasource of the grid orderdetails directly we will face an fk problem
      so if the grid have both of them by hiding the parent the problem will be solved
      couse the parent can be showed in a textboxs
      the question is how to hide the parent to deal with details directly

     any idea
     thanks a lot


  • Alexuo

    Mr Alex :
      Thank you very much

    Dear Team
      Any one have any idea
      thanks alot


  • pothik

    Mr Alex
      Thanks for replying
      for ex : the order and orderdetails
      if the datasource of the grid orderdetails directly we will face an fk problem
      so if the grid have both of them by hiding the parent the problem will be solved
      couse the parent can be showed in a textboxs
      the question is how to hide the parent to deal with details directly

     any ides
     thanks a lot


  • Deepak Sharma

    Mr Alex
      Thank you very much for replying
      i am using the DataGrid
      i will test it on the grid
     Note : About the expand all " What i want to do is to show only the child table
     dirctly without the master and its "+" is it possible .. without canceling it
              And kindely where should be this code puted in....doubleclick grid

      thank s a lot


  • May May

    i'm not sure exactly what control your using but for treeviews it is:

    TreeView1.ShowPlusMinus = False
    TreeView1.ExpandAll()

     

  • Nick Hanson

    Mr ALex
      thank a Lot
       Note Actualy i am using Datagrid 2003 not 2005
       i dont know is it make differance or not in this point

      thanks a lot


  • SeanCarpenter

    Hi,
    thanks for explaining, i understand now.
    however i'm still now sure of the exacty component you're using - 'DataGridView' if so, i cannot see the expandable buttons. to be honest, it would probably be better if someone that knows more about databases helps... but i can try

    Regards, Alex

  • Richard Hogan

    Hi,

    - To display OrderDetails associated with an Order, you need to know the row number of that Order in the Orders table + the relation name between the two tables. Then you can use
            DataGrid.NavigateTo(3, "OrdersOrderDetails")
    See http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpref/html/frlrfsystemwindowsformsdatagridclassnavigatetotopic.asp.

    - To hide the parent Order when displaying OrderDetails, set
            DataGrid.ParentRowVisible = False.
    See http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpref/html/frlrfsystemwindowsformsdatagridclassparentrowsvisibletopic.asp.

    Best regards,

  • hanray

    Ah, I see now. I think the control versions can change a lot...and I can only get hold of version 2005 :(. maybe someone could tell me if it is possilble, anyway sorry i can't help further.

    Alex

  • Udi Raz

    Hi,
    so that I can better understand your problem, i would appreciate if you could tell me the type of database you are using, since i never knew child tables can exist.

    Regards, Alex

  • Lewishsu

    Mr Huyn
       Thank you very very much
       without testing it , it looks correct

       Thanks a lot


  • Hiding Parent from the grid ??