Click here to Skip to main content
15,936,903 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I work on blazor server side . I need to add button column picker visibility

so by click button if I select column application id and application name then 2 columns only will display and another columns will hide

What I have tried:


 private IEnumerable<ApplicationValuesDto> AllApplicationsList = Array.Empty<ApplicationValuesDto>();

public class ApplicationValuesDto
        public int applicationId { get; set; }
        public string applicationName { get; set; }
        public string commonName { get; set; }
        public string typeOfApplication { get; set; }

I fill radzen grid by

private async Task SearchFilter()
        var request = new HttpRequestMessage(HttpMethod.Get, config["API_URL"] + "Application/SearchFullDataLike/" + appfilter.server_Name + "/" + appfilter.databaseName + "/" + appfilter.ownerName);
        var client = ClientFactory.CreateClient();
        var response = await client.SendAsync(request);
        using var responsestream = await response.Content.ReadAsStreamAsync();
        AllApplicationsList = await JsonSerializer.DeserializeAsync<List<ApplicationValuesDto>>(responsestream);

I load data on

protected override async Task OnInitializedAsync()
    await SearchFilter();

 <RadzenGrid AllowPaging="true" PageSize=@pageSize chan AllowFiltering="true" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive" AllowSorting="true"
                                            <RadzenGridColumn TItem="ApplicationValuesDto" Property="applicationId" Title="Application ID" Visible="false"></RadzenGridColumn>
                                            <RadzenGridColumn TItem="ApplicationValuesDto" Property="applicationName" Title="Application Name"></RadzenGridColumn>
                                            <RadzenGridColumn TItem="ApplicationValuesDto" Property="commonName" Title="Common Name"></RadzenGridColumn>
                                            <RadzenGridColumn TItem="ApplicationValuesDto" Property="typeOfApplication" Title="Type Of Application"></RadzenGridColumn>
                                            <RadzenGridColumn TItem="ApplicationValuesDto" Title="Edit">
                                                <Template Context="d">
                                                    <button type="button" @onclick="(()=> NavigateToEditApplication(d.applicationId))">

                                                        <img src="../assets/img/imageresize.png" />

Updated 28-Apr-23 12:38pm

1 solution

This is a Razdedn control. You need to ask in their support forums: Radzen Community forum[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900