Telerik Forums
UI for Blazor Forum
1 answer
1.3K+ views

I have a need to reset the form and it's validation back to a pristine state (blank form with validation) either when the form is complete and successful response is returned or by user initiated click event.

I don't see anywhere in the documentation to do so.

I have set it equal to a new instance of the FormModel, and that indeed clears the form, BUT it does not reset the form validation or any of those behaviors.

How can I reinitialize the form the same way that the form initializes on route activation?

 

Marin Bratanov
Telerik team
 answered on 16 Nov 2021
1 answer
253 views

Hi there,
I have created the blazor app with Telerik.

For the <TelerikDatePicker> i am using DateTime with nullable value. and this works fine.
if we select the date from the datepicker then it is working as expected.
When we try to enter the date manualy by keyboard. then it is giving the error if date is less then 1/1/1900.
Not sure what  i need to do.


Can you help with this

Svetoslav Dimitrov
Telerik team
 answered on 15 Nov 2021
2 answers
146 views

Hi!

My grid data is ExpandoObjects. The grid has ShowColumnMenu set to true, FilterMode set to GridFilterMode.FilterMenu and FilterMenuType set to FilterMenuType.CheckBoxList.

I am defining a bunch of GridColumn by looping a list. When defining these i set the Filterable parameter to false. But the th element still has the k-filterable css class, which add the extra padding to the right.

How do I get rid of the extra padding in my headers?

Here's a peek of my code:

<TelerikGrid @ref="Grid"
             Data="Data"
             Pageable="true"
             Sortable="true"
             Resizable="true"
             Reorderable="true"
             ShowColumnMenu="true"
             Groupable="true"
             SortMode="@SortMode.Multiple"
             FilterMode="GridFilterMode.FilterMenu"
             FilterMenuType="FilterMenuType.CheckBoxList"
             ScrollMode="GridScrollMode.Scrollable"
             OnRowContextMenu="OnRowContextMenuClick"
             OnRowDoubleClick="HandleOnRowDoubleClick"
             Width="100%"
             RowHeight="40"
             PageSize="100">
    <GridColumns>
        @*
        
        Other GridColumns

        *@

        @if (Data?.Count() > 0)
        {
            foreach (var property in ((IDictionary<string, object>)Data.FirstOrDefault()).Where(p => AllDomainIdentifiers.Contains(p.Key)))
            {
                var domainModel = (DomainModel)property.Value;
                <GridColumn Field="@($"{domainModel.Name}Field")"
                            FieldType="typeof(bool)"
                            Width="30px"
                            Filterable="false"
                            Groupable="false"
                            Sortable="false"
                            ShowColumnMenu="false"
                            Title="@domainModel.Abbreviation">
                    <HeaderTemplate>
                        <span id="@( $"domainHeader-{domainModel.Id.ToString()}" )" alt="@domainModel.Name">@domainModel.Abbreviation</span>
                        <TelerikTooltip TargetSelector="@( $"#domainHeader-{domainModel.Id.ToString()}" )"
                                        ShowOn="@TooltipShowEvent.Hover"
                                        Position="@TooltipPosition.Top" />
                    </HeaderTemplate>
                    <Template>
                        <div class="d-flex justify-content-center align-items-center">
                            <TelerikCheckBox Value="@HasDomainActivated(context as ExpandoObject, domainModel)"
                                             ValueChanged="@((bool value) => HandleDomainActivationChanged(context as ExpandoObject, domainModel, value))"
                                             Enabled="@(IsAuthorizedForAllDomains() || IsAuthorizedForDomain(domainModel))" />
                        </div>
                    </Template>
                </GridColumn>
            }
        }
    </GridColumns>

</TelerikGrid>

Arman
Top achievements
Rank 1
Iron
 answered on 12 Nov 2021
1 answer
236 views

We have successfully implemented saving the state of our custom component main grid with browser local storage, using this example.

 

We have sub-grids in the main grid via the DetailTemplate section, for example:

<TelerikGrid Data="@Data"
             @ref="@GridReference">
    <DetailTemplate>
        @{
            var ctx = context as ExpandoObject;
            <CustomSubgrid Context="@ctx" Property="Expanded" @ref="@SubGrid"></CustomSubgrid >
        }
    </DetailTemplate>

 

Each page using the custom main grid has a unique state storage key - e.g.:

StateStorageKey="ThisPage_MainDynamicGrid"

Is it possible to do a similar saving and loading of the sub-grids states, if they are dynamically loaded via the DetailTemplate?

Marin Bratanov
Telerik team
 answered on 11 Nov 2021
1 answer
375 views

Having sub-grids of related data is very useful, but the interface can be a bit busy (see attached pic). Perhaps a solution would be if all other rows are blurred or otherwise de-emphasised when the expand icon is clicked, using jQuery and CSS, or using the OnRowExpand event.

I'm liking using less jQuery - so the OnRowExpand event is my preferred method; but how would I change the style of all the other rows? Perhaps a better solution is to change the css of the expanded row plus details row below? I don't see how that can be done except using jQuery.

Marin Bratanov
Telerik team
 answered on 11 Nov 2021
0 answers
165 views

I have a div with bootstrap class of d-flex and inside that div I have two additional divs with class of flex-fill. The idea is to have a section on the blazor page I'm developing that contains two TelerikChart objects side by side. My problem is the Charts get generated to be wider then the div. How can I use TelerikChart and contain the chart within the div.


