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
75
Choosing correct event for ultragid
posted

My grid only allows for single row selection.

I want have a text box txtcase.Text on screen and when I select a row I want to do the following.

I'm trying to figure which grid event would be best to accomplish what I'm trying to do.

txtcast.Text = ugird.ActiveRow.Cells("Case").Value;

Note this is necessary because the business needs to see the change on the form, it is indicator that data will be updated based upon the selected row in the grid.

I'm trying to accomplish this in afterselectchange event and it doesn't like it there.

Thank you

Parents
No Data
Reply
  • 34810
    Offline posted

    Hello Robert,

    I have been investigating into the behavior you are looking to achieve, and being that you are utilizing the ActiveRow of the UltraGrid to determine what is shown in the TextBox, I would recommend that you instead use the AfterRowActivate event rather than the AfterSelectChange.

    If you were to continue with AfterSelectChange, I would then recommend that you continue with the grid.Selected.Rows collection rather than the ActiveRow, as the newly clicked row may not yet be registered as the ActiveRow at the point that AfterSelectChange fires.

    Please let me know if you have any other questions or concerns on this matter.

Children
No Data