Telerik Forums
UI for ASP.NET MVC Forum
3 answers
203 views
Hello ,

I have Kendo modal window coming up on button click like this

 wnd = $("#Add").kendoWindow({

title: "test",

actions: ["Close"],

content: direction,

width: "800px",

height: "600px",

visible: false,
Draggable: false,

modal: true

}).data("kendoWindow");

}

//wnd.refresh(direction);

wnd.center();
wnd.resi = false;
wnd.open();

How can i stop window from resizing? draggable false do not help

Anamika
Kiril Nikolov
Telerik team
 answered on 12 May 2014
1 answer
932 views
Hello,

I have a popup modal window coming up ona  button click. I have Draggable false still when window Comes up i can drag and Change ist size. How can i stop this.
wnd = $("#Add").kendoWindow({

title: "test",

actions: ["Close"],

content: direction,

width: "800px",

height: "600px",

visible: false,
Draggable: false,

modal: true

}).data("kendoWindow");
wnd.center();
wnd.resi = false;
wnd.open();
Kiril Nikolov
Telerik team
 answered on 12 May 2014
9 answers
2.1K+ views
I have a Kendo MVC Grid. In which I have Pagination which is Server Event and a Filter Option which Calls the Read of the Grid. But when I Include a Grouping It say's a error in the Browser Console " Cannot readproperty 'length' ". I have tried the solutions given on the other forum threads.
1)Giving .ServerOperation(false) which makes Pagination and Filtration nonfunctional. But  I need .ServerOperation(true) to make my Pagination and Filtration to work.
The code is below :

#######################Kendo Grid#############################

 @(Html.Kendo().Grid(Model.UpcomingMilestone)
                                                          .Name("grd_UpcomingMilestone")
                                                          
                                                          .Columns(columns =>
                                                          {
                                                              columns.Bound(c => c.ProjectName).Title("Project Name").Groupable(false);
                                                              columns.Bound(c => c.NextMilestone).Title("Next Milestone Name").Groupable(false);
                                                              columns.Bound(c => c.NextMilestoneDate).Title("Next Milestone Date").ClientTemplate("#= kendo.toString(NextMilestoneDate, \"MM/dd/yyyy\") #").Groupable(false);
                                                              columns.Bound(c => c.ProjectManagerName).Title("Project Manager Name").Groupable(false);
                                                              columns.Bound(c => c.TeamLeadName).Title("Team Lead Name").Groupable(false);
                                                              columns.Bound(c => c.WeekStartDate).ClientTemplate("#= kendo.toString(WeekStartDate, \"MM/dd/yyyy\") #");
                                                          })
                                                                  .Pageable(pageable => pageable
                                                                    .Refresh(true)                                                                   
                                                                    .ButtonCount(5)) // Enable paging
                                                                    //.Groupable()
                                                                  .HtmlAttributes(new { @class = "grd_UpcomingMilestone" })
                                                                  .DataSource(dataSource => dataSource // Configure the grid data source
                                                                      .Ajax() // Specify that ajax binding is used
                                                                      .Read(read => read.Data("filterGridParams").Action("FilteredUpcomingMilestone", "UpcomingMilestone"))// Set the action method which will return the data in JSON format                                                                        
                                                                      .PageSize(10)
                                                                                              //.Group(group => group.Add(c => c.WeekStartDate))
                                                                                              //.ServerOperation(false)
                                                                   )

                                                        )
###############################Filter Expression###############################################
function filterGridParams() {

                return {
                    TeamLeadPersonId: $("#ddlTeamLead").data("kendoDropDownList").value(),
                    ProjectManagerPersonId: $("#ddlProjectManager").data("kendoDropDownList").value()
                };
            }
#################################Button Click For Filteration##########################################
<input id="GoButton" onclick="fun_FilteredUpcomingMilestone()" type="button" class="GoButton" value="Go" />
function fun_FilteredUpcomingMilestone() {

       
        UpdateHiddenFieldValues();      
        //call the read method of the Grid, with Parameters and set the page Index to one
        var grd_UpcomingMilestone = $("#grd_UpcomingMilestone").data("kendoGrid");
        grd_UpcomingMilestone.dataSource.page(1);
       
    }
