Telerik Forums
UI for ASP.NET MVC Forum
1 answer
106 views
Hi Telerikains,

I have a grid with 6 columns and filtering active. The last column width is stretched to fill grid. However the filter control is not drawn correctly. Is there anything I can do to fix this?

@(Html.Kendo().Grid<WebUserViewModel>()
       .Name("WebUsersGrid")
       .HtmlAttributes(new { @class = "js-full-height-grid" })
       .Columns(columns =>
       {
           columns.Bound(c => c.Id).Title("").ClientTemplate(Html.BuildWebUserIcons<WebUserViewModel>(this.User, "WebUsersGrid")).Width(StyleValues.Grid.ThreeIconColWidth).Filterable(x => x.Enabled(false)).Sortable(false).HtmlAttributes(new { style = " text-align:center;" });
 
           columns.Bound(c => c.Id).Visible(false);
           columns.Bound(c => c.AccountId).Visible(false);
 
           columns.Bound(c => c.Active)
               .ClientTemplate(Html.ClientTemplate_ActiveImg())
               .Width(100)
               .HtmlAttributes(new { style = " text-align:center;" });
 
           columns.Bound(c => c.UserNameWithinAccount).Title("User Name").Filterable(filterable => filterable.UI("NameFilter")).Width(200);
           columns.Bound(c => c.FirstName).Width(200);
           columns.Bound(c => c.LastName).Width(200);
           columns.Bound(c => c.Email);
       })
       .ToolBar(toolbar =>
       {
           toolbar.Create().Text("Add Web User");
       })
       .Filterable(filterable => filterable
           .Extra(false)
           .Mode(GridFilterMode.Row)
           .Messages(x => x.IsFalse("N"))
           .Messages(x => x.IsTrue("Y"))
           .Operators(operators => operators
               .ForString(str => str.Clear()
                   .Contains("Contains")
                   .DoesNotContain("Does Not Contain")
                   .StartsWith("Starts with")
                   .IsEqualTo("Is equal to")
                   .IsNotEqualTo("Is not equal to")
               )
           )
       )       
       .Scrollable()
       .Sortable()
       .Pageable(pageable => pageable
           .Refresh(true)
           .PageSizes(true)
           .ButtonCount(5)
       )
   )

Thanks,

Paul Ridden
Top achievements
Rank 1
Veteran
 answered on 12 Mar 2015
1 answer
121 views
I have grid with a column bound like this...

cols.Bound(m => m.Location).Filterable(fl => fl.Cell(c => c.Template("locationFilter").Operator("equals").ShowOperators(false)));

and some javascript..

var locationList = [
                        {text: "Atlanta", value: "ATL"},
                        {text: "Houston", value: "HOU"},
        ];
function locationFilter(container) {
            container.element.kendoDropDownList({
                dataTextField: "text",
                dataValueField: "value",
                optionLabel: { text: "-ALL-", value: "" },
                dataSource: { data: locationList, },
            });
        }

This seems to initialize correctly showing '-ALL-' with no filter applied.  But as soon as I select something in the dropdownlist it immediately changes the selection back to "-ALL-" and filters out all the items.

However, if I change it to this and use strings for the data instead of objects, it lets me select items and applies the filters ok but the display isn't optimal...

function locationFilter(container) {
            container.element.kendoDropDownList({
                optionLabel: "-ALL-",
                dataSource: {data: ["ATL", "HOU"],},
            });
        }

Am I doing something wrong when trying to use objects in the datasource for the custom filter, or is there a bug?
Alexander Popov
Telerik team
 answered on 12 Mar 2015
6 answers
395 views
I have a Kendo scheduler template and on the template I want to give the user a multiple check box selection of work group data to choose from. I want to be able to bind the choices of work group data from a property on my model (ScheduleDataSource) which is the following: List<string> AllWorkgroups {get; set;}I then want the choice from the user to be saved in List<String> UserWorkgroups {get; set;} on the same model.Can someone please help with how to do this. Please note I am doing this in MVC ASPX. My current code is below:

