Telerik Forums
UI for ASP.NET Core Forum
3 answers
1.8K+ views

Hi,

I have some values that are DateTimeOffsets. I'm having trouble formatting them in a grid though.

This code:

columns.Bound(c => c.StartTimestamp).Width(750).Format("{0:dd/MM/yyyy HH:mm:ss}");

produces:

2019-06-06T17:47:52.0256922+01:00

when what I want to see is:

06/06/2019 17:47:52

Is the Grid unable to format DateTimeOffsets, or am I missing something?

Thanks,

Gary

Alex Hajigeorgieva
Telerik team
 answered on 30 Dec 2019
3 answers
913 views
I am having an issue with my menu control.  I am trying to get the last item to float right.  I found a post that seem to be related to what I am trying to do but it is from 2013 and for JQuery. Also the solution does not seem to work for me.
https://www.telerik.com/forums/moving-the-right-most-menu-all-the-way-to-the-right-or

Using css and seting #menuName > .k-last honors all aspects (border, font, color..) but the float:right.  Is it something simple I am missing here?
Rick
Top achievements
Rank 1
 answered on 27 Dec 2019
4 answers
183 views

Hi,

I have 4 columns (Round1, Round2, Round3, Total) of which Total is a non editable int column.Whenever user updates Round1, 2 and 3 by clicking Update.. The total is saved in the database using Employee_Update action and my hope is that Total column will automatically refresh.  But thats not happening. Only Round1, 2 and 3 refresh.

 

Here is my grid

@(Html.Kendo().Grid<EmployeeManagement.Models.Employee>()
                    .Name("EmployeeGrid")
                    .Columns(columns =>
                    {

                        columns.Bound(p => p.EmployeeID);
                        columns.Bound(p => p.Round1);
                        columns.Bound(p => p.Round2);
                        columns.Bound(p => p.Round3);
                        columns.Bound(p => p.Total).Width(100);
                        columns.Command(command => { command.Edit(); }).Width(250);
                    })
                    .Editable(editable => editable.Mode(GridEditMode.InLine))
                    .Pageable(a => a.PageSizes(new int[] { 50, 100 }))
                    .Sortable()
                    .Scrollable()
                    .HtmlAttributes(new { style = "height:700px;" })
                    .Events(events => { events.Save("updateTotal"); }
                    )
                .DataSource(dataSource => dataSource
                .Ajax()
                .PageSize(100)
                .Model(model =>
                {
                    model.Id(p => p.EmployeeID);
                    model.Field(p => p.Total).Editable(false);
                })

                .Update(update => update.Action("Employee_Update", "Admin"))

        )
    )

 

<script>

function updateTotal(e) {

        var totalCount = 0;
        if (e.model.Round1 !== null)
            totalCount += 1;
        if (e.model.Round2 !== null)
            totalCount += 1;
        if (e.model.Round3 !== null)
            totalCount += 1;
        
        // totalCount has correct total

e.model.set('Total', totalCount); // Doesnt refresh

e.container.parents('tr').find('td:eq(4)').html(totalCount); // Doesnt refresh

        e.container[0].children[4].innerText = totalCount; // Doesnt refresh

    }

</script>

 

There are no developer tools console errors.

StuartLittle
Top achievements
Rank 1
 answered on 27 Dec 2019
3 answers
680 views

can someone supply a complete set of instructions on how to apply the all.css and variables.scss files downloaded from the SASS Themebuilder to my .Net Core project

There seems to be no documentation regarding this for telerik ui for asp.net core

thanks

 

Jim

Preslav
Telerik team
 answered on 26 Dec 2019
1 answer
163 views

I have a grid with 2 numeric columns. One of the column has to have a maximum of 5 decimals while the other should display all the decimals it has. The configuration is like this:

columns.Bound(m => m.Numeric1).Format("{0:#.#####}");
columns.Bound(m => m.Numeric2);

However when I tried to view the values in the culture "de-DE" for example for the first column it uses the correct decimal separator "," but for the second column it still display the decimal separator ".".

Is the format of numeric values mandatory when using i18n ? What is the format for numeric with all the decimals?

Tsvetomir
Telerik team
 answered on 24 Dec 2019
2 answers
263 views

my excel file is uploaded in to azure blob storage ,now I want to load this file using telerik Workbook 

from my local path its loaded successfully but from azure its give me  this error " System.InvalidOperationException"

Mahesh
Top achievements
Rank 1
 answered on 24 Dec 2019
2 answers
148 views

I would like to display a simple inline grid but for some reason the view is not able to display the data sent by controller.

