Telerik Forums
UI for Blazor Forum
1 answer
437 views

I have a grid:

 <TelerikGrid @ref="@gridHDR"
                             Data="@GDgridHDR"
                             AutoGenerateColumns="true"
                             Pageable="true"
                             Sortable="true"
                             Class="custom-row-colors"
                             FilterMode="@GridFilterMode.FilterRow">
                        <GridToolBarTemplate>
                                <GridCommandButton Command="ExcelExport" Icon="@FontIcon.FileExcel">Export to Excel</GridCommandButton>
                            <label class="k-checkbox-label"><TelerikCheckBox @bind-Value="@gridHDR_ExportAllPages" /> Export All Pages</label>
                            </GridToolBarTemplate>
                            <GridExport>
                            <GridExcelExport FileName="@msExportFileName" AllPages="@gridHDR_ExportAllPages" OnBeforeExport="@gridHDR_OnBeforeExcelExport" />
                            </GridExport>                        
                        </TelerikGrid>

It autogenerates the columns .

I have a need to hide one or more of the columns if the user checks off a checkbox on the UI.

So i would like to do something like:

Grid.Column[0].visible = False;

Is there a way to do this without me having to put in all the Column tags?

If I do have to add in the column tags can I only add in the ones that may be turned off/On or do I have to add in all the columns coming back?

Hopefully that makes some sense.

Thanks

Deasun

Dimo
Telerik team
 answered on 20 Feb 2023
1 answer
622 views

I would like to Tail-Truncate the Text in a Column to prevent having multiple lines in a row.

I tried the sample:

https://docs.telerik.com/blazor-ui/knowledge-base/grid-rows-text-ellipsis

But even the sample is not working. 

How is this fixed ?

Svetoslav Dimitrov
Telerik team
 answered on 17 Feb 2023
1 answer
128 views

How can I set a column header for my hierarchical data?

Also when there is no hierarchical data the “+” and the template should not be rendered.

Hope at least for some help on setting the header


 

Svetoslav Dimitrov
Telerik team
 answered on 17 Feb 2023
1 answer
252 views

when adding:

builder.Services.AddTelerikBlazor();

in step 4 of the 'Server-Side Blazor (Tutorial)' I'm getting this error:

IServiceCollection' does not contain a definition for 'Add Telerik Blazor' and no accessible extension method 'Add TelerikBlazor' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?)

 

Thanks in advance for assistance.

Svetoslav Dimitrov
Telerik team
 answered on 17 Feb 2023
1 answer
197 views

Here is the code that calls the dialog: 


        catch (Exception ex)
        {
            await Dialogs.AlertAsync(ex.Message, "Error!");
        }

David
Top achievements
Rank 3
Iron
Iron
Veteran
 answered on 16 Feb 2023
2 answers
560 views

I believe this broke with the 4.01 changes?

I can no longer drop a file on the upload button, it just does the default "open file with browser" action.

Rob
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 16 Feb 2023
0 answers
193 views

Application Insights is showing these exceptions and not sure what's the root cause and/or why these are being thrown.

Exception:

System.Threading.Tasks.TaskCanceledException:
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Threading.Tasks.ValueTask`1.get_Result (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.JSInterop.JSRuntime+<InvokeAsync>d__16`1.MoveNext (Microsoft.JSInterop, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Telerik.Blazor.Components.TelerikSwitch`1+<InitSwitch>d__53.MoveNext (Telerik.Blazor, Version=3.5.0.0, Culture=neutral, PublicKeyToken=20b4b0547069c4f8)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Telerik.Blazor.Components.TelerikSwitch`1+<OnAfterRender>d__51.MoveNext (Telerik.Blazor, Version=3.5.0.0, Culture=neutral, PublicKeyToken=20b4b0547069c4f8)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Threading.Tasks.Task+<>c.<ThrowAsync>b__127_0 (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously (Microsoft.AspNetCore.Components, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Threading.ExecutionContext.RunInternal (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground (Microsoft.AspNetCore.Components, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
Jerdobi
Top achievements
Rank 1
Iron
Iron
 asked on 16 Feb 2023
1 answer
299 views

I have an EditForm with some simple attributes that I would like to edit. The TelerikButtons, Abort and Save, are directly implemented and call the necessary business logic.

 

 

But now I would also like to implement the EditForm as a TelerikDialog popup to quickly record data. Sadly, the buttons are duplicated.
How should I go about not duplicating the functionality? Can I somehow move them or redirect the dialogbuttons to call them?



<TelerikDialog Visible="@IsAssetCreationVisible" ButtonsLayout="@DialogButtonsLayout.End" Width="30%">
    <DialogContent>
    <GameAssetCreatePage AssetType="AssetType.Text"></GameAssetCreatePage>

    </DialogContent>
    <DialogButtons>
        <TelerikButton>Abort</TelerikButton>
        <TelerikButton Id="@GameAssetCreatePage.EditFormId" 
                       ButtonType="ButtonType.Submit" 
                       ThemeColor="@ThemeColor.Primary">Save and Close</TelerikButton>
    </DialogButtons>
</TelerikDialog>

Hristian Stefanov
Telerik team
 answered on 15 Feb 2023
2 answers
213 views

After upgrading the grids tag = <GridToolBar> seems to have disappeared from the control.

Was it replaced by <GridToolBarTemplate>?

If so why doe I get a red error line under the tag when I rename the tag from the old to the new?

 

Tis at 4.0.1 now:

 

Svetoslav Dimitrov
Telerik team
 answered on 15 Feb 2023
1 answer
134 views

I have a requirement in my project to allow the editing of text files.

The editor doesn't need to be sophisticated, i.e. basic editing functionality, cutting-and-pasting lines, and search and replace text, where the search facility programmatically highlights all the text that can be replaced.

I have tried using the TelerikEditor, with mixed results.

I have made the <p> element behave as an inline element. This makes it look more like a text editor, but you have to hit return twice at the end of each line to start a new line. Also adding a new line after a highlighted word, the highlight "bleeds" across the lines. I suspect there will be other undesirable behaviour as I add functionality.

Is it possible to customise the TelerikEditor in a better way to get the behaviour I require?
Or is there a better component to use?

I notice Telerik advertise a "RichTextEditor", but I assume that is just another name for the Html Editor.

 

Stamo Gochev
Telerik team
 answered on 15 Feb 2023
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?