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
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
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
I'm trying to use this basic TabStrip example:
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?
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
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.
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.
Hello,
Is it possible to change the language of the header? (Ex: instead of Sun, Mon to another language), I have tried changing the CurrentThread and CurrentUIThread culture to Italian but i still get the days of the week in english, the datetime pickers on Gantt also have values in English while i want them in Italian.
Futhermore, when i create a new Task i would like to have the word "New task" in Italian, but can't find a way to change it.
Thank you.
Bilhan.