Telerik Forums
UI for ASP.NET MVC Forum
2 answers
774 views
Hello - I am using the kendo ui asp.net mvc chat tool to provide a peer to peer chat solution for one of my projects. One of the requirements I have is to keep a log of the messages and then when the chat is initialized load a history of the messages for the last X number of days. I know that when you click on a conversation bubble in the chat box it displays the time the message was posted, but because the messages may span several days, I need a way to display both the date and the time the message was posted. Is there a way to do this? 
Chris
Top achievements
Rank 1
 answered on 17 Apr 2021
1 answer
292 views

Hi guys! I really need your help!

It is necessary to make a dynamic grid with the ability to edit cells. The grid layout appears. Column names are visible. Data is not loaded into the grid. There is an error in the browser console:"Uncaught SyntaxError: unexpected token: numeric literal" kendo.all.js:63353:40. I can’t cope with this error ...

View:

@model System.Data.DataTable
 
@{
    var id = Model.Columns[0].ColumnName;
    var templateName = "String";
}
 
@(Html.Kendo().Grid<dynamic>()
    .Name("Grid")
    .Columns(columns =>
    {
        foreach (System.Data.DataColumn column in Model.Columns)
        {
 
            switch (column.DataType.ToString())
            {
                case "System.Int16":
                case "System.Int32":
                case "System.Int64":
                    templateName = "Integer";
                    break;
                case "System.Decimal":
                case "System.Double":
                case "System.Float":
                    templateName = "Number";
                    break;
                case "System.String":
                    templateName = "NotEditable";
                    break;
            }
 
            if (column.ColumnName == id)
            {
                templateName = "NotEditable";
            }
 
            columns.Bound(column.ColumnName).Title(column.Caption).EditorTemplateName(templateName).EditorViewData(new { name = id });
        }
    })
    .ToolBar(toolbar => {toolbar.Save(); })
    .Editable(ed=>ed.Mode(GridEditMode.InCell))
    .Scrollable()
    .DataSource(dataSource => dataSource.Ajax()
        .Batch(true)
        .Model(model =>
        {
            model.Id(id);
            foreach (System.Data.DataColumn column in Model.Columns)
            {
                var field = model.Field(column.ColumnName, column.DataType);
                if (column.ColumnName == id || column.ColumnName == "BusName")
                {
                    field.Editable(false);
                }
            }
        })
        .Read("Read", "Project")
        .Update("Update", "Project")
    )
    )

Controller:

public ActionResult Index()
        {
            DataTable proj = new DataTable("table");
            proj.Columns.Add()...;
            proj.Rows.Add()
 
            return View(proj);
        }

In debug mode, the Read method does not enter ...

kendo ver. 2018.1.221.545

 

Please tell me what to do. 2 days I can not solve this problem

 

 

Constantin
Top achievements
Rank 1
 answered on 16 Apr 2021
16 answers
753 views
I am getting this error when I open my solution. Removing the Telerik Extensions in VS 2015.3 seems to have resolved it. Similar thread: http://stackoverflow.com/questions/39678601/visual-studio-2015-initializing-part-nuget-packagemanagement-visualstudio-vsolut/41753470?noredirect=1#comment71901895_41753470
Vesko
Telerik team
 answered on 16 Apr 2021
1 answer
71 views
good morning but my TABSTRIP does not page from one tab to another.
Aleksandar
Telerik team
 answered on 16 Apr 2021
5 answers
5.1K+ views

Hi Team,

I am using the Kendo Grid ASP.NET MVC. Please find the column code below. I want to do few things.

1) Edit button is position in the last column for each row having its own. Once the Edit button is being clicked, I want Edit button to be replaced with "Update and Cancel" button.

2) After clicking the edit button, the First column of the whatever row's" Edit" button being clicked will be able to editable by the user. User can type what they wanted to.

3) Once the user clicks on the "Update" button, the first column should be updated (what a user has changed) and become noneditable, and Edit button will replace the "Update and Cancel" button. If user clicks the Cancel button, then the first column would not be updated and Edit button will replace the "Update and Cancel" button. 

4) Grid rows (all data) should remain same as they were before. Refresh function would wipe out the previous data which I do not want it to happen. I want to update a specific row's first column when a user clicks the Edit button of that row. After editing and clicking the update button, the rest of the rows must remain same as they were before.

columns.Bound(p => p.ClickStatus)
        .Title("Action")
        .ClientTemplate("<button type='k-button' class='btn btn-link' id='editComment'>Edit</button>")
        .Groupable(true)
        .Width(120)
        .Locked(false)
        .HtmlAttributes(new { style = "text-align: center;" });

Please guys let me know if you know ways to do it. I have been researching this but not able to succeed. Please get back to me as quickly as possible since I am working on the project. 

 

Best,

Mayur Maisuria

 

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 15 Apr 2021
2 answers
284 views

