Skip to content

Replies

0
Rhea
Rhea answered on Oct 19, 2009 7:05 AM

I too had the same problem when I tried to fire a validating event within a ButtonClick event.I went through the reply answer to ur post.But answer is not clear to me as well[quote user="ferdin"]

Hi Everyone 

How to fire a Ultratextbox validating event in Ultrabutton Click event. I tried it usually like these following two methods both throws same errors like this

Method 1:

private void uiButton1_Click(object sender, EventArgs e)

{


uiTextBox_Validating(this, CancelEventArgs.Empty);

}

Method 2:

private void uiButton1_Click(object sender, EventArgs e)

{


uiTextBox_Validating(this, e);

}

It throws some errors like

Error 2 The best overloaded method match for 'Task_2_Control_Panel.FrmControlPanel.uiTextbox_Validating(object, System.ComponentModel.CancelEventArgs)' has some invalid arguments D:\Task 2 Control Panel\Control Panel.cs 1225 13 Task 2 Control Panel

Error 3 Argument '2': cannot convert from 'System.EventArgs' to 'System.ComponentModel.CancelEventArgs' D:\Task 2 Control Panel\Control Panel.cs 1225 44 Task 2 Control Panel

Could anyone help me to sort this issue.

Thanks in advance

Ferdin

[/quote]….