Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
DataGrid: Button in Column


Is it possible to put a button in a cell?

<DataGrid DataSource="@exceptions" AutoGenerateColumns="false" Height="100%" Width="100%">
      <TextColumn Field="ApplicationName" />
      <TextColumn Field="Id" />
      <TextColumn Field="ApplicationUser" />
      <TextColumn Field="MachineName" HeaderText="Server" />
      <TextColumn Field="ExceptionMessage" />
      <TextColumn Field="EnvironmentName" />
      <TextColumn Field="Severity" />
      <TemplateColumn> <button @onclick="@(() => OpenException(Id))">Detail</button></TemplateColumn>
This does not seem to work. Also how do I access a property (Id)?