Telerik Forums
UI for Blazor Forum
1 answer
125 views

Hey all,
I'm working on a wrapper for the KendoUI color picker to allow users more control over the colors of how their data is being represented.
So the overall flow will be, given a dynamic list of data, create a color picker for each one, passing an object reference for that specific item. Then, upon a color being picked, call a function on that object to update it's color property with the selection.
My problem being that I can't figure out how to get the object reference into the color changed event. I thought using JS protoyped functions would work (because I need each color picker to have it's own scope so it knows which object's function to call) but 'this' inside of ColorPickerWidget is scoped to the window instead of to ColorPickerWidget. 

Any suggestions would be appreciated!

JS functions:
function ColorPickerWidget(bindTo, objRef) {
    var objectRef = objRef;
    this.create(bindTo);
};

ColorPickerWidget.prototype.create = function(bindTo) {
    $(bindto).kendoColorPicker({
        value: "#ffffff",
        buttons: false,
        select: this.selectColor
    });
}

ColorPickerWidget.prototype.selectColor = function(e) {
    this.objectRef.invokeMethodAsync("ChangeColor", e.value);
}

 

.NET Functions:
protected async override Task OnInitializedAsync()
        {
            await JsRuntime.InvokeVoidAsync(identifier: "ColorPickerWidget", elRef, DotNetObjectReference.Create(this));
        }

        [JSInvokable]
        public void ChangeColor(string color)
        {
            Color = color;
            ColorChanged.InvokeAsync(color);
        }

Marin Bratanov
Telerik team
 answered on 10 Jul 2020
8 answers
1.1K+ views
I would like to have the upload component but change the text on the button or, even better, create a Telerik button and call the upload functionality. That way, the button could have theming, etc. and only the upload would need to be called. Any pointers on how I can accomplish either task (especially calling from a button)?
Alan
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 08 Jul 2020
1 answer
787 views

hello,

i had an issue with grid scroll because on some states after user has scrolled the grid  i want to bring   back up the scrolll and show first datas 
also my grid is virtualized. is there any way to do this ?

Svetoslav Dimitrov
Telerik team
 answered on 07 Jul 2020
3 answers
2.2K+ views

Hi
I am just learning/testing with Blazor and have created a standard Blazor Server App, using the default template built into VS 2019.  Is there a simple way I can convert this to a Telerik Blazor app?  For exampe copy over some DLLs or maybe install a nuget package?

Or do I have to start from scratch and use the Telerik Blazor built into VS Studio?

Manythanks in advance


Marin Bratanov
Telerik team
 answered on 07 Jul 2020
2 answers
117 views

Hi,

I have a calendar control with initial date. It could be "Today" or any other date. The Calendar works fine but the initial date is not visually selected. If I click on any date it's get selected and displayed in "red" but I need it selected initially without user intervention.

                                <TelerikCalendar SelectionMode="@CalendarSelectionMode.Single"
                                                 ValueChanged="@( (DateTime d) => OnBeginDateChangeHandlerAsync(d) )"
                                                 Min="@beginmin" Max="@beginmax"
                                                 @bind-Date="@begindate">
                                </TelerikCalendar>

@code {
    protected DateTime begindate { get; set; } = DateTime.Now.AddDays(-8).Date;

}

Thanks.

Andrey
Top achievements
Rank 1
Veteran
 answered on 06 Jul 2020
1 answer
423 views

Hi,

Is there any way to disable all weekends on Calendar control? Yes, I could create a list of disable dates but it will be a huge list. I just curious if there is some setting to do that.

Thanks.

 

Svetoslav Dimitrov
Telerik team
 answered on 06 Jul 2020
2 answers
1.7K+ views

I've used your example code to adjust the font size on a grid and been using rowheight to adjust the row height but there appears to be some limit as too how small you can make the row height.

I've attached a screen shot which shows there is a lot of space in the row above and below the small text, can this be reduced?

Cheers

Steve

Steve
Top achievements
Rank 1
Veteran
 answered on 04 Jul 2020
12 answers
1.8K+ views
Hi,

can specific items in the DropDownList be disabled? I.e. non-selectable and visually marked as disabled?

Scenario: we sometimes face the issue of having obsolete objects being referenced. Those obsolete objects may be marked as "deleted" in the database but are still referenced and need to be displayed if already referenced, but are not allowed to be selected anymore.

How would one do this with Blazor and Telerik's components?

Regards
Kasimier Buchcik
Dimo
Telerik team
 answered on 02 Jul 2020
1 answer
406 views
Combobox,Multiselect,Dropdown (all this TelerikSelectBase Controls) has a slow performace with 350 options. It opens and closes slowly. It would be nice to have Virtual Scrolling like the grid so it can perform better.
Marin Bratanov
Telerik team
 answered on 02 Jul 2020
2 answers
1.4K+ views

Hi,

when setting DropDownList's DefaultText (e.g. to a "none" string) then the component displays an additional entry which stands for a null/default value (in other words: it acts as a clear button).

But the OnChange event does not fire when selecting that entry.

Using: Telerik.UI.for.Blazor.Trial (2.14.1)

Regards
Kasimier Buchcik

Kasimier Buchcik
Top achievements
Rank 1
Veteran
 answered on 02 Jul 2020
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?