I am using Telerik MVC. Is there a way to have my own look when using grouping in a dropdownlist.

I would like to have different look in the grouping dropdownlist to sowh the group value on the right for each row in the selectbox. 

Is it a way to do it?

the attached file Current.png is what I have now. the HopeToHave.png is what I was asked to do. 

It seems I can not find any document on how to do it.

The code I have is

 @(Html.Kendo().DropDownListFor(m => m.CompetencyName)
                 DataValueField("CompetencyName")
                .DataTextField("CompetencyName")
                .OptionLabel("Select...")
                .DataSource(source =>  source
                    .Custom()
                    .Group(g => g.Add("CompetencyType", typeof(string)))
                    .Transport(transport => transport
                      .Read(read => read.Action("GetAllCompetencies", "Method", new { posTitle = ViewData["Title"] }).Type(HttpVerbs.Post))
                     )
                )
    )

 

Thanks.

Allen

Allen
Top achievements
Rank 1
Veteran
 answered on 15 Apr 2021
4 answers
131 views

I'm trying to use this basic TabStrip example:

TabStrip Basic Usage

I can see that the first tab for "Paris" is automatically activated by specifying `.Selected(true)`.

I have done similar in my code, and my first tab is automatically activated.

But, nothing happens whenever I select different tabs.

I click Tab 2 and Tab 1 is still showing.

What am I missing?

Douglas
Top achievements
Rank 1
Veteran
 answered on 15 Apr 2021
5 answers
338 views

Hi everyone,

after troubles with Telerik, I tried to re-install the ASP.NET MVC module I have a licence for, the install went well but now I cant create a Telerik app nor upgrade an MVC app. I have also de-installed VS2019 and reinstalled, no more luck.

I get the following error:

An error occurred while running the wizard.

Error executing custom action Telerik.VSX.Actions.UpdateReferencesDataAction: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\username\AppData\Local\Temp\Telerik\ShadowCopy\Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml, Version=2020.2.615.40, Culture=neutral, PublicKeyToken="**the token**"\Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.dll'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
   at System.IO.File.Copy(String sourceFileName, String destFileName)
   at Telerik.VSX.Internal.FileSystem.FileOperator.Copy(String sourceFileName, String destinationFileName)
   at Telerik.VSX.Internal.Assembly.AssemblyLoader.GetShadowCopy(String assemblyPath)
   at Telerik.VSX.Internal.Assembly.AssemblyLoader.ReflectionOnlyLoadFromShadowCopy(String loadInformation)
   at Telerik.VSX.DistributionListing.DistributionItem.GetReferencedAssemblies()
   at Telerik.VSX.DistributionListing.DistributionItem.GetFilteredPrerequisites()
   at Telerik.VSX.DistributionListing.DistributionItem.get_DistributionWidePrerequisites()
   at Telerik.VSX.DistributionListing.DistributionItemList.IntegrityCapableItem.ResetUnmetPrerequisites()
   at Telerik.VSX.DistributionListing.DistributionItemList.Add(IDistributionItem newDistributionItem)
   at Telerik.VSX.DistributionListing.FileBasedDistribution.PopulateItems(DistributionItemList items)
   at Telerik.VSX.DistributionListing.Distribution.get_Items()
   at Telerik.VSX.DistributionListing.ReferencesResolver.Resolve(IEnumerable`1 referencesNames, IDistribution distribution)
   at Telerik.VSX.Actions.UpdateReferencesDataAction.UpdateReferencesData(IPropertyDataDictionary arguments)
   at Telerik.VSX.Actions.UpdateReferencesDataAction.Execute(WizardContext wizardContext, IPropertyDataDictionary arguments)
   at Telerik.VSX.WizardEngine.Actions.ActionBase.Telerik.WizardFramework.IAction.Execute(IWizardContext wizardContext, IPropertyDataDictionary arguments)
   at Telerik.VSX.WizardEngine.ActionManager.ExecActions()

 

I have not been able to find a solution at that time, have you any thought

thanks 

Ray

Nikolay Mishev
Telerik team
 answered on 15 Apr 2021
25 answers
1.1K+ views

Is there a way to display checkbox with 'Select All/Deselect All' checkbox within column menu which selects all or deselect all columns of the grid? We have about 40 to 50 columns in grid, clicking each column to hide bunch of columns is pretty tedious work.

 

Thanks.

Viktor Tachev
Telerik team
 answered on 15 Apr 2021
1 answer
94 views

Hi,

i was working on MVC project and rendered the filemanager in view with helpers.

after first loading the filemanager i did select a file and using "getSelected()" method, it returns an array of "FileManagerEntry" for each selected file.

when you load the second time it shows no files selected and in this case when i call the same "getSelected()" method, still it returns  1 record. i was expecting to be 0.  can you please let me know what would be the issue.

 

Thanks

Regards

Hassan.

Aleksandar
Telerik team
 answered on 14 Apr 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?