Hello,
I have a custom Template Editor and i want to place the items next to each other in the Editor.
after 2 days searching for an answer .. i did this :
i changed the width of the container and the Window in the scheduler_Editor.Edit()
e.container.find('.k-edit-form-container').css("width", "900px");
e.container.closest('.k-window').css("width", "900px");
e.container.closest('.k-window').css("height", "750px");
then i gave every Item a css style:
style="float:left; position:relative;left:400px;top:110px;"
so now it's not responsive (which is normal after adding that style).
but this, i can solve by doing some css tricks or if you guys have a better way , please tell me.
The real Problem that i haven't found an answer for, is that now i have scroll bars in the Editor !!
and i want to get rid of them but i can't find anyway online !
i'll attach a picture of how the Editor looks like now
So i need to know how to hide these scroll bars and how to prevent User to scroll in the Editor !
Thanks in advance
Hi,
I have searched with no luck so far if it is possible to scroll (with horizontal and vertical scrollbars) a large diagram.
thanks for any help
Ray
Hello,
We used Kendo controls in our MVC project. For security reasons, we need conditional disable the Grid export functionality in server side code. Does anyone have an idea for that? Thanks in advance.
The filter for a DateTime column of an ASP.NET MVC grid is in the US format of MM/DD/YYYY HH:MM. I would like the date to be shown in the UK format of DD/MM/YYYY. I have seen similar requests, but these are from 2013.
Are there any newer approaches to getting the filter to show the date format as DD/MM/YYYY?
Regards,
Shawn
Hello. I'm having some trouble getting the new grid search panel to work. The example on the demos is pretty basic and doesn't have much info.
I can get the control to work if I specify which field to search ie: Search(s => { s.Fields("myField"); })
However, my datasource has datetime column and I get an exception when trying to seach all columns.
I get this error: The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.
Can you provide a sample or update the demo to include how to handle datetime fields?
Hello -
Kendo window closes when clicking anywhere outside the window .
Can this be prevented and make sure window closes only on close button(or any other specific button)
Thanks
Suresh
@(Html.Kendo().Window()
.Name("loginWindow") //The name of the window is mandatory. It specifies the "id" attribute of the widget.
.Title("Login") //set the title of the window
.Content(@<
text
>
@Html.Partial("_LoginPartial")
</
text
>)
.Draggable() //Enable dragging of the window
.Width(300)
.Height(350)
.Modal(true)
.Visible(false)
)
@model NTC.PropertySearch.Models.LoginModel
@{
ViewBag.Title = "Log in";
}
<
section
id
=
"loginWindow"
>
@using (Ajax.BeginForm("Login", "Account", new AjaxOptions { InsertionMode = InsertionMode.Replace, UpdateTargetId = "loginSection", }))
{
<
div
id
=
"loginSection"
>
@ViewBag.Title
<
div
>
<
p
>
@Html.DisplayFor(m => m.Message)
</
p
>
<
p
>
@Html.DisplayFor(m => m.NumberOfLoginAttempts)
</
p
>
</
div
>
<
table
>
<
tr
>
<
td
>@Html.LabelFor(m => m.UserName)
</
td
>
</
tr
>
<
tr
>
<
td
>
@Html.TextBoxFor(m => m.UserName)
</
td
>
</
tr
>
<
tr
>
<
td
>
@Html.ValidationMessageFor(m => m.UserName)
</
td
>
</
tr
>
<
tr
>
<
td
>
@Html.LabelFor(m => m.Password)
</
td
>
</
tr
>
<
tr
>
<
td
>
@Html.PasswordFor(m => m.Password)
</
td
>
</
tr
>
<
tr
>
<
td
>
@Html.ValidationMessageFor(m => m.Password)
</
td
>
</
tr
>
<
tr
>
<
td
>
@Html.CheckBoxFor(m => m.RememberMe)
@Html.LabelFor(m => m.RememberMe, new { @class = "checkbox" })
</
td
>
</
tr
>
</
table
>
<
input
type
=
"submit"
value
=
"Log in"
/>
</
div
>
}
</
section
>
:
public
static
class
Extensions
{
public
static
List<FilterDescriptor> ToFilterDescriptor(
this
IList<IFilterDescriptor> filters)
{
var result =
new
List<FilterDescriptor>();
if
(filters.Any())
{
foreach
(var filter
in
filters)
{
var descriptor = filter
as
FilterDescriptor;
if
(descriptor !=
null
)
{
result.Add(descriptor);
}
else
{
var compositeFilterDescriptor= filter
as
CompositeFilterDescriptor;
if
(compositeFilterDescriptor!=
null
)
{
result.AddRange(compositeFilterDescriptor.FilterDescriptors.ToFilterDescriptor());
}
}
}
}
return
result;
}
}
In Use:
public
ActionResult List([DataSourceRequest] DataSourceRequest request)
{
var departments=
new
List<
int
?>();
var nRequest =
new
DataSourceRequest
{
Groups = request.Groups,
Aggregates = request.Aggregates,
Page = request.Page,
PageSize = request.PageSize,
Sorts = request.Sorts,
Filters =
new
List<IFilterDescriptor>()
};
if
(request.Filters.Any())
{
foreach
(var fdc
in
request.Filters.ToFilterDescriptor())
{
switch
(fdc.Member)
{
case
"DepartmentId"
:
var department = Convert.ToInt32(fdc.Value);
departments.AddRange(db.StoredProcedureToTakeDepartmentsTree(department).Select(o => o.Id));
break
;
default
:
nRequest.Filters.Add(
new
FilterDescriptor
{
Member = fdc.Member,
MemberType = fdc.MemberType,
Operator = fdc.Operator,
Value = fdc.Value
});
break
;
}
}
}
if
(!departments.Any())
{
//departments = default departments if it's empty
}
var model = db.Students.Where(o => departments.Contains(o.DepartmentId))
.Select(o =>
new
{
o.Id
//Some columns
})
return
Json(model.ToDataSourceResult(nRequest), JsonRequestBehavior.AllowGet);
}
I hope it helps...
Best Regards
Hi,
I have a requirement like in a single grid there are 3 header section with common column field.
In each header section user needs to add new row to give input and save.
Please let me know can we design the above requirement with kendo grid?
Thanks in advance.
Is there a difference between using "#=" and "#:" when blocking references in my column bindings? They both seem to work for me, and I wanted to make sure one isn't preferred over the other for certain situations. Thank you.
columns.Bound(prac => prac.PractitionerId).ClientTemplate(
"<input type='checkbox' name='chkPractitioner' value='#= PractitionerId #' onclick='handleProviderSelected(this,#= LocationId #)' />"
).Width(45).HeaderTemplate(
" "
);