###############################Action #################################
public ActionResult FilteredUpcomingMilestone([DataSourceRequest] DataSourceRequest request, string TeamLeadPersonId, string ProjectManagerPersonId)
        {

              var UpcomingMilestoneModel = new UpcomingMilestoneModel();
             var upcomingMilestoneModel = new PagedDataResult<UpcomingMilestoneData>();

            if (UpcomingMilestoneModel.FirstTimeLoad)
            {
                //First time call, do not load the data
                UpcomingMilestoneModel.UpcomingMilestone = new List<UpcomingMilestoneData>();
              
            }
            else
            {
                //Load the data, for other events
                upcomingMilestoneModel = UpcomingDAL.GetUpcomingMilestoneData (request.ToPageDataInfo<UpcomingMilestoneData>(), TeamLeadPersonId, ProjectManagerPersonId);

                UpcomingMilestoneModel.UpcomingMilestone = upcomingMilestoneModel.ResultList;

               
            }           

           
            UpcomingMilestoneModel.FirstTimeLoad = false;

            return Json(new DataSourceResult
            {
                Data = UpcomingMilestoneModel.UpcomingMilestone, // Process data (paging and sorting applied)
                Total = upcomingMilestoneModel.TotalRecords // Total number of records
               
            });


           

         





        }







































Dhaval
Top achievements
Rank 1
 answered on 12 May 2014
3 answers
459 views
My data is currently being bound using the TreeViewItemModel, is there any way to set the SpriteCssClasses for the items from the controller?
Petur Subev
Telerik team
 answered on 12 May 2014
6 answers
350 views
Hi,

View, Insert, update work fine however I cannot get the delete to work exception [The instance is transient]. I copied the code from an example.

See attached file.

Thanks
Mark Brewer
MarkBr
Top achievements
Rank 2
 answered on 10 May 2014
4 answers
212 views
Hi there,

I have two html.listboxfor, and need to swap data between them. Is there any way to make them draggable so that the user can drag and drop items in these two lists. Any help is much appreciated. Thanks.
Petyo
Telerik team
 answered on 10 May 2014
0 answers
209 views
Hi,

I thought I'd post this solution here to an issue I was having regarding json strings being to large for return from an MVC endpoint using Kendo Grid and ajax/json/datasourceresult as per a grid (or listivew et al) Read endpoint for ajax:

Instead of doing the following (as per usual):

return Json(dataSourceResult);

use this instead:

return new JsonResult() {
  Data = dataSourceResult,
  ContentType = "application/json",
  ContentEncoding = System.Text.Encoding.UTF8,
  JsonRequestBehavior = JsonRequestBehavior.AllowGet,
  MaxJsonLength = Int32.MaxValue
};

The solution above does not require any web.config changes et al.

Regards,

Rene Pilon
Rene
Top achievements
Rank 1
 asked on 09 May 2014
