I directly copy your example code from: https://demos.telerik.com/blazor-ui/grid/editing-incell into a server-side Blazor page using .Net Core 3 preview 5. Telerik UI for Blazor 0.5.0.
I run the app and the grid works perfectly apart from the "Add Employee" button. When I click it, it does nothing. No new blank row is added. Please note that the other grid command buttons work fine including "Delete" and "Edit".
Hi,
I'm trying to use the latest version (V1.1.0) of DropDownList with a GUID key, the original conversation is in this thread: https://www.telerik.com/forums/dropdownlist---run-code-when-select-item-changes.
My understanding is this should now work, but I'm having problems binding the current value. My code looks like this:
<TelerikDropDownList Data="@_viewItems" TValue="Guid"
TextField="Name"
ValueField="Id"
bind-Value="@CurrentViewId" PopupHeight="120" />
private List<NameAndId> _viewItems;
public class NameAndId
{
public string Name { get; }
public Guid Id { get; }
public NameAndId(string name, Guid id)
{
Name = name;
Id = id;
}
public override string ToString()
{
return Name;
}
}
private Guid CurrentViewId
{
get => _currentViewId;
set => _currentViewId = value;
}
This gives me the following compiler error:
Severity Code Description Project File Line Suppression State
Error The attribute names could not be inferred from bind attribute 'bind-Value'. Bind attributes should be of the form'bind', 'bind-value' or 'bind-value-change' TestApp C:\Source\TestApp.Blazor\TestApp.Blazor\Pages\View.razor 17
Error RZ9991 The attribute names could not be inferred from bind attribute 'bind-Value'. Bind attributes should be of the form'bind', 'bind-value' or 'bind-value-change' TestApp C:\Source\TestApp.Blazor\TestApp.Blazor\Pages\View.razor 17
Thanks,
Nick.
Hi - all of the dropdownlist code examples show data binding to lists of non-scalar types. I.e. lists of objects.
My question is, can your dropdownlist bind to lists of scalar types? I.e:
<TelerikDropDownList Data="@MyList" bind-Value=@MyItem />
@functions {
protected List<string> MyList() = new List<string>();
protected string MyItem;
}
If so, do I need to provide the ValueField and TextField properties?
I have a TelerikWindow containing a TelerikGrid, with EditMode="inline" and an "Add" TelerikGridCommandButton:
<TelerikWindow>
<TelerikWindowContent>
<TelerikGrid Data=@ScheduledJobs EditMode="inline">
<TelerikGridToolBar>
<TelerikGridCommandButton Command="Add" Icon="add"></TelerikGridCommandButton>
</TelerikGridToolBar>
<TelerikGridColumns>
<TelerikGridColumn Field=@nameof(ScheduledJob.DateTime) Title="Date" />
</TelerikGridColumns>
</TelerikGrid>
</TelerikWindowContent>
</TelerikWindow>
At run-time when I click the "Add" button in the grid I get the following error:
Microsoft.JSInterop.JSException: Could not find 'TelerikBlazorDateInput' in 'window'.
Error: Could not find 'TelerikBlazorDateInput' in 'window'.
at https://localhost:5000/_framework/blazor.server.js:8:20878
at Array.forEach (<anonymous>)
at d (https://localhost:5000/_framework/blazor.server.js:8:20839)
at https://localhost:5000/_framework/blazor.server.js:8:21429
at new Promise (<anonymous>)
at e.beginInvokeJSFromDotNet (https://localhost:5000/_framework/blazor.server.js:8:21403)
at https://localhost:5000/_framework/blazor.server.js:1:16653
at Array.forEach (<anonymous>)
at e.invokeClientMethod (https://localhost:5000/_framework/blazor.server.js:1:16624)
at e.processIncomingData (https://localhost:5000/_framework/blazor.server.js:1:14624)
at async void Telerik.Blazor.Components.DateInput.TelerikDateInputBase.OnAfterRender()
at void System.Threading.Tasks.Task.ThrowAsync(Exception exception, SynchronizationContext targetContext)+(object state) => { }
at void Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource<object> completion, SendOrPostCallback d, object state)
at void Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecutionContextThunk(object state)
at void Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)
If I change the data type of the column from DateTime to string, this error goes away.
Please assist?
Regarding https://docs.telerik.com/blazor-ui/common-features/dimensions in server-side Blazor.
"dimensions and positions are simple string properties that are not parsed by our code. You can provide valid CSS values to them. For example, 100px or 50%are valid options"
However when I use: Height="100px" or Height="100%" in many controls, including TelerikWindow and TelerikGrid, I get compile errors:
The name 'px' does not exist in the current context
and
Invalid expression term ')'
If I just use Height="100" then the Blazor app runs although I am still not sure the Height property is working properly.
Can you please confirm how this is supposed to work?
Do you have any examples yet on updating all clients from any of your controls?
Grid changes for example to update every connected client?
Dear Telerik,
the Gridfilter is working fine.
Just one small problem.
When there are many columns (in my case 12), the filter input textfield is too big for the column (see screenshot).
The filterbutton is not visible. You have to scroll to see it.
Is it possible to adjust the length of the input-field and fontsize of the different griditems ?
What do you recommend to solve this ?
Regards,
Gert
Is it possible to build something using the Modal window perhaps where I could build a custom popup editor?
I have a complex edit form with quite a few fields and dynamic behavior (fields hidden based on selection values). It looks like I could implement this with the form editor, I was wondering if I could do something with a popup to avoid a lot of scrolling that is required with the form editor solution.
Thanks,
Kenny
Dear Telerik,
thank you for the wonderful Blazor controls.
I have a question about the Tab-Control.
I need to know the active tab in the code behind.
I tried to acces the Title-property in the 'Telerik.Blazor.Components.TabStrip.TelerikTabStrip' - REF.
But the Title-propery in de ActiveTab class is private and thus not accesible.
Is there a way to know the active Tab in de code behind ?
Regards,
Gert