Hello every one,
first of all .. I'm using the tooltip with a scheduler...
I have a custom template for the ToolTip which shows few properties (Title, Time, Type, Room, . . . ). (see ToolTip_1.png)
some times Type or Room are null so I don't want them to be shown... I want to hide them somehow...
I tried to wrap the Div of the Room and Type with an if Statment so that if Room is null skip this part .. but it shows me an error all the time...
This is my Custom Template :
@(Html.Kendo().Tooltip()
.For(
"#scheduler"
)
//.Filter(".k-event:not(.k-event-drag-hint) > div, .k-task")
.Filter(
".k-event:not(:empty) > div, .k-task"
)
.Position(TooltipPosition.Right)
.Width(150)
.Events(e => { e.ContentLoad(
"ContentLoad_ToolTip"
);
e.Show(
"onShow_ToolTip"
);
})
.ContentTemplateId(
"tipTemplate"
)
)
<script id=
"tipTemplate"
type=
"text/x-kendo-template"
>
#var element = target.is(".k-task") ? target : target.parent();#
#var uid = element.attr("data-uid");#
#var scheduler = target.closest("[data-role=scheduler]").data("kendoScheduler");#
@*#var model = scheduler.occurrenceByUid(uid);#*@
#var model = scheduler ? scheduler.occurrenceByUid(uid) : null;#
#if(model){#
@*<strong>start:</strong> #=kendo.format(
'{0:d}'
, model.start)#
<br />
<strong>end :</strong> #=kendo.format(
'{0:d}'
, model.end)#
<br />*@
@*#
if
(#=model.Typ# !=
null
){*@
<strong style=
"text-align:left;@*color:white;*@"
>Typ:</strong> #=model.Typ#
<br />
@* } *@
<strong>Bemerkung:</strong> #=model.description#
<br />
@*<strong>CrmName:</strong> #=model.CrmUserName#
<br />*@
<strong>Raum:</strong> #=model.Raum#
<br />
@*<strong>Erfasser:</strong> #=model.ErfUser#
<br />
<strong>Zuletzt:</strong> #=model.LastUser#
<br />*@
<strong>Mitarbeiter:</strong> #=model.Initialen#
<br />
#} else {#
<strong>No
event
data
is
available.</strong>
#}#
</script>
Well, This is my main Question .. but I have another one...
HOW TO ADJUST THE WIDTH OF THE TOOLTIP? (see ToolTip_2.png)
OK, I am down to the last thing. I need to know how to grab what field (if any) that is being filtered in the Select Action of the controller. There has to be a property somewhere in the Filters object that has this? it is not like request.Sorts[0].Member, I thought it would be but it is not. Any assistance on this will be greatly appreciated.
Thanks.
I've installed lastest Kend version, locally everything work as expected, but when I've launched DevOps build, i receive errors like this
AspNetPreCompile:
C:\windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_compiler.exe -v / -p d:\a\8\s\Source\ABB.cBOL.Web.Application\obj\x64\Release\AspnetCompileMerge\Source -c d:\a\8\s\Source\ABB.cBOL.Web.Application\obj\x64\Release\AspnetCompileMerge\TempBuildDir
##[error]/Content/kendo/2020.1.406/ascx/String.ascx(1,0): Error ASPPARSE: Could not load type 'System.Web.Mvc.ViewUserControl<object>'.
95>/Content/kendo/2020.1.406/ascx/String.ascx(1): error ASPPARSE: Could not load type 'System.Web.Mvc.ViewUserControl<object>'.
Same error for all kendo ascx file. The issue is cause from ASP.NET precompilation, done with PrecompileBeforePublish msbuild parameter, after found issue on DevOps I've exactly same issue locally compiling with commad line and PrecompileBeforePublish argument.
Seams that for some reason, Asp:net precompialtion do not search dll in the right place (of course MVC is referenced)
Any idea about how to solve this issue?
Hello there, i seem to be having a problem with getting a currency filter to work, i am trying to truncate any number past the decimal point. so if i have $3,456.04 , it
should be $3,456. However, after i add the filter function, what is displayed is 3456.
Here is the index.cshtml
columns.Bound(e => e.EstimatedGrantedCost).Title(
"Est.<br>Granted<br>Cost"
).Width(23).HeaderHtmlAttributes(
new
{ style =
"text-align:right; font-weight:normal; font-size:80%"
}).HtmlAttributes(
new
{ @style =
"text-align:right; font-weight: normal; font-size:80%"
}).Filterable(x => x.UI(
"CurrencyFilter"
));
function
CurrencyFilter(e) {
//console.log("this is what was passed in:",e)
$(e).kendoNumericTextBox({format:
"c0"
});
}
thanks for your help.
Is it possible to have a dropdown in the popup edit screen instead of a text box. I have three fields that I require to be dropdown boxes. I am at my whits end why this seems so hard. Is there a easy to understand guide somewhere that explains how to do something lie this? I thought this would be the least issue making my application but it has turned into a nightmare. I was told to make a dropdown list (which I have done in another view), but I do not know where or how I need to place the control in the Grid.
Any help would be greatly appreciated.
On the start page, I have some buttons with the same design( they are ment to redirect to a aspx page) eg
<telerik:RadButton runat="server" ID="Button" NavigateUrl="Dest/Example.aspx"
Since latest chrome update (v 83), all requeste made are failing ( with status canceled). The initiator seems to be
}else{if(!e||e=="_self"){window.location.href=h;
(telerik resource)
Any idea on what could have caused this?
Lets say I have two objects:
A person can own many cars. The grid contains a list of people and each person has a "primary car" attribute. This is obviously a foreign key to the car object. However, the drop down list should only contain cars that belong to that person.
How do I accomplish this without doing something inefficient like:
public
ActionResult Index()
{
ViewData[
"cars"
] = w.Cars.GetAll();
}
I understand I can use an/a EditorTemplate/ClientTemplate. However, every example I've found online has the inefficient step above. If I have a controller method such as:
public
JsonResult GetCars([DataSourceRequest] DataSourceRequest request,
int
personId)
{
return
Json(w.GetCarsThatBelongToPerson(personId).ToDataSourceResult(request);
}
Can I not just use this controller method in the template as opposed to dumping the entire list of cars?
Thanks for reading!
Hi All,
I want to display an icon in the kendo grid at the last with click event functionality ,Kindly provide me a sample .Please find the attached screen shot how it should be.
Thanks & Regards,
Sampath
Hi ,
I am using the Filter row in my grid, it works fine if there are no client template. but if there are any client template it gives error.
@(Html.Kendo().Grid<Document>()
.SetDefaults()
.Name("gridDocuments")
.Groupable()
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Events(x => x.DataBinding("OnDataBound").Edit("EditGrid"))
.Columns(columns =>
{
columns.Bound(x=>x.CategoryCode).Filterable(false).ClientTemplate(#=data.CategoryDescription#").EditorTemplateName("CategoryTypeMultiselect");
columns.Bound(x => x.AssetTag).Filterable(ftb => ftb.Cell(cell => cell.Operator("contains").SuggestionOperator(FilterType.Contains)));
columns.Command(command =>
{
command.Edit().Text(" ").CancelText(" ").UpdateText(" ");
command.Custom("Del").Text("<span class='k-icon k-i-delete'></span>").Click("PageGridDelClicked");
}).Width("3%").HtmlAttributes(new { style = "text-align:center;background:#=RowColor#" });
})
.Selectable(selectable => selectable
.Mode(GridSelectionMode.Multiple).Type(GridSelectionType.Cell))
.Navigatable()
.Filterable(ftb => ftb.Mode(GridFilterMode.Row))
.DataSource(dataSource => dataSource
.SetDefaults()
.PageSize(20)
.Model(model =>
{
model.Id(p => p.Id);
model.Field(p => p.AssetTag).Editable(false);
model.Field(p => p.CategoryType).Editable(true);
})
.Read(x => x.Action("GetSelectedData", "Assets", new { CacheKey = PageUID }).Data("getAssetId"))
.Update(x => x.Action("UpdateDocuments", "Assets", new { CacheKey = PageUID }).Data("getAssetId"))))
if i enable filter for Categorycode i am getting error.
Please suggest me how to use the Filter row when we have ClientTemplate in the column.