0
Good morning, how are you?
I am working with Xtratabcontrol, and when I close a tab, I need to know which tab was closed. today at the event xtraTabControl1_CloseButtonClick
, I’m doing it this way:
`
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 = "";
}
}`
Someone could help me with the IF condition?
Thanks
Hi Thomas! Arg.Page (2° command) does not contain information necessary for your verification?
– Jhonatas Kleinkauff
Exactly, I hadn’t noticed. Thank you.
– Thomas Erich Pimentel