I would like to display data in a popup window or tooltip when users hover over or click on a cell in the Telerik grid. I tried using the Telerik tooltip, however the tooltip doesn't display at all. I also tried the jquery and bootstrap tooltips, but they do not work as well. When I use the tooltips for an element outside of the grid, they work fine. Does anyone have a razor example for using the Telerik tooltip in a grid? Also, are there other ways to approach this? Essentially, I want to display a small popup window with a table of additional information related to one specific cell in each row of the table.
Hi There,
I have a situation where I will have to do many same pages with the same Grid columns and functionality, but it will have a bit different dataSource I will have to read from the backend controller. Is there a way I can template the Grid itself and reuse it but be able to switch the dataSource?
For example.
@(Html.Kendo().Grid<
Kendo.Mvc.Examples.Models.CustomerViewModel
>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.ContactName).ClientTemplate(
@"<
div
class
=
'customer-photo'
style
=
'background-image: url(../content/web/Customers/#:data.CustomerID#.jpg);'
></
div
>
<
div
class
=
'customer-name'
>#: ContactName #</
div
>")
.Width(240);
columns.Bound(c => c.ContactTitle);
columns.Bound(c => c.CompanyName);
columns.Bound(c => c.Country).Width(150);
})
.HtmlAttributes(new { style = "height: 550px;" })
.Scrollable()
.Groupable()
.Sortable()
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Customers_Read", "Grid"))
.PageSize(20)
)
)
I want the
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Customers_Read", "Grid"))
.PageSize(20)
)
Customers_Read to be switched to OldCustomers_Read
or NewCustomers_Read
or CustomersEtc_Read
But I don't want to copy everything of the Grid over and over.
How can I do this?
Thank You
Hi,
I have a grid with a remarks column in which I want to be able to edit the complete multiline datafield. I have this working with
[DataType(DataType.MultilineText)]
But I only want to show 3 lines and not the complete text. If I go into edit mode the complete text should be visible of course
A nice to have would be if it is dynamic, so if I change the size of the column the text also changes.
I have attached two pictures with what I want.
Maurice
I have an editor that is used in our CMS system. Some pages have javascript snippets which the content managers sometimes need to modify.
Currently when clicking the editor's "View HTML" button, none of the script tags are displayed (only the html)
Is there a way to get the editor to display the script tags in "View HTML"?
I've seen several examples of implementing a CheckAll checkbox column header, but I've only seen it implemented in a grid that has a column bound to a boolean field/property. Unfortunately this doesn't really help me. I have a grid bound to a list of data entities but in place of the row number (or ID field), I am displaying a checkbox. I'd like to have a checkbox in the column header for that row that will check all the checkboxes in that column. Every example I've seen modifies the datasource, or the underlying object... changing a boolean field from false to true to check it. But since my checkboxes are not actually bound to a boolean field, how can I accomplish this same thing?
Not that it's pertinent, but I'm displaying a list of documents in this grid, allowing the user to select individual ones that will then send the row IDs to an MVC controller for zipping up the documents into a ZIP file for download. So it's more of a selection type checkbox as opposed to denoting a boolean true or false.
I have the appropriate javascript function for getting the checked checkboxes, just need a way to check all for ease of use.
I'm needing to be able to print a web page so I'm trying to use the pdf processing. It is an MVC5 and using Visual Studio 2015 I was trying to complete the telerik example at http://demos.telerik.com/aspnet-mvc/pdfprocessing/index . I started by creating a new telerik mvc application and just an index page. I added references Telerik.Windows.Documents.Fixed,
Telerik.Windows.Documents.FormatProfiders.Pdf and
Telerik.Windows.zip.
when I tried adding the using statements in my controller page it does not recognize the .Export statement.
using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export;
the error is Error CS0234
The type or namespace name 'Export' does not exist in the namespace 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf' (are you missing an assembly reference?)
I tried this because I got the same error trying to add this in the real application I have that I need to convert the web page to a pdf.
So what am I missing.
Hello
I have a scheduler that I'm grouping on a resource; rooms. When I filter the scheduler on rooms, I want to hide the groups of rooms that are not selected in the filter.
I have looked at this example, but I don't get it to work. The filering part works as intended, but not the hiding of the filtered rooms. I will post, what I think is all relevant parts of my code. If you need more info please ask me to provide it. (IE Alex, Bob and Charlie from the link are the corresponding entities to my rooms)
First, the grouping and resource binding part of the scheduler:
.Group(group => { group.Resources("Room"); })
.Resources(resource => resource.Add(m => m.roomId)
.Title("Room")
.Name("Room")
.DataTextField("name")
.DataValueField("id")
.DataColorField("Color")
.DataSource(ds => ds.Read("GetRooms", "Home")))
Then the function for viewing only selected rooms:
function
viewRoom() {
var
checked = $.map($(
"#factories :checked"
),
function
(dropdown) {
return
parseInt($(dropdown).val());
});
var
filter = {
logic:
"or"
,
filters: $.map(checked,
function
(value) {
return
{
operator:
"eq"
,
field:
"roomId"
,
value: value
};
})
};
var
scheduler = $(
"#scheduler"
).data(
"kendoScheduler"
);
scheduler.dataSource.filter(filter);
scheduler.view(scheduler.view().name);
}
From what I understand this row should update the view with only the selected rooms visibible in the scheduler, but it doesn't:
scheduler.view(scheduler.view().name);
Can anyone see what I'm doing wrong?
BR
Jonas
Hello,
I've a custom validator that is validating a custom popup editor template in a grid.
The problem I'm facing is that when I set a value in a NumericTextBoxFor() field and the validator fails (return false) then the value isn't written in the popup editor's model so when I write in the same field the value I had previously written the validator's message isn't hidden.
Example:
How can I solve this problem?
Thank you.