|
void Opened(Syncfusion.Blazor.Popups.OpenEventArgs args)
{
//Prevent default SfDialog focus.
args.PreventFocus = true;
//Focus should be in Text Box Number Two (Not working as expected)
TxtBox2.FocusIn();
}
|
Dear support!
I have the opposite challenge. I have one textbox in a dialog.
How can I make sure there is no focus on the textbox initially?
Hans
|
<SfDialog @ref="oDialog"
ShowCloseIcon="true"
IsModal="true"
@bind-Visible="DialogVisible">
<DialogEvents Opened="Opened" />
<DialogTemplates>
<Header>
Dialog Test
</Header>
<Content>
<div class="container">
<div class="row">
<div class="col-md-12">
<SfTextBox @ref="TxtBox" />
</div>
</div>
</div>
</Content>
</DialogTemplates>
</SfDialog>
<SfButton OnClick="OnClickButton">Show Dialog</SfButton>
@code {
SfDialog oDialog;
SfTextBox TxtBox { get; set; }
bool DialogVisible { get; set; } = false;
void Opened(Syncfusion.Blazor.Popups.OpenEventArgs args)
{
args.PreventFocus = true;
}
void OnClickButton(MouseEventArgs args)
{
oDialog.Show(true);
}
} |
Hi,
I am facing problem: I am not able to input into my sftextbox which is define withing sfdialog how can i fix this.
here is my code:
Hi Daniyal Qamer DQ,
We have validated the reported query on our end, but unfortunately, we were unable to reproduce the reported issue as per your scenario. We have also shared a sample for your reference. In order to assist us in identifying the problem and provide a better solution, we kindly request that you provide additional details about the issue, as mentioned below:
Regards,
Udhaya Kumar D