9 answers
2.9K+ views
I'm trying to set up a pie chart.  When I set the width of the ChartArea to a pixel based value it's fine but when I set it to a percentage value it doesn't work.

            @(Html.Kendo().Chart()
                  .ChartArea(c => c.Background("#DAECF4"))
                  .HtmlAttributes(new { style = "margin:0 auto;border:none; width: 100%;" })
                  .Name("chart").......(rest of code omitted)

When I look at the HTML in Firebug I see that it has created a div called chart with a width of 100% but the child svg element has a width of 100px - which means it doesn't display correctly.  Whatever I change the percentage width to, I get the svg element width of that amount in pixels instead of percent e.g. 90% ->90px.

Anyone got any ideas?  Does this control support percentage widths?  
Vyn
Top achievements
Rank 1
 answered on 09 May 2014
3 answers
289 views
Hi,

I am using Kendo Scheduler to show the appointments. I have appointment creation/edition screen. I want to redirect it to that page whenever user tries to add/modify an appointment/ Recurring  appointment  from Scheduler. I want to hide the Edit Recurring Item popup message in KendoUI Scheduler while editing recurring appointment as I want to edit the whole series instead of editing single occurrence. So whenever user tries to edit recurring appointment, i want to redirect it to appointment editing screen with all the details without showing any message.

Thanks,
Raghu.
Alexander Popov
Telerik team
 answered on 09 May 2014
3 answers
183 views
Hi,

I am trying to configure a scheduler.

I want to customise each day in the 'month' view, to work with my datasource.
for example: if i want to add a div with the background black or blue then it depends on the field "title" in my datasource etc...

I am having problems configuring my datasource. For some reason I do not see the data returned from the server appearing on my scheduler.

I am tearing out my hair !!!!

Attached it the code I am using for reference.

Please help !!! Where am I going wrong?

Thanks,

Jack.







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


    @*<span class='k-link k-nav-day'>#=kendo.toString(date, 'dd')#</span>*@
    <div>dddd</div>
    <div>#: title #</div>
</script>


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


    <div>#: title #</div>
<h3>aaaa</h3>
<p>
   <label>Title: <input name="title" /></label>
</p>
<p>
   <label>Start: <input data-role="datetimepicker" name="start" /></label>
</p>
<p>
   <label>Start: <input data-role="datetimepicker" name="end" /></label>
</p>
</script>




<script>
    var tempContent = $("#editor").html();
    var template = kendo.template(tempContent);


    $("#scheduler").kendoScheduler({
            date: new Date(2014, 4, 2, 0, 0, 0, 0),
            startTime: new Date("2014/6/13 00:00 AM"),
            //height: 600,
            views: [
                {
                    type: "day",
                    dateHeaderTemplate: kendo.template("<u>#=kendo.toString(date,'d')#</u>")
                },
                {
                    type: "month",
                    dayTemplate: kendo.template("<span class='k-link k-nav-day'>#=kendo.toString(date, 'dd')#</span><div>aaaa</div>")/*template(template)*/,
                    dayHeaderTemplate: kendo.template("<u>#=kendo.toString(date,'ddd')#</u>")
                    
                }
            ],
            selectable:true,
            timezone: "Etc/UTC",
            //dataSource: [
            //{
            //    id:1,
            //    title: "Fast and furious 6",
            //    image: "../../content/web/scheduler/fast-and-furious.jpg",
            //    imdb: "http://www.imdb.com/title/tt1905041/",
            //    start: new Date("2014/6/13 17:00"),
            //    end: new Date("2014/6/13 18:30")
            //},
            //{
            //    id:2,
            //    title: "The Internship",
            //    image: "../../content/web/scheduler/the-internship.jpg",
            //    imdb: "http://www.imdb.com/title/tt2234155/",
            //    start: new Date("2014/6/14 14:00"),
            //    end: new Date("2014/6/14 15:30")
            //}
            //],
            editable: {
                template: $("#editor2").html()
            },


            dataSource: {
                batch: true,
                transport: {
                    read: {
                        url: "@Url.Action("Read","OmittedDaysScheduler",new { brnEntID=ViewBag.BranchEntityID})",
                        dataType: "jsonp"
                    },
                    update: {
                        url: "@Url.Action("Update","OmittedDaysScheduler")",
                        dataType: "jsonp"


                    },
                    create: {
                        url: "@Url.Action("Create","OmittedDaysScheduler")",
                        dataType: "jsonp"


                    },
                    destroy: {
                        url: "@Url.Action("Destroy","OmittedDaysScheduler")",
                        dataType: "jsonp"


                    },
                    parameterMap: function (options, operation) {
                        if (operation !== "read" && options.models) {
                            return { models: kendo.stringify(options.models) };
                        }
                    }
                },
                schema: {
                    model: {
                        id: { type: "number", from: "ID" },
                        fields: {
                            taskId: {from: "ID", type: "number"},
                            title: { from: "Title", defaultValue: "No title" },
                            start: { type: "date", from: "Start" },
                            end: { type: "date", from: "End" },
                            startTimezone: { from: "StartTimezone" },
                            endTimezone: { from: "EndTimezone" },
                            description: { from: "Description" },
                            recurrenceId: { from: "RecurrenceID" },
                            recurrenceRule: { from: "RecurrenceRule" },
                            recurrenceException: { from: "RecurrenceException" },
                            isAllDay: { type: "boolean", from: "IsAllDay" }
                        }
                    }
                }
            }
        });
</script>


Here is the server response:

{"Data":[{"ID":6,"Description":null,"End":"\/Date(1396818000000)\/","EndTimezone":"UTC","IsAllDay":false,"RecurrenceException":"excep","RecurrenceRule":"rule","Start":"\/Date(1396818000000)\/","StartTimezone":"UTC","Title":"Number 1","TimeFrom":null,"TimeTo":null},{"ID":3,"Description":null,"End":"\/Date(1396339200000)\/","EndTimezone":"UTC","IsAllDay":false,"RecurrenceException":"excep","RecurrenceRule":"rule","Start":"\/Date(1396332000000)\/","StartTimezone":"UTC","Title":"Number 2","TimeFrom":{"Hours":7,"Minutes":39,"Seconds":0,"Milliseconds":0,"Ticks":275400000000,"Days":0,"TotalDays":0.31875,"TotalHours":7.6499999999999995,"TotalMilliseconds":27540000,"TotalMinutes":459,"TotalSeconds":27540},"TimeTo":{"Hours":9,"Minutes":39,"Seconds":0,"Milliseconds":0,"Ticks":347400000000,"Days":0,"TotalDays":0.40208333333333329,"TotalHours":9.65,"TotalMilliseconds":34740000,"TotalMinutes":579,"TotalSeconds":34740}}],"Total":2,"AggregateResults":null,"Errors":null}








Alexander Popov
Telerik team
 answered on 09 May 2014
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
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
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
Security
ColorPicker
DateRangePicker
Wizard
Styling
Chat
DateInput
MediaPlayer
TileLayout
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
DropDownButton
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
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
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
LLM Kit
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?