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 to event code
posted

Looking for a neat way to achieve the following.

 I have a bunch of code in selecting dropdown values in a grid

So have code in

private void ultraGrid1_AfterCellListCloseUp(object sender, CellEventArgs e)

private void  ultraGrid1_CellListSelect(object sender, CellEventArgs e)

private void ultraGrid1_BeforeCellListDropDown((object sender, Infragistics.Win.UltraWinGrid.CancelableCellEventArgs e)

I want to rack em up again re: last record.
Is there some way I can call these? 
Should I override ?
If I make them public, can I pass the 'e' arguement?

i.e.

public void ultraGrid1_AfterCellListCloseUp(object sender, CellEventArgs e)

 

and a calling statement such as use ultraGrid1_AfterCellListCloseUp( this.ultraGrid1 , ((CellEventArgs) e)).....

I ask because otherwise I need to redo code in deperate module.

 

 

 

  • 469350
    Verified Answer
    Offline posted

    I don't understand your question. 

    Are you trying to find some way to force event handlers to fire? Event handlers are just methods and you can call them if you want, but this is generally not considered good practice. And calling the event handlers has no actual effect on the grid - it does not change the value selected in the dropdown, for example.

    What I would do is take the code inside those event handles and move it into methods, then call those methods both from the event handlers and from wherever else you need it. 

    Or... if you are trying to actually change the selected item in the dropdown, you should probably be setting the Value on the cell or something.