Telerik Forums
UI for ASP.NET Core Forum
1 answer
214 views
What Telerik Nuget source do I pull down in order to use the PDF Viewer?  I have not found this information anywhere in the documentation.
Martin
Telerik team
 answered on 04 Feb 2021
2 answers
206 views

Hello,

Can you help me and tell if its possible to "export" Kendo .NET Core Chart  to image and save it as a stream so I can process it further ? for example add it to the PDF page in Kendo Document Processing Library

So far I have been using WIndows.Forms.DataVisualization in my .NET Framework project but since we moved to .NET Core and we cant use  ported version due to .NET Standard dependencies (https://www.nuget.org/packages/System.Windows.Forms.DataVisualization/), I dont know what we can do now.

Is there any other option... ? I just want to add a chart to a dynamically created PDF in C#

Georgi Denchev
Telerik team
 answered on 02 Feb 2021
8 answers
752 views

I have like 17 grids on templates that display and service the CMS portion of a site.  Until I noticed today, all grids were functioning fine for display and crud operations.  Now the grids do not show the data.

I can put a breakpoint at the end of the read function and see that the data is there.

IQueryable<Product> res = viewModel.Products.AsQueryable<Product>();
DataSourceResult data = res.ToDataSourceResult(request);           
JsonResult result = Json(data);
 return Json(data);

 

So as the Read functions exit they have their data but the grids do not display anything!  I have been working in an entirely different area on the retail part of the site over the last few days that has nothing to do with Telerik and have not changed any of the code on that controller or associated views that have to do with the CMS portion.  I am completely stumped on this one

Any suggestions would greatly help.  This is an important issue that has the CMS side of the site down.

Thanks

 

 

 

 

 

s_guryev
Top achievements
Rank 1
 answered on 30 Jan 2021
4 answers
371 views

I've been following the sample posted here https://docs.telerik.com/aspnet-core/html-helpers/data-management/grid/templates/editor-templates for creating a drop down list editor for the grid.

Initially the column will display fine, but as soon as I try to make the grid editable the entire grid breaks and displays nothing, not even an error message or anything.

@(Html.Kendo().Grid<TestTelerikGrid.Models.ActualExpenditureDto>()
              .Name("grid")
              .Columns(columns =>
              {
                  columns.Bound(c => c.Quantity);
                  columns.Bound(c => c.RawCostRate);
                  columns.Bound(c => c.ExpenditureTypeOption).ClientTemplate("#=ExpenditureTypeOption.Name#").Sortable(false).Width(180);
              })
              .Editable(editable => editable.Mode(GridEditMode.InCell))
              .Sortable()
              .Filterable()
              .DataSource(dataSource => dataSource
                  .Ajax()
                  .Sort(sort => sort.Add("Id").Ascending())
                  .ServerOperation(false)
                  .Batch(true)
                  .Model(model =>
                  {
                      model.Id(r => r.Id);
                  })
                  .Read(read => read.Action("Expenditure_Read", "Home"))
                )
)

 

public class ActualExpenditureDto
{
    public int Id { get; set; }
    [Display(Name = "Quantity")]
    public string Quantity { get; set; }
    [Display(Name = "Raw Cost Rate")]
    public string RawCostRate { get; set; }
    [UIHint("ExpenditureTypeEditor")]
    [Display(Name = "Expenditure Type")]
    public ExpenditureTypeModel ExpenditureTypeOption { get; set; }
 
}

 

public class ExpenditureTypeModel
{
    public int Id { get; set; }
    public string Name { get; set; }
}

 

Controller:

public IActionResult Index()
{
    ViewData["lookupExpenditureType"] = GetExpenditureTypes();
 
    return View();
}
 
public ActionResult Expenditure_Read([DataSourceRequest] DataSourceRequest request)
{
    List<ActualExpenditureDto> dtos = new List<ActualExpenditureDto>();
 
    ActualExpenditureDto dto = new ActualExpenditureDto();
    dto.Id = 1;
    dto.Quantity = "3";
    dto.RawCostRate = "7";
    dto.ExpenditureTypeOption = GetExpenditureTypes().First();
    dtos.Add(dto);
 
    dto = new ActualExpenditureDto();
    dto.Id = 1;
    dto.Quantity = "55";
    dto.RawCostRate = "98";
    dto.ExpenditureTypeOption = GetExpenditureTypes().Last();
    dtos.Add(dto);
 
    var toReturn = Json(dtos.ToDataSourceResult(request));
    return toReturn;
}
 
private List<ExpenditureTypeModel> GetExpenditureTypes()
{
    List<ExpenditureTypeModel> expTypes = new List<ExpenditureTypeModel>();
    ExpenditureTypeModel typ = new ExpenditureTypeModel();
    typ.Id = 1;
    typ.Name = "Type 1";
    expTypes.Add(typ);
 
    typ = new ExpenditureTypeModel();
    typ.Id = 2;
    typ.Name = "Type 2";
    expTypes.Add(typ);
 
    return expTypes;
}

 

ExpenditureTypeEditor.cshtml

@using Kendo.Mvc.UI;
 
@(Html.Kendo().DropDownList()
        .Name("ExpenditureTypeOption")
        .DataValueField("Id")
        .DataTextField("Name")
        .BindTo((System.Collections.IEnumerable)ViewData["lookupExpenditureType"]) // A list of all expenditure types which is populated in the controller.
    )

 

I have a full sample project which shows the problem as well, if the above is not enough, but it is too large to attach here as a zip file, so I'm not sure the best way to share it.

 

 

Jon
Top achievements
Rank 1
 answered on 28 Jan 2021
8 answers
563 views

With all the various options available to us these days, it is becoming more difficult to create a empty project that is actually usable.  I am starting to wonder if I am completely missing something obvious and hope someone can point out the error in my ways.

First, I am a strong Telerik advocate so while this might come out as a negative towards them, it is not intended to be so.  I fully expect this is a result of changes Microsoft made between VS 2019 and its predecessor.  

Creating a project in Visual Studio used to be as simple as "File/New Project".  Upon selection of a template the requisite Telerik wizard would launch and you could pick from various options.  The end result was a usable project which would compile and produce code in the required framework.  Simple, usable and very reliable.

Then Microsoft added some new wizards to the mix and, in my opinion, things went to the dog house.  

For example try to create a Telerik UI Asp.net Core 3.1 project.  You can't.  In the created projects only .NET Core 2.1 is available as the only option.  All the websites show options to select 3.0, 3.1, .NET Core 5.0 however those options to not appear available to mere mortals.  My frameworks are all current or better.

As an example consider the following:

  • Launch VS 2019
  • Use Telerik Extension Menu
  • Select Telerik UI for ASP.NET Core menu item
  • Select create New Telerik Project. The VS 2019 "wizard" launches asking for project name, location to place project, and solution name.  Upon pressing the "Create" button, the Telerik "wizard" appears.  I am presented with Core 2.1 as my only option.  No 3.0, 3.1, or .net 5.0 available.  I am allowed to pick HTML or Tag options.

Another option tried:

  • Use VS 2019 "New Project" menu item.  
  • Select ASP.Net Core Web Application from choices of templates.  I can select from multiple project types along with choice of .NET Core frameworks.  .NET 2.1, 3.1, and 5.0 are available choices.  For example, choose .NET Core 3.1 and ASP.NET Core Web Application (Model-View-Controller) works. Right Clicking upon the .NET Core 3.1 project created allows you to use the "Convert to Telerik UI for ASP.NET Core" menu item. The resulting project actually works.  I see no direct way to creating a Telerik project except by this upgrade process.

Using the .NET Core 5.0 option fails when the "Convert to Telerik UI for ASP.NET Core" menu item.   A cryptic error is displayed which looks like a exception occurred during the conversion process.  The resulting project is not usable.

This all leads me to ask how is one to "officially" create .NET Core 3.1 or newer Telerik based projects?  Have I somehow missed downloading some templates I should have and do not know it?  Have I somehow gotten myself too "current" and suffering the consequences?

While the default Microsoft wizards seem to be working, I prefer to create Telerik based projects as their toolsets historically have been extremely valuable.

Your guidance is appreciated.

 

 

 

David
Top achievements
Rank 1
Iron
Veteran
Iron
 answered on 27 Jan 2021
6 answers
1.5K+ views

I have an autocomplete and a grid where my intention is to push records from Autocomplete into the grid and save those records using grid's create action from there by invoking a method set in a custom button. Please look at the attached picture to get a clear idea of what my setup looks like.

My saveTerminalRow function doesn't work as expected. Please help.

<div>
    @(Html.Kendo().AutoComplete()
        .Name("terminalsAutoComplete")
        .DataTextField("cmp_name")
        // omitted for brevity
        .Events(e => e.Select("onTerminalNameSelect"))
    )
</div>
<div>
    @(Html.Kendo()
    .Grid<ProjectName.TerminalOutOfState>()
    .Name("manageTOSSqlRecordsGrid")
    .Columns(columns =>
    {
        columns.Bound(c => c.TerminalOutOfStateID).Hidden();
        columns.Bound(c => c.TerminalCompanyID).Title("Terminal ID").Width(60);
        columns.Bound(c => c.CompanyID).Title("Region").ClientTemplate("#=CompanyName#").Width(40);
        columns.Command(cmd =>
        {
            cmd.Edit();
            cmd.Destroy();
            cmd.Custom("Save").Visible("showSaveCommand").Click("saveTerminalRow");
        }).Title("Action").Width(80);
    })
    .ToolBar(tbr =>
    {
        tbr.Create();
        tbr.Custom().Text("Load the table");
    })
    .Editable(edt => edt.Mode(GridEditMode.PopUp).TemplateName("TOoSTemplate").CreateAt(GridInsertRowPosition.Top))
    .DataSource(dataSrc => dataSrc
        .Ajax()
        .ServerOperation(true)
        .PageSize(15)
        .Model(mdl => mdl.Id(column => column.TerminalOutOfStateID))
        .Create(update => update.Action("UpsertTerminalOoSRecordAsync", "Configuration"))
        //omitted for brevity
    )
    .AutoBind(false)
    )
</div>

 

My scripts are like follows:

 

<script>
    //This will add the data from autocomplete into the grid.
    function onTerminalNameSelect(e) {
        var dataItem = this.dataItem(e.item);
 
        var terminalData = {
            TerminalOutOfStateID: 0,
            TerminalCompanyID: dataItem.cmp_id,
            CompanyID: dataItem.region_id,
            CompanyName: dataItem.region_name
        };
 
        var grid = $("#manageTOSSqlRecordsGrid").data("kendoGrid");
        grid.dataSource.add(terminalData);
    }
     
    //This is used to hide and show "Save" button to those rows that are not yet saved to Db.
    function showSaveCommand(dataItem) {
        // show the Save button for the item with TerminalOutOfStateID =0
        if (dataItem.TerminalOutOfStateID == 0) {
            return true;
        }
        else {
            return false;
        }
    }
     
    //This is the method to save the inserted row into Db by calling the create action method. But this doesn't work:
    function saveTerminalRow(e) {
        var terminalData = this.dataItem($(e.currentTarget).closest("tr"));
        var grid = $("#manageTOSSqlRecordsGrid").data("kendoGrid");
        grid.saveRow();
    }
</script>

 

These are the screenshots.

Tsvetomir
Telerik team
 answered on 26 Jan 2021
15 answers
404 views

I'm getting a message 

Extension 'Telerik UserSettings VSExtension 2.1' likely cuased 9 seconds of unresponsiveness. Disabling it may improve your experience. 

According to https://social.msdn.microsoft.com/Forums/sqlserver/en-US/9fe58a7b-07bd-4efe-b1a5-8dc3bb33ee79/extension-microsoft-integration-services-projects-13-likely-caused-11-seconds-of-unresponsiveness?forum=ssdt, this is due to 15.6.0 of VS2017 displaying this message for extensions that are not loaded async. 

Two Things:

1. Can you update the extension to make it load async?

2. Can I disable it without impacting my work?

Thanks!

Laurie

Vesko
Telerik team
 answered on 26 Jan 2021
3 answers
245 views

I want to resize the size of Upload File icon, but not work even I change it to attachment icon, still have space around the icon. Can any one teach me how to do it. Thanks.

 

thank you very much!!!

Ivan Danchev
Telerik team
 answered on 22 Jan 2021
4 answers
1.9K+ views

I have a grid that looks like this:

@(Html.Kendo()
.Grid<ProjectName.TerminalOutOfState>()
.Name("manageTOSSqlRecordsGrid")
.Columns(columns =>
{
    columns.Bound(c => c.TerminalOutOfStateID).Hidden();
    columns.Bound(c => c.TerminalCompanyID).Title("Terminal ID").Width(60);
    columns.Bound(c => c.CompanyID).Title("Region").ClientTemplate("#=CompanyName#").Width(40);
    columns.Command(cmd =>
    {
        cmd.Edit();
        cmd.Destroy();
        cmd.Custom("Save").Visible("showSaveCommand").Click("saveTerminalRow");
    }).Title("Action").Width(80);
})
.ToolBar(tbr =>
{
    tbr.Create();
    tbr.Custom().Text("Load the table");
})
.Editable(edt => edt.Mode(GridEditMode.PopUp).TemplateName("TOoSTemplate").CreateAt(GridInsertRowPosition.Top))
.DataSource(dataSrc => dataSrc
    .Ajax()
    .ServerOperation(true)
    .PageSize(15)
    .Model(mdl => mdl.Id(column => column.TerminalOutOfStateID))
    .Create(update => update.Action("UpsertTerminalOoSRecordAsync", "Configuration"))
    //omitted for brevity
)
.AutoBind(false)
)

 

My focus here is on the Region column. The kind of data it gets looks like this:

CompanyID: 1
Instead of showing just 1, I pass the Name for that Id on a variable called CompanyName and show it using ClientTemplate.

It all works and looks good until I either edit the row or add a new row and it shows null.
After I reload the table, then it shows the correct value.

Please look at my attached screenshots to get a better picture.

 

Ashish
Top achievements
Rank 1
Veteran
 answered on 22 Jan 2021
3 answers
1.7K+ views

I have a portal and an IdentityServer4 site for authentication.  When I load a page my Telerik Grid goes out to get the data.  My scenario is, if I let the page sit long enough to let the Token expire I expect the UI to redirect for login... but that doesn't happen.  The grid works fine when I have a valid Access Token.  I need this to redirect and be happy.  Instead, the grid returns no feedback and I get the following:

Request (I removed the cookie gook):

Invoke-WebRequest -Uri "https://localhost:44355/Customers/IndexJson" `
-Method "POST" `
-Headers @{
"method"="POST"
  "authority"="localhost:44355"
  "scheme"="https"
  "path"="/Customers/IndexJson"
  "sec-ch-ua"="`"Google Chrome`";v=`"87`", `" Not;A Brand`";v=`"99`", `"Chromium`";v=`"87`""
  "accept"="*/*"
  "x-requested-with"="XMLHttpRequest"
  "sec-ch-ua-mobile"="?0"
  "user-agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"
  "origin"="https://localhost:44355"
  "sec-fetch-site"="same-origin"
  "sec-fetch-mode"="cors"
  "sec-fetch-dest"="empty"
  "referer"="https://localhost:44355/Customers"
  "accept-encoding"="gzip, deflate, br"
  "accept-language"="en-US,en;q=0.9"
-ContentType "application/x-www-form-urlencoded; charset=UTF-8" `
-Body "sort=&page=1&pageSize=20&group=&filter=&dateRangeIndex=3&isActiveIndex=0";
Invoke-WebRequest -Uri "https://localhost:5001/connect/authorize?client_id=GsiPortal.App&redirect_uri=https%3A%2F%2Flocalhost%3A44355%2Fsignin-oidc&response_type=code&scope=openid%20profile%20offline_access%20email%20phone%20address%20roles%20IdentityServerApi%20Gsi.Activity.Api%20Gsi.Azure.Blob.Api%20Gsi.Azure.Comm.Api%20Gsi.Customer.Api%20Gsi.Cloud.Maintenance.Api&response_mode=form_post&nonce=...cleaned...-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0" -Headers @{
"Referer"="https://localhost:44355/"
  "User-Agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"
};
Invoke-WebRequest -Uri "https://localhost:5001/connect/authorize?client_id=GsiPortal.App&redirect_uri=https%3A%2F%2Flocalhost%3A44355%2Fsignin-oidc&response_type=code&scope=openid%20profile%20offline_access%20email%20phone%20address%20roles%20IdentityServerApi%20Gsi.Activity.Api%20Gsi.Azure.Blob.Api%20Gsi.Azure.Comm.Api%20Gsi.Customer.Api%20Gsi.Cloud.Maintenance.Api&response_mode=form_post&nonce=...cleaned...-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0" `
-Method "OPTIONS" `
-Headers @{
"method"="OPTIONS"
  "authority"="localhost:5001"
  "scheme"="https"
  "path"="/connect/authorize?client_id=GsiPortal.App&redirect_uri=https%3A%2F%2Flocalhost%3A44355%2Fsignin-oidc&response_type=code&scope=openid%20profile%20offline_access%20email%20phone%20address%20roles%20IdentityServerApi%20Gsi.Activity.Api%20Gsi.Azure.Blob.Api%20Gsi.Azure.Comm.Api%20Gsi.Customer.Api%20Gsi.Cloud.Maintenance.Api&response_mode=form_post&nonce=...cleaned...-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0"
  "accept"="*/*"
  "access-control-request-method"="GET"
  "access-control-request-headers"="x-requested-with"
  "origin"="https://localhost:44355"
  "user-agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"
  "sec-fetch-mode"="cors"
  "sec-fetch-site"="same-site"
  "sec-fetch-dest"="empty"
  "referer"="https://localhost:44355/"
  "accept-encoding"="gzip, deflate, br"
  "accept-language"="en-US,en;q=0.9"
};
Invoke-WebRequest -Uri "https://localhost:44355/Customers/IndexJson" `
-Method "POST" `
-Headers @{
"method"="POST"
  "authority"="localhost:44355"
  "scheme"="https"
  "path"="/Customers/IndexJson"
  "sec-ch-ua"="`"Google Chrome`";v=`"87`", `" Not;A Brand`";v=`"99`", `"Chromium`";v=`"87`""
  "accept"="*/*"
  "x-requested-with"="XMLHttpRequest"
  "sec-ch-ua-mobile"="?0"
  "user-agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"
  "origin"="https://localhost:44355"
  "sec-fetch-site"="same-origin"
  "sec-fetch-mode"="cors"
  "sec-fetch-dest"="empty"
  "referer"="https://localhost:44355/Customers"
  "accept-encoding"="gzip, deflate, br"
  "accept-language"="en-US,en;q=0.9"
} `
-ContentType "application/x-www-form-urlencoded; charset=UTF-8" `
-Body "sort=&page=1&pageSize=20&group=&filter=&dateRangeIndex=3&isActiveIndex=0";
Invoke-WebRequest -Uri "https://localhost:5001/connect/authorize?client_id=GsiPortal.App&redirect_uri=https%3A%2F%2Flocalhost%3A44355%2Fsignin-oidc&response_type=code&scope=openid%20profile%20offline_access%20email%20phone%20address%20roles%20IdentityServerApi%20Gsi.Activity.Api%20Gsi.Azure.Blob.Api%20Gsi.Azure.Comm.Api%20Gsi.Customer.Api%20Gsi.Cloud.Maintenance.Api&response_mode=form_post&nonce=...cleaned...-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0" -Headers @{
"Referer"="https://localhost:44355/"
  "User-Agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"
};
Invoke-WebRequest -Uri "https://localhost:5001/connect/authorize?client_id=GsiPortal.App&redirect_uri=https%3A%2F%2Flocalhost%3A44355%2Fsignin-oidc&response_type=code&scope=openid%20profile%20offline_access%20email%20phone%20address%20roles%20IdentityServerApi%20Gsi.Activity.Api%20Gsi.Azure.Blob.Api%20Gsi.Azure.Comm.Api%20Gsi.Customer.Api%20Gsi.Cloud.Maintenance.Api&response_mode=form_post&nonce=...cleaned...-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0" `
-Method "OPTIONS" `
-Headers @{
"method"="OPTIONS"
  "authority"="localhost:5001"
  "scheme"="https"
  "path"="/connect/authorize?client_id=GsiPortal.App&redirect_uri=https%3A%2F%2Flocalhost%3A44355%2Fsignin-oidc&response_type=code&scope=openid%20profile%20offline_access%20email%20phone%20address%20roles%20IdentityServerApi%20Gsi.Activity.Api%20Gsi.Azure.Blob.Api%20Gsi.Azure.Comm.Api%20Gsi.Customer.Api%20Gsi.Cloud.Maintenance.Api&response_mode=form_post&nonce=...cleaned...-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0"
  "accept"="*/*"
  "access-control-request-method"="GET"
  "access-control-request-headers"="x-requested-with"
  "origin"="https://localhost:44355"
  "user-agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"
  "sec-fetch-mode"="cors"
  "sec-fetch-site"="same-site"
  "sec-fetch-dest"="empty"
  "referer"="https://localhost:44355/"
  "accept-encoding"="gzip, deflate, br"
  "accept-language"="en-US,en;q=0.9"
}

Errors:

Customers#:1 Access to XMLHttpRequest at 'https://localhost:5001/connect/authorize?client_id=GsiPortal.App&redirect_uri=https%3A%2F%2Flocalhost%3A44355%2Fsignin-oidc&response_type=code&scope=openid%20profile%20offline_access%20email%20phone%20address%20roles%20IdentityServerApi%20Gsi.Activity.Api%20Gsi.Azure.Blob.Api%20Gsi.Azure.Comm.Api%20Gsi.Customer.Api%20Gsi.Cloud.Maintenance.Api&response_mode=form_post&nonce=637462512968208243.ZTllMzdmOGEtMzRlZS00YWZmLWExMGItNTI0NGEwMmNlYmE2MTQ5ZTIyZmMtMWQ4Yi00YWU3LTk2NTMtYTY2N2FjMzViNDkz&state=CfDJ8D424Yro--hNo8czS4g4Tz-M0hUZ8IWLi1m4T_Vf02s_0tj9j1HSSNWueJYBxRBUEaKtzsY2P5UDGqi81fSr7doRchzSEur_bDMgPj7KwjTD70DlRUhBCalBV3sz08X793e8JQTKwAp_Psp7VOeoM-XGKIpFW-flsS0Z1sHwIUusvFhkXQdvGNfWMlJ4xHMzweHEUNFqTxPkevdBetlRNnCcUExXZYArJDr2IcewGDAS0toh7L2TUWZQ3DT56aXG_18aLwRHSuNXuRzEE1c8GJMgj97cYy5mfW4QRNW9oGBFPe41dhASstz4VaVyinNEPw&x-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0' (redirected from 'https://localhost:44355/Customers/IndexJson') from origin 'https://localhost:44355' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
jquery.min.js:4 GET https://localhost:5001/connect/authorize?client_id=GsiPortal.App&redirect_uri=https%3A%2F%2Flocalhost%3A44355%2Fsignin-oidc&response_type=code&scope=openid%20profile%20offline_access%20email%20phone%20address%20roles%20IdentityServerApi%20Gsi.Activity.Api%20Gsi.Azure.Blob.Api%20Gsi.Azure.Comm.Api%20Gsi.Customer.Api%20Gsi.Cloud.Maintenance.Api&response_mode=form_post&nonce=637462512968208243.ZTllMzdmOGEtMzRlZS00YWZmLWExMGItNTI0NGEwMmNlYmE2MTQ5ZTIyZmMtMWQ4Yi00YWU3LTk2NTMtYTY2N2FjMzViNDkz&state=CfDJ8D424Yro--hNo8czS4g4Tz-M0hUZ8IWLi1m4T_Vf02s_0tj9j1HSSNWueJYBxRBUEaKtzsY2P5UDGqi81fSr7doRchzSEur_bDMgPj7KwjTD70DlRUhBCalBV3sz08X793e8JQTKwAp_Psp7VOeoM-XGKIpFW-flsS0Z1sHwIUusvFhkXQdvGNfWMlJ4xHMzweHEUNFqTxPkevdBetlRNnCcUExXZYArJDr2IcewGDAS0toh7L2TUWZQ3DT56aXG_18aLwRHSuNXuRzEE1c8GJMgj97cYy5mfW4QRNW9oGBFPe41dhASstz4VaVyinNEPw&x-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0 net::ERR_FAILED
send @ jquery.min.js:4
ajax @ jquery.min.js:4
read @ kendo.all.js:6404
read @ kendo.aspnetmvc.js:257
(anonymous) @ kendo.all.js:7524
_queueRequest @ kendo.all.js:7790
read @ kendo.all.js:7517
gridRefresh @ Customers:214
onclick @ Customers:171

Grid:

        @(Html.Kendo().Grid<Customer>()
            .Name("grid")
            .Columns(columns =>
            {
                columns.Command(command => command
                    .Custom("Select")
                    .Click("goDetail"))
                    .Width(Glossary.Portal.ButtonWidth);
                columns.Bound(p => p.Name)
                    .Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")
                        .ShowOperators(false)
                        .SuggestionOperator(FilterType.Contains)));
                columns.Bound(p => p.LicenseRenewalTimestamp).Title("License Renewal");
            })
            .Pageable()
            .Sortable()
            .Scrollable()
            .Filterable(ftb => ftb.Mode(GridFilterMode.Row))
            .HtmlAttributes(new {style = "height:596px;"})
            .Selectable()
            .Navigatable()
            .DataSource(dataSource => dataSource
                .Ajax()
                .PageSize(20)
                .Read(read => read.Action("IndexJson", "Customers")
                    .Data("gridGetData"))))

Script:

    function gridRefresh() {
        var grid = $("#grid").getKendoGrid();
        grid.dataSource.read();
    }

    function gridGetData() {

        var isActiveIndex = $("#isActiveOptions").val();
        //alert("isActiveIndex: " + isActiveIndex);

        var dateRangeIndex = $("#dateRangeOptions").val();
        //alert("dateRangeIndex: " + dateRangeIndex);

        return {
            dateRangeIndex: dateRangeIndex,
            isActiveIndex: isActiveIndex
        };

        return null;
    }

 

Anton Mironov
Telerik team
 answered on 22 Jan 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?