Telerik Forums
UI for ASP.NET Core Forum
3 answers
251 views

Hi I am using the grid in asp.net core 2.1 excellent product by the way however i am having an issue its the inline popup is display more fields than i have defined in my grid layout for example

In my grid I would be expecting just the five columns here but its displaying the entire model in the popup. Also how does one use dapper for the crud operations is that possible as I am using stored procs to keep my site fast and clean to acehieve this.

 

Also how do i color the command buttons is that simple enough?

 

columns.Bound(p => p.Name).Filterable(false);
                        columns.Bound(p => p.Description);
                        columns.Bound(p => p.ActivityDate).Format("{0:MM/dd/yyyy}");
                        columns.Bound(p => p.EmployeeName);
                        columns.Bound(p => p.Status);

@(Html.Kendo().Grid<FuelActivityTrackerDal.Models.ActivityHeader>()
                    .Name("grid")
                    .Columns(columns =>
                    {
                        columns.Bound(p => p.Name).Filterable(false);
                        columns.Bound(p => p.Description);
                        columns.Bound(p => p.ActivityDate).Format("{0:MM/dd/yyyy}");
                        columns.Bound(p => p.EmployeeName);
                        columns.Bound(p => p.Status);
                        columns.Command(command => { command.Edit(); command.Destroy(); }).Width(160);
 
                    })
                       .ToolBar(toolbar => toolbar.Create())
    .Editable(editable => editable.Mode(GridEditMode.PopUp))
                    .Pageable()
                    .Sortable()
                    .Scrollable()
                    .Filterable()
                    .HtmlAttributes(new { style = "height:550px;" })
                    .DataSource(dataSource => dataSource
                        .Ajax()
                        .PageSize(Model.Count())
                        .Read(read => read.Action("Activity_Read", "Activity"))
                    )
)
 
 
<script type="text/javascript">
    function error_handler(e) {
        if (e.errors) {
            var message = "Errors:\n";
            $.each(e.errors, function (key, value) {
                if ('errors' in value) {
                    $.each(value.errors, function () {
                        message += this + "\n";
                    });
                }
            });
            alert(message);
        }
    }
</script>
Tsvetomir
Telerik team
 answered on 21 Feb 2019
1 answer
97 views

I have a webpage built on Telerik controls. I am trying to show the page in the winforms application using web browser.

I face few issues when loading the page for first time.

RadTreeview is visible with the Parent Node details and they are visible like unordered list instead of + symbol. No action could be performed.

When i do a refresh on the screen i was able to perform the actions (expand,select,etc). I am facing this issue only with the first load of the webpage in web browser.

Could you please help me on how to solve this issue?

Regards,

Supriya.

Ivan Danchev
Telerik team
 answered on 20 Feb 2019
1 answer
202 views

Hello,

Can someone please shed some light on why this is not outputting a group header total?

<column field="regularHours" title="Regular Hours"

                        template="<div style='text-align: right'>#= kendo.toString(regularHours, '0.00') #</div>"
                        group-header-template="<div style='text-align: right'> Total: #= kendo.toString(sum, '0.00') #</div>"
                        footer-template="<div>Total: #= kendo.toString(sum, '0.00') #<div>">

</column>

Both the template and the footer-template are working but I have nothing showing for the group-header-template in my grid.

Any help appreciated,

 

Georgi
Telerik team
 answered on 19 Feb 2019
5 answers
365 views
The input field generated by DatePicker is of type text. Hence, when I serialize the form in which the input is contained into json, the date is not properly formatted. Especially as the culture of the browser can be anything while the rest service the form is posted to expect a culture-invariant date. The same is true with NumerictextBox by the way.
Viktor Tachev
Telerik team
 answered on 19 Feb 2019
1 answer
191 views

I need to manage group membership.  I'll select the group then I'll need a grid on the left that represents all people currently in the group.  I then need a grid on the right representing all people available that are not in the group.  In this middle, I need an Add and Remove button.  The add button shouldn't be enabled unless the grid on the right has focus and a user is selected.  The remove button should not be enabled unless the left grid has focus and a user is selected.  

