|
<SfGrid TValue="Orders" AllowFiltering="true" Query="@Qry" AllowGrouping="true" Toolbar="@(new List<string> {"Add","Edit","Delete","Update","Cancel" })" AllowSorting="true" AllowPaging="true">
. . .. ..
</SfGrid>
@code{
public Query Qry = new Query().AddParams("AddCode", 10);
public string[] GroupCols = new string[] { "CustomerID" };
|
|
|
Apparently you can't pass complex types. It worked with a string but not worked with an object. It is correct?
|
<SfGrid TValue="Orders" AllowFiltering="true" Query="@Qry" AllowGrouping="true" Toolbar="@(new List<string> {"Add","Edit","Delete","Update","Cancel" })" AllowSorting="true" AllowPaging="true">
<GridEvents TValue="Orders" OnActionFailure="@ActionFailure"></GridEvents>
<SfDataManager Url="/api/default" InsertUrl="/api/Default/Insert" UpdateUrl="/api/Default/Update" RemoveUrl="/api/Default/Delete" Adaptor="Adaptors.UrlAdaptor"></SfDataManager>
<GridEditSettings AllowAdding="true" AllowDeleting="true" AllowEditing="true"></GridEditSettings>
<GridColumns>
<GridColumn Field="OrderID" HeaderText="Order ID" IsPrimaryKey="true" TextAlign="TextAlign.Right" Width="120"></GridColumn>
<GridColumn Field="CustomerID" HeaderText="Customer Name" Width="150"></GridColumn>
<GridColumn Field="OrderDate" HeaderText=" Order Date" Format="d" Type="ColumnType.Date" TextAlign="TextAlign.Right" Width="130"></GridColumn>
<GridColumn Field="Freight" HeaderText="Freight" Format="C2" TextAlign="TextAlign.Right" Width="120"></GridColumn>
</GridColumns>
</SfGrid>
@code{
public Query Qry = new Query().AddParams("AddCode", 10).AddParams("AddComplex",15);
public string[] GroupCols = new string[] { "CustomerID" };
public void ActionFailure(FailureEventArgs Args)
{
}
}
|
|
|
Could you please kindly supply an example for this, because i am lost.
Thank you so much for your cooperate.
Best regards.
Thank you so much for the example it helps me allot.