Raise Event Truedbgrid_AfterColUpdate in a different method

Posted by Donomar under C# on 10/28/2015 | Points: 10 | Views : 488 | Status : [Member] | Replies : 1
hi guys, i want to raise an event AfterColUpdate of True DB grid which has two parameters (object sender, C1.Win.C1TrueDBGrid.ColEventArgs) in a different method. i.e after i click some thing ,

code is here..
private void tdgEmployee_KeyDown(object sender, KeyEventArgs e)
MyeEventHandler handler = new MyeEventHandler(tdgEmployee_AfterColUpdate);
switch (tdgEmployee.Col)
case 1:
if (tdgEmployee.Col == 1 && e.KeyCode == Keys.F4)
this.SearchType = 1;
using (var form = new frmSearch(SearchType, tdgEmployee.Columns[1].Text))
var result = form.ShowDialog();
if (1 == 1)
string val = form.GetValue; //values preserved after close
tdgEmployee.Columns[1].Text = val;
// here i want to raise the event AftercolUpdate


Posted by: Jitendrasoft09 on: 10/29/2015 [Member] [MVP] Starter | Points: 25


You need to add the event handler in your class and reference your another method with delegate object as example given below which need to re structure with your code.
public event EventHandler ThresholdReached;

public delegate void ThresholdReachedEventHandler(ThresholdReachedEventArgs e);
handler.ThresholdReached + = tdgEmployee_AfterColUpdate;

Refer below link for the details-

Jitendra Kumar
If my post helps you, plz mark as an answer.

Donomar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response