Tutorial :Finding the Location in the User Control


I have one user control named XtraTreeList(It is combination of the treeview and datagridview) in which I want to get the location of the cell and nodes, but I can not find any property or method for that. Anyone have used it or any idea about that?

Or can I use the graphics approach to find the location of the cell or nodes ? Like, through the text of the cell can I get the location of the cell in the XtraTreeList with the help of the graphics?


private Rectangle GetCellBounds(TreeList tree, TreeListNode node, int cellIndex)  {      RowInfo ri = tree.ViewInfo.RowsInfo[node];      if (ri == null) return Rectangle.Empty;        CellInfo ci = tree.ViewInfo.RowsInfo[node].Cells[cellIndex] as CellInfo;      return ci.Bounds  }  

This function can be used to get the bounds of the cell.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »