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
605
RowSelected Event of UltraDropDown Not working :(
posted

Hello,

I have an Ultrawingrid and couple of coulmns in the windgrid display a UltraDrop down when clicked on it. Now once the drop down displays, I would like to set a couple of columns on the UltraGrid when the user choses a a row in the UltraDropdown.

To make this work I have the follwoing code in the constructor


cmbItems.RowSelected +=

new RowSelectedEventHandler(cmbItems_RowSelected);


And in the method I do the following 

 private void cmbItems_RowSelected(object sender, Infragistics.Win.UltraWinGrid.RowSelectedEventArgs e)
        {
            if (cmbItems.SelectedRow != null)
            {
                OrderRepositoryRequest ORR = (OrderRepositoryRequest)dgItems.ActiveRow.ListObject;
                Item item = (Item)e.Row.ListObject;
                if (item != null && item.ItemCode.ToString() != ORR.ItemCode)
                {
                    dgItems.ActiveRow.Cells["ItemCode"].Value = item.ItemCode;
                    dgItems.ActiveRow.Cells["ItemName"].Value = item.Name;
                    dgItems.ActiveRow.Cells["Vintage"].Value = item.Vintage;
                    dgItems.ActiveRow.Cells["UnitPerCase"].Value = item.UnitsCase;
                }
            }
        }

this even is supposed to fire when the user selects a row from the Dropdown list that gets displayed. But for whatever reason this method seems to be firing as soon as I click on the column in the Grid to display the drop down.

Any help would be greatly appreaciated !

THanks,
Ashwin

 

 

 

 

Parents
  • 71886
    Offline posted

    Hello Ashwin,

    You should set the 'SelectedRow' to null in the constructor, like this:

                cmbItems.SelectedRow = null;

    Please take a look at my sample, I will be waiting for your feedback.

Reply Children