Radzen DataGrid bound and unbound data?

Hello,

With the Grid component you could have bound data and also have a column of unbound data mixed in. With the DataGrid you cannot do this?

The below is a bound data grid with an added column of type string to list an IPAddress. @IPAddress is just a string variable.

My guess is that this wasn't supposed to work with the grid either, but did. The TItem is wrong for the @IPAddress, but again worked with the Grid and now does not work with the DataGrid.

Thanks,
Orlando

            <RadzenDataGrid @ref="evGrid" Data="@logdb.Logs" IsLoading="@isLoading" Count="@count" PageSize="50" TItem="Logs"
                            RowRender="@RowRender" CellRender="@CellRender" AllowVirtualization="true" AllowFiltering="true" SelectionMode="DataGridSelectionMode.Single"
                            FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive" LogicalFilterOperator="LogicalFilterOperator.And"
                            AllowPaging="false" AllowSorting="true" AllowColumnResize="true" Style="line-height: 12px; width:100%; height: 585px; margin-right:5px;">
                <Columns>
                    @*Main Grid View*@
                    <RadzenDataGridColumn Width="150px" TItem="Logs" Property="Timestamp" Title="Time Stamp" TextAlign="TextAlign.Left" Type="typeof(DateTime)" />         
                    <RadzenDataGridColumn Width="90px" TItem="Logs" Property="@IPAddress" Title="IP Adress" TextAlign="TextAlign.Left" Type="typeof(String)" Visible="@ShowIPColumn" />
                    <RadzenDataGridColumn Width="225px" TItem="Logs" Property="SourceContext" Title="Source Context" TextAlign="TextAlign.Center" Type="typeof(string)" />
                    <RadzenDataGridColumn Width="90px" TItem="Logs" Property="Level" Title="Level" TextAlign="TextAlign.Center" Type="typeof(string)" />                    
                    <RadzenDataGridColumn TItem="Logs" Property="Message" Title="Message" TextAlign="TextAlign.Left" Type="typeof(string)">
                        <Template Context="logs">
                            <RadzenImage Path=@GetIconPath(logs) Style="width:12px; height:12px" />
                            @((MarkupString)GetMessageSpan(logs))
                        </Template>
                    </RadzenDataGridColumn>
                </Columns>

This declaration didn't worked for me using both our legacy RadzenGrid and RadzenDataGrid component:

legacy RadzenGrid:


RadzenDataGrid:


You might need to use Template to show variable value in the column cells.

Hello,

Strange that this was working in the RadzenGrid product for me. But that was only temporarily needed so the template might work out better. Thank you, I didn't think of the template. I will try that.

Kind regards,
Orlando