Telerik Forums
UI for Blazor Forum
3 answers
156 views
     Hello,
i was hoping that you could add a property to elements which have pop ups so we can assign a class to their pop ups like PopupWidth you could add PopupClass this helps a lot with customization
in my situation im trying to change style of TelerikDropDownList to make a color picker but i cant customize popup very well 
or maybe if there was a way to use popup functionality with our own ui 
 
Svetoslav Dimitrov
Telerik team
 answered on 29 Jun 2020
1 answer
406 views

Hello,

I need to update some greed each time a user clicks on calendar. Now we have two events in calendar.

The OnChange event fires on date input focus loses, so it not helps me.

The ValueChanged works fine but if I type date manually then I lose date input focus on grid update and cannot finish typing. Like, I try to change 6/1/2020  to 6/11/2020. It works if I fast enough but I would prefer to disable the date input field and have the calendar available only. Is it possible to do?

Another event OnClick on calendar would help but looks like it is not exist.

Thanks.

 

Marin Bratanov
Telerik team
 answered on 28 Jun 2020
2 answers
279 views

Hi,

I noticed that the context variable in templates is of type object (e.g. in the drop-down-list, grid-column). 
Is this due to historical reasons? Could this be changed to a generically typed context? 

Regards

Kasimier Buchcik

Svetoslav Dimitrov
Telerik team
 answered on 25 Jun 2020
4 answers
1.9K+ views

If I have a grid like

<TelerikGrid @ref="@GridRef"  Data="@GridData"> ...... </TelerikGrid>
 
private ObservableCollection<WrittenVM> GridData { get; set; }
public TelerikGrid<WrittenVM> GridRef { get; set; }

 

Everything works and GridRef gets a value

If I use this code

@if (GridData == null)
            {
                <p><em>Loading...</em></p>
            }
            else
            {
                <TelerikGrid @ref="@GridRef"  Data="@GridData"> ...... </TelerikGrid>
}
private ObservableCollection<WrittenVM> GridData { get; set; }
public TelerikGrid<WrittenVM> GridRef { get; set; }

 

GridRef doesn't get a value and stays null

The loading text is displayed but I use 

      protected override async Task OnAfterRenderAsync(bool firstRender)
        {
            if (firstRender)
            {
.....
                if (GridRef !=null)
                {
                    await GridRef.SetState(desiredState);
                }
                
                StateHasChanged();
            }
        }

 

To make a custom state of the grid

Maurice
Top achievements
Rank 1
Veteran
 answered on 24 Jun 2020
2 answers
765 views

Good Afternoon,

A few days ago I created this thread on setting the grouping for a grid on initialization and received an excellent solution from Marin Bratanov.
https://www.telerik.com/forums/can-i-set-grid-grouping-and-collapse-on-initialization

Now I am trying to generate multiple grids in a loop for each election race in my list. I was successfully able to do this by creating a local variable and grabbing only the specific race entries with a linq query. All of this works fantastically.

 

@foreach (VotingMainModel item in ElectionState)
            {
                if (item.OfficeName != OfficeName)
                {
                    <br />
                    <br />
 
                    <h6>@item.OfficeName</h6>
 
                    IEnumerable<VotingMainModel> electionFilter = ElectionState.Where(x => x.OfficeName.Equals(item.OfficeName));
 
                    <TelerikGrid Data="@electionFilter" Groupable="true" @ref="@GridRef" FilterMode="@GridFilterMode.FilterMenu">
                        <GridAggregates>
                            <GridAggregate Field="@(nameof(VotingMainModel.Votes))" Aggregate="@GridAggregateType.Sum" />
                        </GridAggregates>
                        <GridColumns>
                            <GridColumn Field="@(nameof(VotingMainModel.OfficeName))" Title="Office" Groupable="true" />
                            <GridColumn Field="@(nameof(VotingMainModel.Candidate))" Title="Candidate" Groupable="true" />
                            <GridColumn Field="@(nameof(VotingMainModel.Affiliation))" Title="Affiliation" />
                            <GridColumn Field="@(nameof(VotingMainModel.Precinct))" Title="Precinct" />
                            <GridColumn Field="@(nameof(VotingMainModel.Votes))" Title="Votes">
                                <GroupFooterTemplate>
                                    Total Votes: <strong>@context.Sum</strong>
                                </GroupFooterTemplate>
                            </GridColumn>
                        </GridColumns>
                    </TelerikGrid>
                    OfficeName = item.OfficeName;
                }
            }

 

