BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
<EjsGrid DataSource"@OrderData">
<GridColumns>
@for (var I = 0; I < Cols.Length; I++)
{
<GridColumn Field="@Cols[I]" IsPrimaryKey="@(Cols[I] == "OrderID")" HeaderText="@Header[I]"></GridColumn>
}
</GridColumns>
</EjsGrid>
@code{
public string[] Cols = { "OrderID", "CustomerID", "EmployeeID" };
public string[] Header = { "ID", "Name", "Batch ID" }; |
|
<EjsGrid ModelType="@RowValue[0]" DataSource="@RowValue">
<GridColumns>
<GridColumn HeaderText="Names">
<Template>
@{
var index = (context as RowValues)[0];
<span>@index</span>
}
</Template>
</GridColumn>
</GridColumns>
</EjsGrid>
@code{
public class RowValues
{
private List<string> rows = new List<string>() { "VINET" };
public string this[int index]
{
get
{
return rows[index];
}
}
public int ID { get; set; }
}
public List<RowValues> RowValue = new List<RowValues>()
{
new RowValues(){ ID = 1 }
};
} |
3+ years later, is it yet possible to properly access the index operator?
Specifically from John's September 26, 2019 message above? Cheers, Peter
Hi Peter,
We would like to inform that we don’t have support for indexer property in Blazor DataGrid. Please let us know if you have any concerns.