Telerik Forums
UI for Blazor Forum
1 answer
202 views

On the appointment edit dialog I would like to validate the Title field(see screenshot below) without having to do it in the OnCreateHandler or OnUpdateHandler.  I have tried validation in these events, but it closes the dialog and I have to re-enter the data once again.  I would like to not have to enter the data over again in case a title gets duplicated inadvertently. 

So my question is: is there a way to assign validation to the input fields?

 

Nadezhda Tacheva
Telerik team
 answered on 02 May 2023
1 answer
438 views

Hello,

both in the docs and demos, the text says (emphasis mine) "the ParentId field which points to the Id of the item that will contain the current item", yet the model shows the field as "public int? Parent { get; set; }" without the Id at the end? Seems like one or the other is wrong? Also I don't see any mention if the Id fields have to be specifically int, or if they could be string for.ex.?

Edit.: It actually seems that you can set the name of the ParentId Property, and that is done in the examples I linked. Still a bit confusing for people like me who don't read the whole thing.

Secondly, would be nice if I didn't have to "pollute" my models with the "HasChildren" property. The TreeView is obviously looking at some things in the data (for.ex. it's looking for the one item with null as Parent and if the HasChildren is true, it's looking for them) so would be great if it would look through the data and see if there are children for a given item automatically. Now it feels I have to tell it twice, first with the Id/ParentID properties and secondly with HasChildren.

Thirdly, currently the TreeView exposes the items that have been checked as the bindable CheckedItems collection. For this I think it would be easier if we could configure something like "my model has the boolean property ThisItemIsCheckedNow, use that as the checked indicator" and then, when checking items, that given property on the model would be true or false as the UI checkbox is checked/unchecked.

Dimo
Telerik team
 answered on 02 May 2023
1 answer
467 views

I would like to retrieve the width of the gris columns (to save it) and programmatically set it when needed.

I tried using gridref.GridColumns but I don't know how to retrieve gridcolumn object.

 

Dimo
Telerik team
 answered on 02 May 2023
2 answers
875 views

Hello,

How do I force user input to uppercase?

I have this mask:  Mask="00-LLLA00000000"

I want the LLL to always be uppercase.

When A is an alpha character, I want it to be uppercase as well.

Thanks,

TFISHER

Brett
Top achievements
Rank 1
Iron
 updated answer on 02 May 2023
0 answers
367 views

I am interested in replacing the predefined dialog function (Alert, Confirm, Prompt) with custom dialogs. I have the Alert working, but not sure how to setup a custom version of ConfirmAsync. I know I need to do an await in my custom routine, but how do I setup the async logic flow? Is an async version of the VisibleChanges event required? Is there are example you can point me to?

 

Thanks,

Bryan

 

 
Bryan
Top achievements
Rank 1
 asked on 28 Apr 2023
1 answer
135 views

I've created a sample REPL to demonstrate the issue:

https://blazorrepl.telerik.com/mHaSmsvW31IZ0rar47

In Grid.OnRead event handler, if you set args.Total to an amount > 559240, then the Grid will only scroll to 559240.  In my example, I used 1,000,000 for my virtual data source size.

Dimo
Telerik team
 answered on 28 Apr 2023
1 answer
378 views

When I export the gird I try to set the name of the file to be exported.

As such:

<GridExport>
<GridExcelExport FileName="@msExportFileName" AllPages="@Revenue_ExportAllPages" OnBeforeExport="@Revenue_OnBeforeExcelExport" />
</GridExport>

 string msExportFileName = "Rpt_";

 public void Revenue_OnBeforeExcelExport(GridBeforeExcelExportEventArgs args)
 {
 
    msExportFileName = "Rpt_ProductsCarriers_" + "Revenue";
 
 )

When it goes into the Revenue_OnBeforeExcelExport the file name works out to be: "Rpt_" only.

If I then click export again the file name = "Rpt_ProductsCarriers_Revenue"

How can I get the name the first time around to work?

Note! the "ProductsCarriers" is hardcode above but actually comes from a DDL object the user has already chosen before it gets to this point.

It can be different values depending on what the user chooses.

Even hardcoded , the first time in ignores that above code.  msExportFileName = "Rpt_ProductsCarriers_" + "Revenue";

Stepping thru it the code above seems to be working, but then the file name is "Rpt_" on first attempt.

Strange.

 

Thanks

Deasun.

 

Svetoslav Dimitrov
Telerik team
 answered on 28 Apr 2023
1 answer
434 views

We are currently updating our security, and need to tighten content security policy, blocking the use of script-src 'unsafe-eval' & style-src 'unsafe-inline'. We noticed that Telerik UI for Blazor will not work correctly when these policies are applied, as specified in the docs https://docs.telerik.com/blazor-ui/troubleshooting/csp.

It is mentioned that "Some of the above-listed limitations will be addressed in a future version of Telerik UI for Blazor." Is there a more specific timeline as to when this issue will be solved?

Dimo
Telerik team
 answered on 28 Apr 2023
1 answer
383 views
I've been weighing using the toolbar vs. the menu. I like that the menu allows for easy hierarchies, but the toolbar seems to be the way to go for including other elements like the checkbox. Any thoughts?
Dimo
Telerik team
 answered on 28 Apr 2023
1 answer
399 views

Hi,

I've got a pretty simple Context menu:

<TelerikContextMenu @ref="@TheContextMenu" Data="@MenuItems" OnClick="@( (ContextMenuItem itm) => ClickHandler(itm) )" DisabledField="Disabled" />

It contains one item that is a submenu of project names:

 


var mnuProjects = Projects.Select(x => new ContextMenuItem() { Text = x.Name, CommandName = "Project", Id = x.ID }).ToList();

MenuItems = new List<ContextMenuItem>()
{
	... other items
	
	new ContextMenuItem
	{
		Text = "Projects",
		HasChildren = true,
		Items = mnuProjects
	},

	... other items
};

The number of projects has now grown too long to display without going off the bottom of the page. 

Is there a quick way to set the height of the list that appears?

 

Dimo
Telerik team
 answered on 28 Apr 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?