Hello
Perhaps telerik diagrams are quite good, but I can't find out how to reload a diagram?
I have a diagram like this:
@(Html.Kendo().Diagram()
.Name("diagram")
.DataSource(dataSource => dataSource
.Read(read => read
.Action("GetLinkedPersonsData", "KartotekaKlientow")
)
.Model(m => m.Children("Items"))
)
.Editable(false)
.Layout(l => l.Type(DiagramLayoutType.Layered))
.ShapeDefaults(sd => sd
.Visual("LinkedPersonsTemplate")
)
.ConnectionDefaults(cd => cd
.Stroke(s => s
.Color("#979797")
.Width(2)
)
)
)
and when I click I want the diagram to reload and get new data without refreshing the page. It would be also solution to inject new data into diagram.
Is there any way to to any of these?
Hello,
I'm trying to add the ability for the user to refresh manually the tree list view. I was able to display the reload icon on others telerik controls but can't find the way to do it on a tree list.
Code:
@(Html.Kendo().TreeList<Document>()
.Name("sharepointdocumentviewertreelist")
.Columns(columns =>
{
columns.Add().Field(e => e.Title).Width(180).TemplateId("documenttitle-template");
columns.Add().Field(e => e.SPItemId).Width(20).Hidden(true);
if (Model.showTaskIDColumn)
{
columns.Add().Field(c => c.TaskID).Width(30).Title("Task ID").Hidden(true);
}
columns.Add().Field(c => c.EmailFrom).Width(65).Hidden(false);
columns.Add().Field(c => c.ExchangeReceivedTime).Width(40).Template("#=kendo.toString(kendo.parseDate(data.ExchangeReceivedTime, 'yyyy-MM-dd'), 'dd/MM/yyyy') #").Title("Received").Hidden(false);
columns.Add().Field(c => c.EmailTo).Width(75).Hidden(true);
columns.Add().Field(c => c.LinkToItem).Width(190).Hidden(true);
columns.Add().Field(c => c.EmailId).Width(190).Hidden(true);
columns.Add().Field(c => c.IsParentEmail).Hidden(true);
columns.Add().Field(c => c.EmailBody).Hidden(true);
columns.Add().Field(c => c.DocumentType).Hidden(true);
columns.Add().Field(c => c.FileNoteId).Hidden(true);
})
.Filterable()
.Sortable()
.Selectable(true)
.Scrollable(true)
.Events(events =>
{
events.Change("SharepointDocumentViewerTreelistOnChange").DataBound("DocViewerDataBound");
})
.DataSource(dataSource => dataSource
.Read(read => read.Action("GetDocumentsMetadata", "Documents", new RouteValueDictionary(){
{ "spItemId", Model.spItemID }, { "emailID", Model.emailID }, { "caseID", Model.caseID }}))
.ServerOperation(false)
.Model(m =>
{
m.Id(f => f.SPItemId);
m.ParentId(f => f.ParentSPItemID);
m.Field(f => f.FileType);
m.Field(f => f.Title);
})
)
.Height(200)
)
Thanks in advance,
Tiago
Hi,
I am a new user of Telerick, and i want to know if there is any way to save rowcommand button to localstorage?
i am using a grid view, and for some columns i am implementing button to download some file from the server.
Everything works well, only when i try to save the state of my grid to the local storage then when i reopen my grid all my buttons are not working any more.
Thanks in advance.
Thanks
Monta
<
div
style
=
"background-color: #41526e; float: left"
>
@(Html.Kendo()
.Menu()
.Name("Menu")
.Items(items =>
{
items.Add().Text("Home").Action("Index", "Home").ImageUrl(Url.Content("~/Images/Home.png"));
items.Add().Separator(true);
items.Add()
.Text("Search")
.Action("Search", "Catalog")
.ImageUrl(Url.Content("~/Images/Search.png"));
items.Add().Separator(true);
items.Add()
.Text("First Action")
.Action("FirstAction", "Catalog")
.ImageUrl(Url.Content("~/Images/Promote.png"));
items.Add().Separator(true);
items.Add()
.Text("Second Action")
.Action("SecondAction", "Catalog")
.ImageUrl(Url.Content("~/Images/Promote.png"));
items.Add().Separator(true);
items.Add()
.Text("Subscription Stuff")
.Action("Index", "Subscription");
items.Add().Separator(true);
items.Add()
.Text("Schedule Stuff")
.Action("CreateSchedule", "Subscription");
})
.Orientation(MenuOrientation.Vertical)
)
@(Html.Kendo()
.Tooltip()
.For("#Menu")
//.Filter("button")
.AutoHide(true)
.Content("Greetings, Puny Earthling! This is a tooltip for your edification.")
.Position(TooltipPosition.Top)
.Width(200)
)
</
div
>
TIA<
Bob
Hi,
Am I going mad or are the "Mobile" demos removed from the mvc demos (http://demos.telerik.com/aspnet-mvc/)? If so, where can I find them? thanks in advance!
Best regards,
Ruud
I have the following code:
var
recurrenceEditor = $(
"#RecurrenceRule"
, form).kendoRecurrenceEditor(
{
frequencies: [
"daily"
,
"weekly"
,
"monthly"
]
}
).data(
"kendoRecurrenceEditor"
);
I'm trying to convert this to typescript. Kendo.all.d.ts does not seem to recognize this.
How do I solve this?
thanks in advance
Requirements:
1>I am using MVC kendo grid and I am trying to add select all/deselect check box to the header. I have javascript which does the logic of selecting & deselecting all the individual check boxes. I also want to select/deselect the header check box based on check boxes in the rows. Since during grid initialization grid rows are unknown, we cannot attach click event to the individual check boxes in the rows. we have to do that after data is bound to the grid.
2> I also wanted to maintain the state of the check boxes when user navigate through pages or do sorting. ( because of this paging & sorting is done on client side. Server operation is set to false) The javascript is working correctly.
Issues:
1> I’m calling this javascript in dataBound event of the grid as suggested here by telerik support. However dataBound event is getting fired on each page change and sort. As per the documentation here it should get fired when widget is bound to dataSource. So I tried dataSource’s requestEnd event, but requestEnd event is also getting fired on each page change & sort. AGAIN, as per the documentation here it should only get fire when remote service request is finished.
2>I also noticed, when I view the page source in browser the grid has rows only for that particular page. So my javascript only finds check boxes for that page only.
So how do I implement select all check box column that will select all the check boxes and also maintain the states across paging and sorting? can someone please show some examples
$(function () {
$gridElement = $("#grid");
var kendoGrid = $gridElement.data("kendoGrid");
var dataSource = kendoGrid.dataSource;
kendoGrid.bind("dataBound", function (e)
{
configureSelectCheckBoxes($gridElement)
}
)
$("#btnSearch").click(function () {
kendoGrid.dataSource.read();
kendoGrid.refresh();
kendoGrid.dataSource.page(1);
})
function configureSelectCheckBoxes(grid) {
// attach click event to select all check box
grid.find("thead input:checkbox").click(
function () {
grid.find("td input:checkbox").prop("checked", $(this).prop("checked"));
}
);
// attach click event to individual check box
grid.find("tbody input:checkbox").click(
function () {
var checkedCount = grid.find("td input:checkbox:checked").length;
var totalCount = grid.find("td input:checkbox").length;
grid.find("th input:checkbox").prop("checked", checkedCount === totalCount);
}
);
}
})
@(Html.Kendo().Grid<
MVCPOC.Models.MyModel
>()
.Name("grid")
.Columns(col =>
{
col.Bound(p => p.ModelID)
.ClientTemplate("<
input
class
=
'chkbox'
type
=
'checkbox'
value
=
'#=ModelID#'
/>")
.HeaderTemplate("<
input
type
=
'checkbox'
id
=
'selectAll'
/>")
.Width(30)
.Sortable(false)
.Filterable(false);
col.Bound(p => p.StateProvinceCode);
col.Bound(p => p.EmailAddress);
})
.AutoBind(false)
.Pageable()
.Sortable()
.Scrollable(x => x.Height(300))
.HtmlAttributes(new { style = "height:500px" })
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
.PageSize(20)
.Read(read => read
.Action("GetData", "Grid")))
)