Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
173
Getting Data from a node on doubleclick
posted

Good day,

I am doing what seems relatively common. When the user double-clicks on a node in a wintree I want to open up a form based on the data for that node.

Is this the best way:

private void utCars_DoubleClick(object sender, EventArgs e)
{
  UltraTreeNode node =
    utCars.UIElement.LastElementEntered.GetContext(typeof (UltraTreeNode)) as UltraTreeNode;

if (node != null)
{
  DataRowView dataRow = (DataRowView) node.ListObject;
 
if (dataRow.DataView.Table.TableName == "Sedan")
  {
   
int s = (int)dataRow.Row["SedanID"];
    DoSomething(s);

  }
}
}

Thanks

Gina_M

Parents Reply Children
No Data