Telerik Forums
UI for Blazor Forum
1 answer
762 views

Hi I am setting the culture in program.cs

var culture = new CultureInfo("da-DK");
culture.DateTimeFormat.ShortDatePattern = "dd-MM-yyyy";
CultureInfo.DefaultThreadCurrentCulture = culture;
CultureInfo.DefaultThreadCurrentUICulture = culture;

If I don't set it I get "dd.MM.yyyy"

I would like to set it to "dd/MM/yyyy" but when I do that it revert to "dd.MM.yyyy"

Is this me using the culture object in the wrong way or a bug in the Telerik Components?

Joana
Telerik team
 answered on 27 Dec 2021
1 answer
328 views
Hello!
How to disable or localize built-in by default tooltip "Select all rows" and "Select a row" on GridCheckboxColumn's checkboxes?
Stamo Gochev
Telerik team
 answered on 24 Dec 2021
1 answer
1.1K+ views

I have a grid where the last few rows show different types of totals with different color highlighting. In the OnRowRenderHandler, I assign the background-color via CSS like args.Class = "bc_orange". This works fine unless the row also has the k-alt class in which case it overrides the background color.

Is there a way in the OnRowRender to remove the k-alt class? Normally in JQuery I would use the .removeClass function.

 

    public void OnRowRenderHandler(GridRowRenderEventArgs args)
    {
        Models.Results item = args.Item as Models.Results;

        switch (item.row)
        {
            case 1:
                args.Class = "bc_orange disable-hover";
                break;
                
            case 2:
                args.Class = "bc_lightgreen disable-hover";
                break;
                
            case 3:
                args.Class = "bc_lightblue disable-hover";
                break;
        }
    }


Dimo
Telerik team
 answered on 23 Dec 2021
1 answer
343 views

Hello,

We are using TelericBlazor Grid with Drag and Drop functionality, as per link https://demos.telerik.com/blazor-ui/grid/drag-drop

Now, I am dragging the items from one grid to another Grid., like dragging ITEMA from GRID-A to GRID-B, which is working as expected.
But as a User, I want to change the background color of the dragged ITEMA to Different color. 

So Is there any way to change the style of the dragged and dropped row in the Telerik grid?

 

 

Dimo
Telerik team
 answered on 23 Dec 2021
1 answer
564 views

I have a grid that takes live data (like connection status of an item) from a specific endpoint of a controller. I want to take those live data only for selected items in the grid without changing grid' s columns. I mean that i want to change data source in the grid only for selected items. Is there an example of something like this?

Thank you

Dimo
Telerik team
 answered on 23 Dec 2021
0 answers
177 views

Hi,

 

After submiting the form, On error handling in Catch, the execption is assign to variable error

After render the vairable error is null

Could please help how to assign execption value to variable error after render

Please see below code.



@{
string error { get; set; }

protected override void OnInitialized()
{
                try{}
                finaly{}
}

async protected override Task OnAfterRenderAsync(bool firstRender)
         {
                    var relativeUri = navigationManager.Uri;
                    var uri = navigationManager.ToAbsoluteUri(relativeUri);

                    if (firstRender){}

if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("isSessionTimeout", out var tempTimeout))
                    {
                           notification?.ShowError(error);
                           //error = "Session timed out";
                           showToast = true;
                    }
}


async Task OnSubmit()
	{
              try{

              }

              catch(exception ex){
                     error = ex.ToString();
              }

       }
}

                    
Vishnu
Top achievements
Rank 1
Iron
Veteran
 updated question on 21 Dec 2021
1 answer
567 views

I would like the behavior of the RadioGroup, but have the label and input pairs styled like toggle buttons like https://getbootstrap.com/docs/5.0/components/button-group/#checkbox-and-radio-button-groups

Dimo
Telerik team
 answered on 21 Dec 2021
1 answer
3.3K+ views

So,  I have a TelerikDialog inside a parent component. The dialog title and content have data that may change.

When this data should change, I call StateHasChanged() in the parent, but nothing updates. Stepping through the code shows that the values themselves have changed, but no content changes in the browser.

I noticed that TelerikDialog's have a Refresh method you can call, and calling this instead of calling StateHasChanged in the parent does bring in the changes, so its a solved problem...

However I wanted to ask why this is? Am I going mad, or would calling StateHasChanged usually work when calling from the parent like that? (Imagine passing in a string variable inside a H4 tag as the dialog title, changing the string variable and calling StateHasChanged).

If that would normally work, I am interested in why we need to call Refresh instead in this instance, what was done to cause this and for what reason? (Its plain curiosity, not an problem or issue at all).

As an example to illustrate, I created a simple repl with 2 dialogs. Each contains a button which will change the title, but the method to change the title attempts to update in different ways. The first calls StateHasChanged (which I thought at first would work), whereas the second calls Refresh on the Dialog ref, which is what does work. The repl can be found here: https://blazorrepl.telerik.com/cvlmwuOR02RX8uFh46

Thanks.

Apostolos
Telerik team
 answered on 21 Dec 2021
1 answer
185 views

Hello, I'm apologize for my poor English.

The StockChartValueAxis format is set to {$0.0}, but I want to change it to {0} integer form.

 

What should I do?

Marin Bratanov
Telerik team
 answered on 18 Dec 2021
1 answer
276 views

Hi,

I've noticed a problem with the Grid when using grouping as well as grid row drag and drop functionality.

If both are enabled, the group headers don't span the entire width of the grid. The rendered data cell that represents the group header gets a colspan attribute that is 1 below the desired number. For example, if my Grid has grouping enabled and has 2 GridColums and 1 GridCheckboxColumn, the colspan should be 4 (see first attachment), which is correct.

But, when I also enable the drag and drop functionality (using RowDraggable), the computed colspan is still 4, even though it should be scaled up to 5 (see second attachment).

Is there any way we can override this behaviour, or is there any other work-around?

Kind regards,

Diederik

Marin Bratanov
Telerik team
 answered on 18 Dec 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?