Hi,
I have a grid with 2buttons, one to delete and the other to perform another action, and clicking on one of them it launches the RowSelect event, can I exclude columns so they don't launch the RowSelect event? How?
Thank you very much in advance.
enchev
December 11, 2019, 8:41am
2
I set stopPropagation for the button in the template and it doesn't work.
This is the code:
<RadzenGridColumn TItem="Mat_Materia" Context="materia" Bubble="false" Filterable="false"Preformatted text Sortable="false" TextAlign="TextAlign.Center" Width="70px">
<Template Context="materia">
<RadzenButton ButtonStyle="Radzen.ButtonStyle.Danger" Icon="delete" Size="Radzen.ButtonSize.Medium" Click="@(args => DeleteRow(materia))" @onclick:stropPropagation="true" />
</Template>
</RadzenGridColumn>
The grid looks like this:
enchev
December 11, 2019, 9:44am
4
This is row highlight on hover, not row selection.
No, the grid has the RowSelect event.
Code:
<RadzenGrid @ref="gridMaterias" AllowFiltering="true" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive" AllowPaging="true" PageSize="10" AllowSorting="true"
Data="materias" TItem="Mat_Materia" RowSelect="@gridMateriasRowSelect">
<Columns>
<RadzenGridColumn TItem="Mat_Materia" Property="Mat_Materia1" Title="Materia" />
<RadzenGridColumn TItem="Mat_Materia" Property="Revisores" Title="Revisores" />
<RadzenGridColumn TItem="Mat_Materia" Property="Revisores" Sortable="false" Filterable="false" Width="2.5%">
<Template Context="materia">
<RadzenIcon Icon="done" Visible="@(materia.Revisores != "")" Style="color: green; font-weight: bold;"></RadzenIcon>
<RadzenIcon Icon="clear" Visible="@(materia.Revisores == "")" Style="color: red; font-weight: bold;"></RadzenIcon>
</Template>
</RadzenGridColumn>
<RadzenGridColumn TItem="Mat_Materia" Property="Verificadores" Title="Verificadores" />
<RadzenGridColumn TItem="Mat_Materia" Property="Verificadores" Sortable="false" Filterable="false" Width="2.5%">
<Template Context="materia">
<RadzenIcon Icon="done" Visible="@(materia.Verificadores != "")" Style="color: green; font-weight: bold;"></RadzenIcon>
<RadzenIcon Icon="clear" Visible="@(materia.Verificadores == "")" Style="color: red; font-weight: bold;"></RadzenIcon>
</Template>
</RadzenGridColumn>
<RadzenGridColumn TItem="Mat_Materia" Context="materia" Bubble="false" Filterable="false" Sortable="false" TextAlign="TextAlign.Center" Width="70px">
<Template Context="materia">
<RadzenButton ButtonStyle="Radzen.ButtonStyle.Secondary" Icon="folder" Size="Radzen.ButtonSize.Medium" Click="@(args => OpenMapaContenidos(materia))">
</RadzenButton>
</Template>
</RadzenGridColumn>
<RadzenGridColumn TItem="Mat_Materia" Context="materia" Bubble="false" Filterable="false" Sortable="false" TextAlign="TextAlign.Center" Width="70px">
<Template Context="materia">
<RadzenButton ButtonStyle="Radzen.ButtonStyle.Danger" Icon="delete" Size="Radzen.ButtonSize.Medium" Click="@(args => DeleteRow(materia))" />
</Template>
</RadzenGridColumn>
</Columns>
This grid looks like this:
When I set the stopPropagation parameter, the grid looks like the previous message and it doesn't work.
Any solution to this?
Thank you very much in advance.
I have exact same issue it opens up same form twice on rowselect on di=oubleclick