I am trying to create a dynamic html table generator using ken-do Rad Spreadsheet. I am creating my custom toolbar that works fine but my question is, how can i remove Formula Bar, Column Header, Row Header and cells. I have attach a image to my question that is actually i am trying to achieve. can someone suggest me how can i do this am new to telerik.
working exampel: http://dojo.telerik.com/@veselints/iFUgiTOR
Thanks.
I've got a nested kendo grid in an mvc view that I can't get the create functionality to work right. It's displaying all parent/child information correctly when the view loads, but when creating a new parent record,instead of a blank child grid, I get ALL items in that child list. Not sure what I'm doing wrong - should have an empty child grid when expanding a new parent element that hasn't been saved yet - not to mention no children have been added to it. I've also attached screenshots of the view showing exactly what's going on.
View Models:
public
class
DefectGroupViewModel
{
public
int
DefectGroupId {
get
;
set
; }
public
string
Value {
get
;
set
; }
public
IEnumerable<ScrapReasonViewModel> ScrapReasons {
get
;
set
; }
}
public
class
ScrapReasonViewModel
{
public
int
ScrapReasonId {
get
;
set
; }
public
string
Value {
get
;
set
; }
public
string
ScrapCode {
get
;
set
; }
public
int
DefectGroupId {
get
;
set
; }
}
Partial View:
@model DefectGroupViewModel
@{ViewBag.Title = "Defect Groups"; }
<
script
src
=
"~/Scripts/ErrorHelper.js"
></
script
>
<
script
type
=
"text/kendo"
id
=
"scrapReasonsTemplate"
>
@(Html.Kendo().Grid<
ScrapReasonViewModel
>()
.Name("grid_#=DefectGroupId#")
.ToolBar(tb => tb.Create())
.Columns(column => {
column.Bound(x => x.ScrapReasonId).Visible(false);
column.Bound(x => x.Value).Width(50).Title("Scrap Reason");
column.Bound(x => x.ScrapCode).Width(50).Title("Scrap Code");
column.Bound(x => x.DefectGroupId).Visible(false);
column.Command(command => { command.Edit(); }).Width(250);
})
.DataSource(ds => ds
.Ajax()
.Model(model => {
model.Id(e => e.ScrapReasonId);
model.Field(e => e.ScrapReasonId).Editable(false);
model.Field(e => e.DefectGroupId).Editable(false);
})
.Read(r => r.Action("ReadScrapReasons", "Admin", new { defectGroupId = "#=DefectGroupId#" }))
.Create(c => c.Action("CreateScrapReason", "Admin", new { defectGroupId = "#=DefectGroupId#" }))
.Update(u => u.Action("UpdateScrapReason", "Admin", new { defectGroupId = "#=DefectGroupId#" }))
)
.Sortable()
.ToClientTemplate()
)</
script
>
<
div
>
@(Html.Kendo().Grid<
DefectGroupViewModel
>()
.Name("DefectGroupGrid")
.Columns(column => {
column.Bound(c => c.DefectGroupId).Visible(false);
column.Bound(c => c.Value).Width(225).Title("Defect Group");
column.Command(command => { command.Edit(); }).Width(250);
})
.ToolBar(tb => tb.Create())
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.Sortable()
.Scrollable(s => s.Height(375))
.DataSource(ds => ds
.Ajax()
.PageSize(30)
.ServerOperation(true)
.Events(events => {
events.Error("error_handler");
})
.Model(model => {
model.Id(e => e.DefectGroupId);
model.Field(e => e.DefectGroupId).Editable(false);
model.Field(e => e.ScrapReasons).DefaultValue(new List<
ScrapReasonViewModel
>());
})
.Read(r => r.Action("ReadDefectGroups", "Admin"))
.Create(c => c.Action("CreateDefectGroup", "Admin"))
.Update(u => u.Action("UpdateDefectGroup", "Admin"))
)
.ClientDetailTemplateId("scrapReasonsTemplate")
)
</
div
>
<
script
type
=
"text/javascript"
>
function error_handler(e) {
if (e.errors) {
var message = GetErrorMessage(e);
new Noty({
text: message,
type: 'error',
layout: 'topCenter',
timeout: 4000 }).show();
}
}
</
script
>
function
onCheck(e) {
if
($(
'input.checkTreeview'
).is(
':checked'
)) {
$(
'#addUserButton'
).attr(
'disabled'
,
'disabled'
);
$(
'#modifyUserButton'
).attr(
'disabled'
,
false
);
}
else
{
$(
'#addUserButton'
).attr(
'disabled'
,
false
);
$(
'#modifyUserButton'
).attr(
'disabled'
,
'disabled'
);
}
}
hello:
We use checkmax for weak sweeps,
and there are some XSS Issues for Kendo Grid.
How can I solve it?
our codes:
public ActionResult GridSearch([DataSourceRequest] DataSourceRequest request)
{
....
return Json(svc.GridSearch(request));
}
Hi,
I have implemented the kendo ui diagram using the HierarchicalDataSource. On loading the diagram, connections between the shapes is not happening(child items).Simple code tried in the dojo https://dojo.telerik.com/OYupExUq.
<
div
id
=
"diagram"
></
div
>
<
script
>
var dataSource = new kendo.data.HierarchicalDataSource({
data: [{
"id":"1",
"name": "Progress",
"items": [
{"id":"2",
"name": "Kendo UI",
"items":[
{"id":"3","name": "TreeList"},
{"id":"4","name": "Chart"}
]
},
{"id":"5","name": "NativeScript"}
]
}],
schema: {
model: {
children: "items"
}
}
});
console.log(dataSource);
$("#diagram").kendoDiagram({
dataSource: dataSource,
layout: {
type: "tree",
subtype: "down"
},
shapeDefaults: {
type: "circle",
content: {
template: "#= name #"
},
width: 80,
height: 80,
hover: {
fill: "Orange"
}
},
connectionDefaults: {
stroke: {
color: "#979797",
width: 1
},
type: "polyline",
startCap: "FilledCircle",
endCap: "ArrowEnd"
}
,
connections:[
{
from: "3",
to: "5",
content: {
text: "Step 1"
},
stroke: {
color: "#33ccff"
}
}
]
});
</
script
>
Also posted in stack overflow and elaborate the issue.I have not come across any examples with connection datasouce using HierarchicalDataSource.
https://stackoverflow.com/questions/52500325/kendo-ui-diagram-hierarchicaldatasource-set-connection-datasource-issues.
From the attached image the requirement is to draw the connections between "TreeList" to "NativeScript".
Let me know if this is achievable.
Thanks
Dev
Hi Guys,
Kendo UI Professional 2017.1.330
I have just tripped over a little issue whereby the rows of a frozen column get out of alignment with the rest of the grid.
The scenario is as follows :-
I have an angularjs page hosting a grid with a single frozen column which contains a couple of buttons for maintenance.
Clicking the buttons calls a UI Bootstrap Modal for the user to enter some data and to acknowledge the action.
Everything works fine when clicking on a button on a row which is fully in view.
However on clicking a button on a row which is only partially in view (See last row of Image1) the modal is opened as expected but when it is closed the frozen column is scrolled slightly to fetch the button fully into view but the other grid columns are not touched.
This results in the rows of frozen column being offset with the rest of the grid (See Image2).
I have tried playing around with the various methods of the grid (.current() .table.focus() etc) pre/post opening the modal, to try and force a re-alignment all to no avail.
Therefore I would be most grateful for any advice to try and overcome this issue.
Thanks
Alan