If you have an example of this type of functionality, can you please post a link.  If not, some feedback on how I would go about this using a ASP.NET Core 2.2 components would be appreciated.

Viktor Tachev
Telerik team
 answered on 19 Feb 2019
1 answer
212 views

Hi,

I am looking for a way where in I can achieve the following.

1. Load tree with nodes and some nodes selected and expanded. (Typically a edit screen where in some nodes are selected and saved to database)

2. I would like to Bind custom properties as well.

 

For achieving 1 I used .ItemDataBound event. But for 2 I can use DataSource. If I use datasource I can bind custom properties but not able to set Expanded, Selected, Checked properties.

 

Is there a way I can achieve both? or I am making some mistakes in my approach.

Ultimately I need to be able to retrieve all the selected nodes. Please guide me to links/examples/posts if you have any.

 

Veselin Tsvetanov
Telerik team
 answered on 19 Feb 2019
1 answer
148 views

I have a request to add and remove some fields in the appointment details. Can I do that? How can I achieve this? I'm attaching a print screen of what I'm trying to customize.

Thank you.

Dimitar
Telerik team
 answered on 18 Feb 2019
4 answers
77 views

I'm using the "Basic usage" spreadsheet example as the start to my code. When I set .Sheetsbar(false) the scroll bars are disabled. I would like to hide the sheetsbar but keep the scroll bars enabled. How is this done?

Mark
Top achievements
Rank 1
 answered on 15 Feb 2019
1 answer
219 views

I've created a spreadsheet in a View that is somewhat complex. The first 10 rows are frozen and function as an informational header to the data which is in rows 11 and greater. The header has merged cells and labels for data. For example, it's a time card spreadsheet and row 1 has just the employee name with the label for the name just to the left of it. I am assuming I can't use a datasource because the spreadsheet is not a simple column/row display of data. What is the best practice to load a spreadsheet like this with data read from the database?

Marin Bratanov
Telerik team
 answered on 15 Feb 2019
1 answer
150 views

I use Entity Framework Core 2.2.  It does me a solid by constructing the entire hierarchy from the database without me asking it to.  That said, your TreeList actually binds to a Flat structure.  Your model definition then defines how the hierarchy is built.

Do you have an example of how you use EF with your TreeList?  Do you have tools or a method that I could use to convert what I get from EF over to what your control needs?

I have a self-referencing Group table:

  • Id
  • ParentId
  • Name
  • Description

ParentId references Id

@(Html.Kendo().TreeList<GsiPortal.Models.Group>()
    .Name("treelist")
    .Columns(columns =>
    {
        columns.Add().Command(c => { c.Custom().Text("Details").Name("detailButton").Click("toDetails"); }).Width(120);
        columns.Add().Field(e => e.Name).Width(220).TemplateId("icon-template");
        columns.Add().Field(e => e.Description).Width(220);
        columns.Add().Command(c => { c.Custom().Text("Create").Name("createButton").Click("toCreate"); }).Width(120);
    })
    .Selectable(selectable => selectable.Mode(TreeListSelectionMode.Single))
    .DataSource(dataSource => dataSource
        .ServerOperation(false)
        .Read(read => read.Action("IndexJson", "Groups").Data("readParams"))
        .Model(m =>
        {
            m.Id(f => f.Id);
            m.ParentId(f => f.ParentId);
            m.Expanded(true);
            m.Field(f => f.Name);
            m.Field(f => f.Description);
        }
    )
    .Events(events =>
    {
        events.Error("onError");
    })
    ))
 
    <script>
        var groupId = Number(@(ViewBag.GroupId));
 
        function readParams() {
            return { id: groupId };
        }
 
        function toDetails(e) {
            e.preventDefault();
            var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
 
            if (dataItem != null) {
                window.location.href = '@Url.Action("Details", "Groups")/' + dataItem.Id;
            }
        }
 
        function toCreate(e) {
            e.preventDefault();
            var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
 
            if (dataItem != null) {
                window.location.href = '@Url.Action("Create", "Groups")/?parentId=' + dataItem.Id;
            }
        }
 
        function onError(e) {
            alert(e.toString());
        }
 
 
    </script>
Preslav
Telerik team
 answered on 15 Feb 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?