public class Employee
    {
        public int EmployeeID { get; set; }
        public string Name { get; set; }
        public string NetworkID { get; set; }
        public DateTime SeniorityDate { get; set; }
        public string Shift { get; set; }
    }

public ActionResult Employees_Read([DataSourceRequest] DataSourceRequest request)
        {
            var employeeList = new List<Employee>()
            {
                new Employee
                {
                    EmployeeID = 1,
                    Name = "Bill",
                    NetworkID = "123",
                    SeniorityDate = DateTime.Now,
                    Shift = "Day"
                },
                new Employee
                {
                    EmployeeID = 2,
                    Name = "Gates",
                    NetworkID = "456",
                    SeniorityDate = DateTime.Now,
                    Shift = "Day"
                }
            };

            IQueryable<Employee> employees = employeeList.AsQueryable();
            DataSourceResult result = employees.ToDataSourceResult(request);
            return Json(result);
        }

 

 

@(Html.Kendo().Grid<EmployeeManagement.Models.Employee>()
        .Name("grid")
        .Columns(columns =>
        {
            columns.Bound(p => p.Name).Width(300);
            columns.Bound(p => p.NetworkID).Width(100);
            columns.Bound(p => p.SeniorityDate).Width(200);
            columns.Bound(p => p.Shift).Width(100);
            columns.Command(command => { command.Edit(); command.Destroy(); }).Width(300);
        })
        .ToolBar(toolbar => toolbar.Create())
        .Editable(editable => editable.Mode(GridEditMode.InLine))
        .Pageable()
        .Sortable()
        .Scrollable()
        .HtmlAttributes(new { style = "height:430px;" })
        .DataSource(dataSource => dataSource
            .Ajax()
            .PageSize(20)
            .Model(model => model.Id(p => p.EmployeeID))
            .Read(read => read.Action("Employees_Read", "Admin"))

        )
    )

There are no errors in Developer tools console.

In the network tab, I see the response.

Please let me know if I am missing anything?

Thank you

Aleksandar
Telerik team
 answered on 23 Dec 2019
1 answer
322 views

Our current kendo-grid spinner is... not easy on the eyes.  I would like to use SpinKit instead (SpinKit is an extremely popular, simple CSS-based spinner library, available on GitHub with over 16.5k stars https://github.com/tobiasahlin/SpinKit).  Specifically, this one below taken from the SpinKit demo page (https://tobiasahlin.com/spinkit/ - it's the fourth one in the carousel) : 

 

<div class="spinner">
  <div class="rect1"></div>
  <div class="rect2"></div>
  <div class="rect3"></div>
  <div class="rect4"></div>
  <div class="rect5"></div>
</div>

 

With the following css:

 

.spinner {
  margin: 100px auto;
  width: 50px;
  height: 40px;
  text-align: center;
  font-size: 10px;
}

.spinner > div {
  background-color: #333;
  height: 100%;
  width: 6px;
  display: inline-block;
  
  -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;
  animation: sk-stretchdelay 1.2s infinite ease-in-out;
}

.spinner .rect2 {
  -webkit-animation-delay: -1.1s;
  animation-delay: -1.1s;
}

.spinner .rect3 {
  -webkit-animation-delay: -1.0s;
  animation-delay: -1.0s;
}

.spinner .rect4 {
  -webkit-animation-delay: -0.9s;
  animation-delay: -0.9s;
}

.spinner .rect5 {
  -webkit-animation-delay: -0.8s;
  animation-delay: -0.8s;
}

@-webkit-keyframes sk-stretchdelay {
  0%, 40%, 100% { -webkit-transform: scaleY(0.4) }  
  20% { -webkit-transform: scaleY(1.0) }
}

@keyframes sk-stretchdelay {
  0%, 40%, 100% { 
    transform: scaleY(0.4);
    -webkit-transform: scaleY(0.4);
  }  20% { 
    transform: scaleY(1.0);
    -webkit-transform: scaleY(1.0);
  }
}

Preslav
Telerik team
 answered on 23 Dec 2019
26 answers
854 views

With this well underway now when might we see some versions that work with the 3.0 preview? Thinking mainly of the grid and, not for this forum, the reporting functionality.

Thanks,

Scott

Denitsa
Telerik team
 answered on 20 Dec 2019
1 answer
373 views

I have created a ClientDetails template so that I can edit a grid row in a 'form style' with tabs. I would like to put a command button on the template so that I can save the changes in the same way that I get an Update button with inline editing. I would like to know the best way of doing this. Does any one know of an example demo/code for doing that would set me in the right direction.

Nikolay
Telerik team
 answered on 20 Dec 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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?