xtraTabControl1_CloseButtonClick
event, I'm doing it as follows:
'
private void xtraTabControl1_CloseButtonClick(object sender, EventArgs e) //click fechar aba
{
ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;
(arg.Page as XtraTabPage).PageVisible = false;
if (//CONDIÇÂO SOMENTE PARA A PAGE 1) // so executa se for a aba 1
{
foreach (Control ctl in xtraTabPage1.Controls)
{
if (ctl is TextEdit)
{
((TextEdit)(ctl)).Text = string.Empty;
}
if (ctl is TextBox)
{
((TextBox)(ctl)).Text = string.Empty;
}
}
id_v = 0;
gridControl2.DataSource = null;
gridView2.Columns.Clear();
gridView1.ActiveFilterString = "";
}
}'
Can anyone help me with the condition of the IF?
Thanks