Hi,
In a grid view clicking on the menu item ConditionFormatting opens a Conditional Formatting form.
Requirement is to set it's topMost property to True and set focus on it(if opened) at the time of refreshing the grid view. But I am not getting any refrence to this form so that i can call form.TopMost = true and form.Focus() and also we can open several ConditionalFormatting form at the same time. So i want to focus the current form on which user was working recently.
i tried it this way at the time of refreshing the GridView but it sets focus to first Conditional Formatting form.
In a grid view clicking on the menu item ConditionFormatting opens a Conditional Formatting form.
Requirement is to set it's topMost property to True and set focus on it(if opened) at the time of refreshing the grid view. But I am not getting any refrence to this form so that i can call form.TopMost = true and form.Focus() and also we can open several ConditionalFormatting form at the same time. So i want to focus the current form on which user was working recently.
i tried it this way at the time of refreshing the GridView but it sets focus to first Conditional Formatting form.
bool setFocusTogridView = true;
foreach (Form form in Application.OpenForms)
{
if (form.GetType() == typeof(ConditionalFormattingForm))
{
form.TopMost = true;
form.Focus();
setFocusTogridView = false;
break;
}
}
if(setFocusTogridView)
this.gridView.Focus();
Please let me know if there is some solution for this problem.
I am using Telrik version 8.2.0.0.
Regards,
Renu