Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
16423 | Jul 15,2004 10:33 AM UTC | Jul 15,2004 02:30 PM UTC | WinForms | 2 |
![]() |
Tags: GridControl |
public event KeyPressEventHandler GridCellKeyPress;
2) in your UserControl.Load, subscribe to the grid''s event.
this.gridDataBoundGrid1.CurrentCellKeyPress += new KeyPressEventHandler(gridDataBoundGrid1_CurrentCellKeyPress);
3) In your handler in the UserControl, raise your new public event.
private void gridDataBoundGrid1_CurrentCellKeyPress(object sender, KeyPressEventArgs e) { if(GridCellKeyPress != null) GridCellKeyPress(sender, e); }
> public event KeyPressEventHandler GridCellKeyPress;
>
>
>2) in your UserControl.Load, subscribe to the grid''s event.
>
>this.gridDataBoundGrid1.CurrentCellKeyPress += new KeyPressEventHandler(gridDataBoundGrid1_CurrentCellKeyPress);
>
>
>3) In your handler in the UserControl, raise your new public event.
>>private void gridDataBoundGrid1_CurrentCellKeyPress(object sender, KeyPressEventArgs e) >{ > if(GridCellKeyPress != null) > GridCellKeyPress(sender, e); >} >
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.