<%=Html.Kendo().Scheduler<ASML_Scheduler.Models.ScheduleDataSource>()
.Name("scheduler")
.Date(DateTime.Now)
.StartTime(new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 7, 00, 00))
.Height(400)
.Editable(editable=>editable.TemplateId("editor"))

.DateHeaderTemplate("<p class='HeaderTemplate'>#=kendo.toString(date, 'ddd dd MMM')#</p>")
.MajorTimeHeaderTemplate("<p class='HeaderTemplate'>#=kendo.toString(date, 'H:mm' )#</p>")
.EventTemplateId("event-template")
.Views(views =>
{
views.DayView();
views.WeekView(weekView =>
{
weekView.Selected(true);
weekView.WorkDayCommand(false);
weekView.AllDaySlot(false);
});

views.MonthView();
})

.CurrentTimeMarker(true)
.Timezone("Etc/UTC")
.DataSource(d => d
.Model(m =>
{
m.Id(f => f.ScheduleId);
m.Field(f => f.Description).DefaultValue("No title");
m.Field(f => f.UserId).DefaultValue(1);
m.Field(f => f.End).DefaultValue(DateTime.Now);
m.Field(f => f.Workgroups);
})

.Read("Read", "Schedule")
.Create("Create", "Schedule")
.Destroy("Destroy", "Schedule")
.Update("Update", "Schedule")
.PageSize(600)

)
.GroupHeaderTemplate("<div style='color:blue'>" +
"</div>")
.Events(events =>
{
events.Edit("scheduler_edit");
})

%>

<script id="editor" type="text/x-kendo-template">

<input name="start" type="text" required data-type="date" data-role="datetimepicker" data-bind="value: start" />
<br />
<input name="end" type="text" id="datetimepickers" required data-type="date" data-role="datetimepicker" data-bind="value: end" />

</script>

I have a Kendo scheduler template and on the template I want to give the user a multiple check box selection of work group data to choose from. I want to be able to bind the choices of work group data from a property on my model (ScheduleDataSource) which is the following: List AllWorkgroups {get; set;}

I then want the choice from the user to be saved in List UserWorkgroups {get; set;} on the same model.

Can someone please help with how to do this. Please note I am doing this in MVC ASPX. My current code is below:

Vladimir Iliev
Telerik team
 answered on 12 Mar 2015
1 answer
334 views
I have a partial view in a Window. 

@model Umki2.Areas.Fbr.Models.FbrFitUp
 
 
            @(Html.Kendo().DatePicker()
              .Name("FitUpDate")
              .Value("10/10/2011")
              .HtmlAttributes(new { style = "width:150px" })
            )

From the main view, i open the window with jquery function.

function OpenFitUpForm(e) {
        e.preventDefault();
        var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
        var wnd = $("#PopUpForm").data("kendoWindow");
        $("#PopUpForm").kendoWindow({
            content: {
                url: "/wlb/wlbexplorer/_FitUpForm",
                data: { id: dataItem.Id },
            },
            width: 500,
            title: "FitUp Report",
            modal: true,
            visible: false,
            draggable: true,
        });
        wnd.center().open();
    }


But the result as seen in the attachment. 
Dimo
Telerik team
 answered on 12 Mar 2015
1 answer
385 views
Hello all

I have downloaded Open Street Maps Tile.

I would like to know whether i can build  Asp.Net MVC 4 Web Application and i want to load OSM Tiles downloaded locally.

The computer will not be connected to the Internet.

Can you please let us know on how to  implement  map control and load tiles from locally downloaded folder.

I would also like to know if i can trigger markers on particular lat and Long

Thanks
Suresh


T. Tsonev
Telerik team
 answered on 12 Mar 2015
12 answers
146 views
Hello,

Is there a way to not print a label on every chart bar, and just on every second or third perhaps?