<div class="card-body d-flex flex-fill">
        <div class="flex-fill" id="Savings">
            <TelerikChart>
                        <ChartSeriesItems>
                            <ChartTitle Visible="false"></ChartTitle>
                            <ChartSeries Type="ChartSeriesType.Pie"
                                         Data="@i"
                                         Field="@nameof(extras.ISG.Savings)"
                                         CategoryField="@nameof(extras.ISG.Part)"
                                         ExplodeField="false">
                                <ChartSeriesTooltip Visible="true" Context="item">
                                    <Template>
                                        @((item.DataItem as extras.ISG).Part)
                                        <br />
                                        @((item.DataItem as extras.ISG).TotalTransactions)
                                        <br />
                                        @((item.DataItem as extras.ISG).Savings)
                                    </Template>
                                </ChartSeriesTooltip>                                
                                <ChartLegend Visible="true" Position="ChartLegendPosition.Bottom"></ChartLegend>
                            </ChartSeries>
                        </ChartSeriesItems>
                    </TelerikChart>                
                    </div>
        <div class="flex-fill" id="defferedSummary">
                    <TelerikChart>
                        <ChartSeriesItems>
                            <ChartTitle Visible="false"></ChartTitle>
                            <ChartSeries Type="ChartSeriesType.Pie"
                                         Data="@CdefferedGrouped"
                                         Field="@nameof(extras.dGrouped.Earned)"
                                         CategoryField="@nameof(extras.dGrouped.Partner)"
                                         ExplodeField="false">
                                <ChartSeriesTooltip Visible="true" Context="item">
                                    <Template>
                                        @((item.DataItem as extras.dGrouped).Part)
                                        <br />
                                        @((item.DataItem as extras.dGrouped).TotalTransactions)
                                        <br />
                                        @((item.DataItem as extras.dGrouped).Earned)
                                        <br />
                                        @((item.DataItem as extras.dGrouped).Spent)
                                    </Template>
                                </ChartSeriesTooltip>
                                <ChartSeriesLabels Visible="true" Position="ChartSeriesLabelsPosition.Right"></ChartSeriesLabels>
                                <ChartLegend Visible="true" Position="ChartLegendPosition.Bottom"></ChartLegend>
                            </ChartSeries>
                        </ChartSeriesItems>
                    </TelerikChart>                           
        </div>
    </div>

CJ
Top achievements
Rank 1
 asked on 11 Nov 2021
0 answers
1.3K+ views

Is it possible to run another method, if the user presses and holds on a series for lets say 2 or 3 seconds?

Like in WPF: https://www.telerik.com/forums/long-press-on-a-button-c1515a65de7e

If this makes sense.


Regards,
Nikolas

Nikolas
Top achievements
Rank 2
Iron
Iron
 asked on 11 Nov 2021
1 answer
124 views
Can I turn off editing of task names?
I plan to create a list of tasks with fixed names, but when I click on the name cell, the editing mode is activated.
And in general, is it possible to disable the built-in edit form and override your own by clicking the edit button in the command column?
The proposed editing functionality is not convenient.
Svetoslav Dimitrov
Telerik team
 answered on 11 Nov 2021
0 answers
213 views

I have pop-up, where try to reset password.

when I first fill in the value of the password field, then password confirmation field and if they do not match, the warning text is displayed correctly, but if I change the password after filling in the password confirmation, the system will not understand that the passwords are different

Correct:



Correct:


Incorrect: After adding symbols in Password field they are not match, but message doesn't display

Evgeny
Top achievements
Rank 1
 asked on 11 Nov 2021
3 answers
161 views

Hello,

I have a problem with gridlines not showing, when i use multiple axes.

In the image below, the MajorGridLines of the axis to the right should be shown as red, and the MinorGridLines should also be visible. Is this a bug, intended or am i just doing something wrong.

I have posted the code used for generating the chart at the bottom of this post.


<TelerikChart>
    <ChartTitle Text="Gross domestic product growth /GDP annual %/"></ChartTitle>
    <ChartTooltip Visible="true"></ChartTooltip>
    <ChartLegend Position="ChartLegendPosition.Top" Align="ChartLegendAlign.Start"></ChartLegend>

    <ChartSeriesItems>
        <ChartSeries Type="ChartSeriesType.Line" Style="ChartSeriesStyle.Normal" Name="Chile" Data="@Data" Field="@nameof(ModelData.Series1)"></ChartSeries>
        <ChartSeries Type="ChartSeriesType.Line" Style="ChartSeriesStyle.Step" Name="India" Data="@Data" Field="@nameof(ModelData.Series2)"></ChartSeries>
        <ChartSeries Type="ChartSeriesType.Line" Style="ChartSeriesStyle.Smooth" Name="Haiti" Data="@Data" Axis="Secondary" Field="@nameof(ModelData.Series3)"></ChartSeries>
    </ChartSeriesItems>

    <ChartCategoryAxes>
        <ChartCategoryAxis AxisCrossingValue="crossingValues" Categories="@Categories"></ChartCategoryAxis>
    </ChartCategoryAxes>

    <ChartValueAxes>
        <ChartValueAxis ZIndex="1" Max="100">
            <ChartValueAxisLabels Format="{0}%"></ChartValueAxisLabels>
            <ChartValueAxisMajorGridLines Visible="true"></ChartValueAxisMajorGridLines>
        </ChartValueAxis>
        <ChartValueAxis Name="Secondary" ZIndex="12">
            <ChartValueAxisLabels Format="{0}%"></ChartValueAxisLabels>
            <ChartValueAxisMajorGridLines Color="Red" Visible="true" DashType="DashType.Solid"></ChartValueAxisMajorGridLines>
            <ChartValueAxisMinorGridLines Visible="true" DashType="DashType.Dot"></ChartValueAxisMinorGridLines>
        </ChartValueAxis>
    </ChartValueAxes>
</TelerikChart>

Best Regards,

Emil

Nadezhda Tacheva
Telerik team
 answered on 10 Nov 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?