Telerik Forums
UI for Blazor Forum
1 answer
235 views

Hi,

Surprisingly, I was not able to find an answer how to solve this so thus this post. 

We are two developers developing a Blazor Server Side Project. I am the one doing all the GUI / Blazor stuff and my colleague is doing only Domain and Database. Now, the problem is that in order to run any of his code, he needs to be able to run the Blazor project from Visual Studio which turns out to be problematic as he does not have a license for Telerik and don't need one as he is never working with the controls or even Blazor. How would he go about to solve this without having to buy a license he would never use? 

If there is no obvious solution, please provide a good workaround. 

Thanks.

Missing User
 answered on 29 Dec 2021
1 answer
381 views

<TelerikComboBox TItem="ObjectSelection" TValue="int?" Data="_testObjs" Value="_objSel" ValueExpression="() => _objSel" ValueChanged="ObjSelected" TextField="@nameof(ObjectSelection.Description)" ValueField="@nameof(ObjectSelection.Id)" ScrollMode="DropDownScrollMode.Virtual" PopupHeight="200px" ItemHeight="20" PageSize="20" ValueMapper="ValueMapper" OnRead="RetrieveObjs" TotalCount="100"></TelerikComboBox> private IEnumerable<ObjectSelection> _testObjs; private int? _objSel; private Task ObjSelected(int? id) { return(Task.Run(() => _objSel = id)); } public Task RetrieveObjs(ReadEventArgs args) { _testObjs = new[] { new ObjectSelection {Id = 1, Description = "Obj 1"}, new ObjectSelection {Id = 2, Description = "Obj 2"}, new ObjectSelection {Id = 3, Description = "Obj 3"}, }; return(Task.Delay(300)); }

In this scenario, when selecting an object in the combobox, the combobox remains emtpy.

If the value changed handler looks like below, the combobox behaves as expected:

private void ObjSelected(int? id)
        {
            _objSel = id;
        }


Joana
Telerik team
 answered on 28 Dec 2021
1 answer
707 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
273 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.0K+ 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
307 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
500 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
135 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
494 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.0K+ 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?