Telerik Forums
UI for Blazor Forum
0 answers
361 views

Hello,

I have a grid where is use OnRead to get the data. The EditMode is set to Inline. 
I can insert, and delete a row from the grid but I can't edit a row.
I have defined EditorTemplate but it doesn't enter into it.
I'm trying to migrate the solution on the version 3.7.0 of your framework.
Previously I had the version 2.29 of your framework where I didn't got that problem.
Behind the grid I have a DataTable like in this example: https://demos.telerik.com/blazor-ui/grid/data-table

I've read the articles regarding this issue and I also tried the solution on this topic
https://www.telerik.com/forums/grid-with-inline-edit-how-to-add-new-row-and-manage-save-cancel-request-from-code
But it doesn't seams to work for me, the EditorTemplate is not displayed.

I will appreciate if you can help me on this issue.

Thank you in advance,
Cipri

Ciprian Daniel
Top achievements
Rank 1
Iron
Iron
Iron
 asked on 17 Jan 2023
1 answer
682 views

Hello,

I want to provide two modes for editing with the editor.

One full-featured editor with all tools (EditorToolSets.All) and one mode with none or only custom tools and I want to switch between the modes.

So I tried somethink likse this:


private List<IEditorTool> tools { get; set; } = new List<IEditorTool>();

protected override Task OnInitializedAsync()
{
    tools = EditorToolSets.All;
    tools.Add(new CustomTool("MyTool");
}
 
private void SwitchModel(MyMode mode)
{
    if (mode == MyMode.Full)
    {
        tools = EditorToolSets.All;
    }
   
    if (mode == MyMode.None)
    {
        tools = Clear;
    }
}
If I switch from MyMode.Full to MyMode.None, all tools disappers. But if I switched back, nothing happens. How can I get the tools back? :-)
Svetoslav Dimitrov
Telerik team
 answered on 17 Jan 2023
1 answer
161 views
Is it possible to use the DataSource library to create or update a record via an Odata Endpoint?
Any sample or example code?
Dimo
Telerik team
 answered on 16 Jan 2023
1 answer
130 views

Hi,

I have a TelerikEditor with additional custom tools:

In the razor-file:

<TelerikEditor @bind-Value="@myContent" Toosl="@tools">
    <EditorCustomTools> 
    @* Custom tools here *@
    </EditorCustomTools>
</TelerikEditor>

in the code behind file:


private List<IEditorTool> tools { get; set; } = new List<IEditorTool>();

protected override Task OnInitializedAsync()
{
    tools = EditorToolSets.All;
    tools.Add(new CustomTool("MyTools");
    return base.OnInitializedAsync();
}

At this point, all works as expected.

But when I navigate to another page in my wasm App and then navigate back to the page with the editor, the custom tools is renderd twice. If I navigate away and back to the page once more, the custom tool is now renderd three times. If I do it again: four times the custom tool ....

I tried:

tools = new();

as first line in OnInitializedAsync, but with the same result.

I think it is a rendering problem. I checked tools.Count at the beginning of OnInitializedAsync and it is alway 0.

Any suggestions? :-)

Svetoslav Dimitrov
Telerik team
 answered on 16 Jan 2023
0 answers
183 views

Hi,

I have set up my model the exact way it is in the demo. My client makes a JSON call to API to populate the scheduler. The post is successful but the get seems to break the scheduler. The error message is below:

Error: System.InvalidCastException: Unable to cast object of type 'System.String' to type 'System.Collections.Generic.IEnumerable`1[System.DateTime]'. at Telerik.Blazor.Components.TelerikScheduler`1.CreateAppointment(TItem dataItem) at Telerik.Blazor.Components.TelerikScheduler`1.ExpandAppointments() at Telerik.Blazor.Components.TelerikScheduler`1.ProcessAppointmentsAsync() at Telerik.Blazor.Components.TelerikScheduler`1.OnParametersSetAsync() at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)

 

unsure why I need to cast as the demo it seems to work fine without casting. Is this an issue within the UI control itself?

I'm using version 2.24.0

Thanks

Blair
Top achievements
Rank 1
 asked on 14 Jan 2023
1 answer
154 views

Say I have a report with 13 month column names.

Depending on the date range given to report the columns names could be different.

How do I build the resulting class to hold the data for the gird in this case?

 public class MgtRtp2Result
        {
            public string? TN { get; set; }
            public string? BAN { get; set; }
            public string? Platform { get; set; }

            [DisplayFormat(DataFormatString = "{0:C}")]
            public decimal Col1Amt { get; set; }

            [DisplayFormat(DataFormatString = "{0:C}")]
            public decimal Col2Amt { get; set; }

      }

Col1Amt name in the SQL result coming back could be May2022 for first run but Jun2022 for next run.

Same thing can happen Col2Amt.

Thanks for the help.

Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
 answered on 13 Jan 2023
1 answer
132 views

I am having an issue with this control.

When testing it I init it from the OnInitialized section and it worked fine.

But in production app It does not get init until after a DDL on the page is chosen from by user.

In this case I keep getting NO Data displayed on the drop down part.

Take the same code and put in the OnInitialized section and the controll is filled in.

How can I get it to work after the ddl is chosen?

 

Thanks

Deasun.

Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
 answered on 13 Jan 2023
1 answer
174 views

I have a SP I call that takes 1 or 2 minutes to run.

I am running into the error:

system threading taskcanceledexception a task was canceled

atm the SP takes 1:08 to run.

At 35 seconds, using filters to get less data back, it runs fine!

We have many reports that take a bit to run.

How to I get this task thing to stop killing my app.

 

Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
 answered on 13 Jan 2023
1 answer
87 views

I have a TelerikGrid with OnRead set with code that retrieves Paged data via an API.

I store the items + page number + total items etc so that when the user returns they see their previous search.

I tried using OnStateInit, but it only lets me set the page number - not the data items or total results.

 

Dimo
Telerik team
 answered on 13 Jan 2023
1 answer
300 views

Hello,
I would like to customize the filtering view window in Gantt. Is there a possibility to search for simple values using a text field?
In addition, I would also like to make changes to the labels (language: German).

The same applies to the event settings (double-click on events), where I would also like to change the language to German.

 

Many thanks in advance.

Hristian Stefanov
Telerik team
 answered on 13 Jan 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?