
|
<SfDialog @ref="@dialog"
IsModal=true ShowCloseIcon="true" AllowDragging=true EnableResize=true
Width="800px"
@bind-Visible="@visible">
<DialogTemplates>
<Content>
@{
if (visible) // render Grid after displaying the dialog
{
<div style="height:250px"> //static height to immediate parent
<SfGrid ID="SGrid" TValue="ExpandoObject" EnablePersistence="true"
AllowSorting="true" AllowPaging="true" AllowFiltering="true" AllowResizing=true EnableAltRow="true"
Width="100%" Height="100%">
<GridPageSettings PageSize="50" PageSizes="new int[] { 25, 50, 100, 250, 500 }" />
<GridColumns>
<GridColumn HeaderText="Test"></GridColumn>
</GridColumns>
</SfGrid>
</div>
}
}
</Content>
</DialogTemplates>
</SfDialog>
@code
{
SfDialog dialog;
public bool visible = false;
void OnClick()
{
visible = true;
}
}
|