Greetings,
I have a problem occurring when I add a tooltip to an anchor in a grid cell. The column widths are ignored and rendered spaced evenly when I explicitly set their width in the grid config.
I have a grid defined as follows:
I need to attach a popup to column1's hyperlink. I am doing this in the load function as follows:
I narrowed down a problem to the code I added for the tooltip above. When I remove it my columns are rendered with the with I set in the configuration. When I add the popup code then the columns become evenly spaced with a ellipse on column overflows.
Any Ideas?
I have a problem occurring when I add a tooltip to an anchor in a grid cell. The column widths are ignored and rendered spaced evenly when I explicitly set their width in the grid config.
I have a grid defined as follows:
@(Html.Kendo().Grid<SomeCollection>()
.Name(
"grdTest"
)
.Columns(columns =>
{
columns.Bound(t => t.Column1).Width(25).Title(
"Column1"
)
.ClientTemplate("#if(Param1!=null){# <a class='locationLink' href='javascript:void(0)'data-param1='#=Param1#' data-param2='#=Param2#'>#=Column1#</span> #} else {##}#");
columns.Bound(t => t.Column2).Width(100).Title(
"Column2"
);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(100)
.Read(read => read.Action(
"MyMethod"
,
"MyController"
, @Model))
.ServerOperation(
true
)
)
.Pageable()
.Scrollable(s => s.Height(
"auto"
))
.Reorderable(reorder => reorder.Columns(
true
))
.Resizable(resize => resize.Columns(
true
))
.Sortable(sort => sort.SortMode(GridSortMode.MultipleColumn).AllowUnsort(
true
))
.Navigatable()
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
.Sortable()
)
I need to attach a popup to column1's hyperlink. I am doing this in the load function as follows:
<script type=
"text/javascript"
>
$(document).ready(
function
() {
var
grid = $(
"#grdTest"
).kendoGrid().data(
"kendoGrid"
);
grid.table.kendoTooltip({
filter:
"a.locationLink"
,
position:
"top"
,
width: 500,
height: 250,
content: {
url:
'@Url.Action("PopupViewContentMethod","Controller")'
},
requestStart:
function
(e) {
e.options.data = {
parameter1: $(e.target[0]).attr(
"data-parameter1"
),
paremeter2: $(e.target[0]).attr(
"data-parameter2"
)
}
}
});
});
</script>
I narrowed down a problem to the code I added for the tooltip above. When I remove it my columns are rendered with the with I set in the configuration. When I add the popup code then the columns become evenly spaced with a ellipse on column overflows.
Any Ideas?