However, I would like to also set the grouping automatically for each table generated. When I get to the OnAfterRenderAsync method I get an error that says "The render handle is not yet assigned" Can I have multiple tables reference the same grid reference if they are the exact same grids with just different data in the tables?

Can I make and assign local gridref variables to each grid..I did try this, but it simply did not group them. I also tried making a list TelerikGrid and tried to add a new TelerikGrid and set the state in the loop this also really didnt do anything.

protected override async Task OnAfterRenderAsync(bool firstRender)
       {
           if (firstRender)
           {
               {
                   await GridRef.SetState(GetDesiredInitialState());
 
               }
               this.StateHasChanged();
           }
       }
Marin Bratanov
Telerik team
 answered on 23 Jun 2020
1 answer
131 views

Hi,

How do I know what Filter user set for given Column ?

I see examples of how to set Filter using State property but don't see anything of how to read Filter value.

Please advise

Marin Bratanov
Telerik team
 answered on 23 Jun 2020
2 answers
1.5K+ views

Good Afternoon,

 

I am building an elections app. I would like to use the Telerik Grid to display the candidates and votes. Each candidate will have a table row/record for each precinct vote tally. I have set the ability to group and to group by the candidate column. However I have to click/drag manually to group the candidates.

 

What I would like is when the page loads is a listing of each candidate grouping with a footer of the total vote count in a collapsed state. Then the user if they want to see a breakdown of the votes by precinct, they can expand the candidate.

 

Can I setup the grid to do be in this state programatically? If so, can you get me pointed in the right direction?

Below is my grid

<TelerikGrid Data="@officeList" Groupable="true" >
                                    <GridAggregates>
                                       <GridAggregate Field="@(nameof(VotingMainModel.Votes))" Aggregate="@GridAggregateType.Sum" />
                                    </GridAggregates>
                                    <GridColumns>
                                        <GridColumn Field="@(nameof(VotingMainModel.Candidate))" Title="Candidate" Groupable="true" />
                                        <GridColumn Field="@(nameof(VotingMainModel.Affiliation))" Title="Affiliation" />
                                        <GridColumn Field="@(nameof(VotingMainModel.Precinct))" Title="Precinct" />
                                        <GridColumn Field="@(nameof(VotingMainModel.Votes))" Title="Votes">
                                            <GroupFooterTemplate>
                                                Total Votes: <strong>@context.Sum</strong>
                                            </GroupFooterTemplate>
                                        </GridColumn>
                                    </GridColumns>
                                </TelerikGrid>
Jason
Top achievements
Rank 1
Veteran
 answered on 22 Jun 2020
1 answer
188 views

I have a scenario I did not see how to fix.  I have a menu aligned top right with sub menus.  It expands down and then to the right.  The sub menu items on the screen edge stay on the screen but cover the menu items underneath.  Is there a way to expand to the left?

Eli
Top achievements
Rank 1
Veteran
 answered on 22 Jun 2020
4 answers
1.6K+ views
Hello,

i have a button that changes some data in backend after that i need to refresh data of a grid and also i need  sort, pagesize, ... data of grid  
Brian
Top achievements
Rank 1
 answered on 22 Jun 2020
3 answers
937 views

Im using a code-behind approach as in this article
https://www.telerik.com/blogs/using-a-code-behind-approach-to-blazor-components

When using the upload component, we need to specify a SaveUrl
https://docs.telerik.com/blazor-ui/components/upload/overview

Is that the only way? 
Can we have a web api that and a blazor server app in the same project, with the api handlers handling routes also?

 

BitShift
Top achievements
Rank 1
Veteran
 answered on 19 Jun 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?