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
685
getting value of any column in a dropdown when it is in a grid.
posted

The following code works  (dropdown in a grid), but I am after a better way.    

Without using  'value member' or the 'display member', how can i get the same result by referencing the grid and dropdown indirectly???  

private void ultraGrid1_CellListSelect(object sender, CellEventArgs e)

{

if ("TaskID".Equals(e.Cell.Column.Key))

{

Infragistics.Win.UltraWinGrid.UltraGridRow currentRowView = (Infragistics.Win.UltraWinGrid.UltraGridRow)ultraGrid1.DisplayLayout.ActiveRow;

Console.WriteLine(e.Cell.Row.Cells["TaskID"].Value);

 Infragistics.Win.UltraWinGrid.UltraDropDown myctrl = this.ultraDropDownTask;

myctrl.ActiveRow.Cells["Whom"].Value.ToString() ;

}

This gets the value, but is it possible to use currentRowView.?.?.?.?.value???

 

Parents
No Data
Reply
  • 71886
    Offline posted

    Hello buckland,

    You could try the code sample I prepared for you:

     

     private void ultraGrid1_CellListSelect(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
            {
                UltraDropDown drop = (UltraDropDown)e.Cell.ValueListResolved;
                Console.WriteLine(drop.DisplayLayout.ActiveRow.Cells["Column 1"].Value.ToString());
            }
    

     

    Please review the above code to see if it meets your requirements and feel free to let me know if I misunderstood you or if you have any other questions.

Children
No Data