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
30
How do I call up a MessageBox if I don't select the ultragrid list?
posted

hi !

How do I call up a MessageBox if I don't select the ultragrid list?

this is my code.

UltraGridState state = this.ultraGrid1.CurrentState;
if (state != UltraGridState.Row )
{
MessageBox.Show("not select !!!!");
this.ultraGrid1.Focus();
return;
};

please help me.

  • 960
    Suggested Answer
    Offline posted

    Hello SW Lee,


    I'm afraid I'm not certain whether or not I correctly understand what you would like to do, but if you are trying to show a message box when no row is selected, you should check ultraGrid's selected rows count instead of ultraGrid's CurrentState, like this:


    if(ultraGrid1.Selected.Rows.Count == 0)
    {
        MessageBox.Show("not select !!!!");
        this.ultraGrid1.Focus();
    }


    I hope this will help.
    If my understanding is not correct, please let me know.