Not finding any examples or similar, so I wanted to see if there is a way to include a Gantt Chart into a WordsProcessing document. I am currently bringing the data into a table, but my end-user has requested to see the chart view of the same data.
if (JobMilestones.Count > 0) { editor.InsertText("MILESTONES").FontWeight = FontWeights.Bold; Table tblMilestone = editor.InsertTable(JobMilestones.Count + 1, 3); tblMilestone.PreferredWidth = new TableWidthUnit(720); Paragraph p = tblMilestone.Rows[0].Cells[0].Blocks.AddParagraph(); tblMilestone.Rows[0].RepeatOnEveryPage = true; tblMilestone.Rows[0].Cells[0].Borders = tcb; tblMilestone.Rows[0].Cells[1].Borders = tcb; tblMilestone.Rows[0].Cells[2].Borders = tcb; editor.MoveToParagraphStart(p); editor.InsertText("Task").FontWeight = FontWeights.Bold; p = tblMilestone.Rows[0].Cells[1].Blocks.AddParagraph(); editor.MoveToParagraphStart(p); editor.InsertText("Start").FontWeight = FontWeights.Bold; p = tblMilestone.Rows[0].Cells[2].Blocks.AddParagraph(); editor.MoveToParagraphStart(p); editor.InsertText("End").FontWeight = FontWeights.Bold; int x = 1; foreach (FlatModel fm in JobMilestones) { p = tblMilestone.Rows[x].Cells[0].Blocks.AddParagraph(); editor.MoveToParagraphStart(p); editor.InsertText(fm.TaskTitle); p = tblMilestone.Rows[x].Cells[1].Blocks.AddParagraph(); editor.MoveToParagraphStart(p); editor.InsertText(fm.StartDate.ToShortDateString()); p = tblMilestone.Rows[x].Cells[2].Blocks.AddParagraph(); editor.MoveToParagraphStart(p); editor.InsertText(fm.EndDate.ToShortDateString()); tblMilestone.Rows[x].Cells[0].Borders = tcb; tblMilestone.Rows[x].Cells[1].Borders = tcb; tblMilestone.Rows[x].Cells[2].Borders = tcb; x += 1; } editor.MoveToTableEnd(tblMilestone); //editor.InsertLine(""); editor.InsertBreak(BreakType.LineBreak); }
With an item selected, I want to reset the drop down list to the state it has when the page loads, i.e. populated with nothing selected.
Setting the backing filed to zero does not work. I have read Clear the selection, I know it works if you have a default text,
I dont't want to have a default text.
As you can see in the repl, there's some more experiments, since I thought I could maybe clear the content and re-populate
the list to reset it.
Setting the data source to null does nothing?!?!
Clearing the data source removes the items in it, but keeps the selected value!?!?
I've seen answers to this question that suggests using CSS to achieve this, but that's just stupid and shouldn't be necessary.
Finally, we have the hack solution, which is totally crazy but seems to work.
I leave it here for others to see, since it seems a lot of people also have this problem.
Please fix this.
I have a telerikdropdownlist in the EditorTemplate of a Grid. If a user uses the keyboard to speed the navigation of the dropdown (for example: they type a T to immediately scroll to the T section), then clicks on a selection further down in the list, the selected item becomes the item navigated to via the Keyboard, not the item that is actually clicked on. Clicking on an item (without using the keyboard navigation first) works as expected. I was able to replicate this behavior in REPL using the following code:
<br />
<br />
<TelerikDropDownList
Data = "@People"
@bind-Value="@SelectedUser"
TextField="LastFirst"
ValueField="Id"
Width="400px"
/>
<br />
<br />
<TelerikGrid
Data="@Assets"
EditMode="GridEditMode.Inline"
Width="800px"
OnUpdate="@Update"
>
<GridColumns>
<GridColumn Field="@nameof(Asset.AssetId)" Title="ID" Width="50px"/>
<GridColumn Field="@nameof(Asset.BarCode)" Title="BarCode" Width="125px"/>
<GridColumn Field="@nameof(Asset.UserId)" Title="User" Width="125px">
<Template>
@{
CurrentAsset = (Asset)context;
Person? p = People.FirstOrDefault<Person>(x => x.Id == CurrentAsset.UserId);
if(p != null)
{
<span>@p.LastFirst</span>
}
}
</Template>
<EditorTemplate>
@{
CurrentAsset = (Asset)context;
<TelerikDropDownList
Data = "@People"
@bind-Value="@CurrentAsset.UserId"
TextField="LastFirst"
ValueField="Id"
/>
}
</EditorTemplate>
</GridColumn>
<GridCommandColumn Width="100px" Locked="true">
<GridCommandButton Command="Save" Icon="save" ShowInEdit="true"></GridCommandButton>
<GridCommandButton Command="Edit" Icon="edit"></GridCommandButton>
<GridCommandButton Command="Delete" Icon="delete"></GridCommandButton>
<GridCommandButton Command="Cancel" Icon="cancel" ShowInEdit="true"></GridCommandButton>
</GridCommandColumn>
</GridColumns>
</TelerikGrid>
<br />
@code {
public List<Person> People = new();
public List<Asset> Assets = new();
int SelectedUser = 0;
Asset CurrentAsset = new();
protected override void OnInitialized()
{
LoadData();
base.OnInitialized();
}
public void LoadData()
{
People.Add(new Person(1, "Brent", "Tuominen"));
People.Add(new Person(2, "Tina", "Tuominen"));
People.Add(new Person(3, "Casey", "Tuominen"));
People.Add(new Person(4, "Ryan", "Tuominen"));
People.Add(new Person(5, "Alex", "Tuominen"));
Assets.Add(new Asset(1, "BC001"));
Assets.Add(new Asset(2, "BC002"));
Assets.Add(new Asset(3, "BC003"));
Assets.Add(new Asset(4, "BC004"));
Assets.Add(new Asset(5, "BC005"));
}
public void Update(GridCommandEventArgs args)
{
Asset a = (Asset)args.Item;
Asset? asst = Assets.FirstOrDefault(x => x.AssetId == a.AssetId);
if(asst != null)
{
asst.BarCode = a.BarCode;
asst.UserId = a.UserId;
}
StateHasChanged();
}
public class Asset
{
public Asset()
{
}
public Asset(int assetId, string barcode)
{
AssetId = assetId;
BarCode = barcode;
}
public int AssetId{ get; set; }
public string BarCode { get; set; } = string.Empty;
public int? UserId{ get; set; }
}
public class Person
{
public Person(int id, string fName, string lName)
{
Id = id;
FirstName = fName;
LastName = lName;
}
public int Id{ get; set; }
public string FirstName { get; set; } = string.Empty;
public string LastName { get; set; } = string.Empty;
public string LastFirst
{
get
{
return LastName + ", " + FirstName;
}
}
public string FullName
{
get
{
return FirstName + " " + LastName;
}
}
}
}
My team is currently using animation containers as menu popups in our web app, which will need to work on both desktop and mobile devices in a web browser. For the mobile layout, I would like to be able to open animation containers via swipe gestures. I understand that animation containers are not strictly menus, however, I would love to see swipe action support in Telerik UI for Blazor, and then be able to bind that action to an animation container.
The only framework I have found by way of example is https://onsen.io/. Please observe how it is possible to open a panel by swiping close to the edge of the sample device on their homepage.
This feature would make it much easier to build dynamic web apps that perform well on desktop and feel native on mobile devices as well.
Thank you,
David
We have a grid with the standard numeric filter menu.
When we copy a numeric value from Excel or from somewhere else and paste it into the field it is not copied.
This also happens with the demo on https://demos.telerik.com/blazor-ui/grid/filter-menu
It does not work since the 3.3.0 version.
Looks like the filter row has the same problem.
Hi I have noticed that if the dropdown for an enum cannot wordwrap the item then the styling is broken, see the following the screenshot:
As you can see IN_PROGRESS is so long that it exceeds the column width and creates empty space above.
To me it appears as though an attempt to try to wordwrap the IN_PROGRESS but IN_PROGRESS has no applicable breaks in it.
Thanks,
Daniel
In the example below, the home icon is displayed correctly but the two with underscores are not. Moving the span outside the drawer does display correctly.
<TelerikRootComponent>
<TelerikDrawer Data="@NavigablePages"
@bind-Expanded="@DrawerExpanded"
MiniMode="true"
Mode="@DrawerMode.Push"
@ref="@DrawerRef"
@bind-SelectedItem="@SelectedItem">
<Template>
<div class="k-drawer-items">
<ul>
<li class="k-drawer-item" style="white-space:nowrap">
<span class="k-icon material-icons" style="margin-right: 8px;">home</span>
@if (DrawerExpanded)
{
<span class="k-item-text">Home</span>
}
</li>
<li class="k-drawer-item" style="white-space:nowrap">
<span class="k-icon material-icons" style="margin-right: 8px;">shopping_cart</span>
@if (DrawerExpanded)
{
<span class="k-item-text">Shopping Cart</span>
}
</li>
<li class="k-drawer-item" style="white-space:nowrap">
<span class="k-icon material-icons" style="margin-right: 8px;">content_paste_search</span>
@if (DrawerExpanded)
{
<span class="k-item-text">Clipboard</span>
}
</li>
</ul>
</div>
</Template>
<DrawerContent>
<div class="content px-4">
@Body
</div>
</div>
</DrawerContent>
</TelerikDrawer>
</TelerikRootComponent>
Pretty simple. With each release the product examples in the Github repo should be updated.
For example, I am looking at the drawer -> sidenav example. Before I can even run the example, I now need to go through all the code to make the updates from 2.14.1 to 3.4.0. Some of the changes that I have to make are:
I should not have to make these updates to look at an example, especially when it is referenced from a forum posting.
I should just be able to compile and run the example.
Current implementation of Theme Color is annoying.
I recommend:
I have found an issue with editing currency values.
Steps to reproduce:
1. Fill up a value 56.55
2. Try to click between 55
3. Cursor is at the end
The same issue about clicking between 56, the cursor will be before the dot.
As an extension to a context menu a radial menu control would be a nice addition.
https://ux.stackexchange.com/questions/25002/are-circular-menu-button-interfaces-intuitive
Hello.
I have a scenario where I need to make some nodes in a TreeView checkable and some not. It would be nice if there was an "IsCheckable" binding that determines whether a node should render a checkbox or not.
Although I've no use for it yet, the same could be done for "IsSelectable".
Is there some way to do this already, and I'm just not seeing it? I'd prefer not to use JavaScript interop, or recreate the checkbox functionality through an ItemTemplate.