|
<style>
.e-toolbar-right {
left: 85px; /*Set the styles based on your requirement*/
}
</style>
|
|
<data name="Grid_Search" xml:space="preserve">
<value>Type the filter</value>
</data>
|
|
<style>
.e-toolbar-right .e-search { /*Apply for only the search input box*/
right: 632px;
}
</style>
|
|
<SfGrid @ref="GridInstance" ID="Grid" DataSource="@Orders" Toolbar="@Toolbaritems" AllowPaging="true">
<GridEditSettings AllowAdding="true"></GridEditSettings>
<GridEvents OnToolbarClick="OnToolbarClick" TValue="Order"></GridEvents>
...
</SfGrid>
<style>
.e-toolbar-right {
left: 0;
}
.e-toolbar .e-toolbar-items.e-tbar-pos .e-toolbar-left {
left: unset;
right: 0;
}
</style>
@code{
...
private List<object> Toolbaritems { get; set; } = new List<object>() { "Search", "Add" };
public void OnToolbarClick(ClickEventArgs args)
{
if(args.Item.Text == "Add")
{
args.Cancel = true; //Cancel the default toolbar add action.
//Perform your custom action here
}
}
...
}
|