Iliana Dyankova
Telerik team
 answered on 12 Mar 2015
1 answer
200 views
I would like to allow the user to insert new rows inline (but not edit existing rows). The left most column will contain a dropdown list and based on the selection from the dropdown list I would like to then populate the other 4 cells in the new row with specific values which can't be changed by the user? Is this possible
Daniel
Telerik team
 answered on 12 Mar 2015
3 answers
193 views
Using a standard scheduler I am attempting to assign multiple resources. However, on submit I am getting a javascript alert error telling me the "someNumber" is invalid, where some number is the Datavalue for resource RegionRes. ("1" is invalid, "2" is invalid. etc)
 
The following things happen:

The record is processed and inserting into the database.
The edit form does not close.
Upon cancelling out of the edit form the event does not appear on the schedule.
Upon refreshing no events will appear on the schedule.

However, deleting the the offending record(s) from the join table and refreshing the calendar all events appear again.

Here is the scheduler:
@(Html.Kendo().Scheduler<SchedulerViewModel>()
        .Name("scheduler")
        .Views(views =>
            {
                views.DayView();
                views.WeekView();
                views.MonthView(monthView => monthView.Selected(true));
            })
        .Resources(resource =>
                    {
                        resource.Add(r => r.RegionIds)
                            .Name("RegionsResource")
                            .Title("RegionsRes")
                            .DataTextField("RegionName")
                            .DataValueField("RegionId")
                            .Multiple(true)
                            .DataSource(source =>
                            {
                                source.Read(read => { read.Action("RegionDropDownList", "DropDownList"); });
                            });
 
                        resource.Add(v => v.VenueId)
                            .Name("VenuesResource")
                            .Title("VenueRes")
                            .DataTextField("VenueName")
                            .DataValueField("VenueId")
                            .BindTo((IEnumerable<VenueViewModel_DDL>)ViewData["Venues"]);
                    }
 
        )
        .DataSource(d => d.Model(m =>
            {
                m.Id(f => f.EventId);
                m.Field(f => f.Title).DefaultValue("No title");
                m.RecurrenceId(f => f.RecurrenceID);
                m.Field(f => f.IsAllDay).DefaultValue(false);
            })
            .Read("Read", "Scheduler")
            .Create("Create", "Scheduler")
            .Destroy("Destroy", "Scheduler")
            .Update("Update", "Scheduler")
            .Events(e => e.Error("error_handler"))
        )
        .Editable(true)
    )

I have also tried a bindto using viewdata to no avail.

It is just very odd that it will display the multiselect for edit and insert the event into the database but not display the event.

As usual any help would be appreciated.

Thanks,
Chris




























































































































































Chris
Top achievements
Rank 1
 answered on 11 Mar 2015
1 answer
355 views
I am passing an IEnumerable of viewmodels to the grid at load time.  My columns are bound to properties on the viewmodels, which are themselves different viewmodels.  Since I am not reading the data via AJAX, I would like to have the data sorted on the client-side.  I have .Sortable() called on the grid and .ServerOperation(false) called on the DataSource.  When I mouse over the column header, my browser displays a URL like: http://mysite/controller/action?gridName-sort=ColumnName-asc  When I click on the column header, the sort arrow appears, changes, or disappears, but the data is not reordered.  I tried implementing IComparable and IComparable<T> on my column viewmodel on a suggestion from another user, but this does not appear to work.  Can client-side sorting work in this scenario?  If so, what do I need to do?

Thanks,
Brian
Kiril Nikolov
Telerik team
 answered on 11 Mar 2015
1 answer
103 views
Hi,

We are evaluating the scheduler control for our application.
We need to add a checkbox on top of each day caption.Please see the attached image. Is there any options to do that?

Thanks,
Jazeel 
Vladimir Iliev
Telerik team
 answered on 11 Mar 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
AppBar
BottomNavigation
Card
FloatingActionButton
Licensing
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
DateTimePicker
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?