Telerik Forums
Kendo UI for jQuery Forum
2 answers
767 views

Hi There,

I have an issue with date formatting in scheduler. I need to change the recurrence end date to have same format as the start and end date. I have attached a screen shot from my work where the end date highlighted in green.

Below is the script template use for the popup window:

 

<script type="text/x-kendo-template" id="CustomEditorTemplate">
     <style type="text/css">
        label{
            font-weight: normal;
            font-family: arial;
        }
        .k-recur-weekday-checkbox{
            margin-right: 0 !important;
        }
        
        
    </style>

    <div class="k-edit-label">
        <label  for="Start">Start</label>
    </div>
    <div data-container-for="start" class="k-edit-field">
        <input name="start" required="required" style="z-index: inherit;" type="datetime"
            data-bind="value:start,invisible:isAllDay" 
            data-format="dd-MMM-yyyy h:mm tt" 
            data-role="datetimepicker" />

        <input name="start" required="required" type="date" style="z-index: inherit;"
            data-bind="value:start,visible:isAllDay"
            data-format="dd-MMM-yyyy"
            data-role="datepicker" />

        <span data-bind="text: startTimezone"></span>
        <span data-for="start" class="k-invalid-msg"></span>
    </div>

    <div class="k-edit-label">
        <label for="End">End</label>
    </div>
    <div data-container-for="end" class="k-edit-field">

        <input name="end" required="required" style="z-index: inherit;" type="datetime"
            data-bind="value:end,invisible:isAllDay" 
            data-format="dd-MMM-yyyy h:mm tt" 
            data-role="datetimepicker" />

        <input name="end" required="required" type="date" style="z-index: inherit;"
            data-bind="value:end,visible:isAllDay"
            data-format="dd-MMM-yyyy"
            data-role="datepicker" />

        <span data-bind="text: endTimezone"></span>
        <span data-for="end" class="k-invalid-msg"></span>
    </div>

    <div class="k-edit-label">
        <label for="IsAllDay">All Day?</label>
    </div>
    <div data-container-for="isAllDay" class="k-edit-field">
        <input data-bind="checked:isAllDay" name="IsAllDay" type="checkbox" value="true" />
    </div>  
    
    <div class="k-edit-label">
        <label for="Type">Type</label>
    </div>
    
    <div data-container-for="Type" class="k-edit-field">
        <div id="resourcesContainer">        
        </div>
    </div>

    <div class="k-edit-label">
        <label for="recurrenceRule">Repeat</label>
    </div>
    <div data-container-for="recurrenceRule" class="k-edit-field">
        <div data-bind="value:recurrenceRule" id="recurrenceRule" name="recurrenceRule" data-role="recurrenceeditor"></div>
    </div>

    <div class="k-edit-label">
        <label for="description">Description</label>
    </div>
    <div data-container-for="description" class="k-edit-field">
        <textarea class="k-textbox" cols="18" data-bind="value:description" id="description" name="description" rows="1">
    </textarea>
    </div>

    

     <script>
       jQuery(function() {
            var container = jQuery("\#resourcesContainer");
            var resources = jQuery("\#scheduler").data("kendoScheduler").resources;
            
            for( resource = 0; resource<resources.length; resource++) 
            { 
                if(resources[resource].multiple)
                {
                   jQuery(kendo.format('<select data-bind="value: {0}" name="{0}">', resources[resource].field))
                     .appendTo(container)
                     .kendoMultiSelect({
                         dataTextField: resources[resource].dataTextField,
                         dataValueField: resources[resource].dataValueField,
                         dataSource: resources[resource].dataSource,
                         valuePrimitive: resources[resource].valuePrimitive,
                         itemTemplate: kendo.format('<span class="k-scheduler-mark" style="background-color:\#= data.{0}?{0}:"none" \#"></span>\#={1}\#', resources[resource].dataColorField, resources[resource].dataTextField),
                         tagTemplate: kendo.format('<span class="k-scheduler-mark" style="background-color:\#= data.{0}?{0}:"none" \#"></span>\#={1}\#', resources[resource].dataColorField, resources[resource].dataTextField)
                     });
            
                } else {
                   jQuery(kendo.format('<select data-bind="value: {0}" name="{0}">', resources[resource].field))
                    .appendTo(container)
                    .kendoDropDownList({
                        dataTextField: resources[resource].dataTextField,
                        dataValueField: resources[resource].dataValueField,
                        dataSource: resources[resource].dataSource,
                        valuePrimitive: resources[resource].valuePrimitive,
                        optionLabel: "None",
                        template: kendo.format('<span class="k-scheduler-mark" style="background-color:\#= data.{0}?{0}:"none" \#"></span>\#={1}\#', resources[resource].dataColorField, resources[resource].dataTextField)
                     }); 
                }
            }     
        })        
    <\/script>
</script>

 

I tried to add kendo culture but no luck.

Could please someone help me to change it?

Thanks.

Benjamin
Top achievements
Rank 1
 answered on 26 May 2015
3 answers
2.2K+ views
I have a MultiSelect bound via Ajax to a server controller. The MultiSelect properly shows the server data
and provides filter criteria from the keyboard. But when the control is initialized, if I provide values to it they are not visible until after I click inside the Multiselect control. If I provide a value for the Placeholder text, only the first tow characters of it are displayed until I click on the control. After selecting the control, the initial values are displayed and it all works as expected. The control is defined with an Mvc helper, the ViewBag.TagArray in the snippet below is a string array with the values that should be displayed as already selected.

thanks in advance for any help

@(Html.Kendo().MultiSelect()
               .Name("ajaxTags")
               .Placeholder("Select tags...")
               .AutoBind(false)
               .DataTextField("Subject")
               .DataValueField("Name")
               .Filter("contains")  
               .DataSource(source =>
                {
                   source.Read(read =>
                   {
                       read.Action("AjaxGetTags", "Tag"); 
                   });
                   source.ServerFiltering(true);
                   source.Events(events => events.Error("kendoOnError"));
                })
               .HtmlAttributes(new { style = "width: 99%;" })
               .Value(ViewBag.TagArray)
               )
Georgi Krustev
Telerik team
 answered on 25 May 2015
2 answers
544 views

I am a newbie with Kendo and trying to wrap my head around the grid control. Here is what i am trying to accomplish. 

Create a grid to add new records(these will not be sent back to the server at this time)

Be able to delete or edit the records added.

Bound these records with a model

The information on the view will be passed to through the session to a different page and then submitted to the server. The problem i am having is i am only able to add one record. I enter the information and click on add new record again and it wipes out the one i created.

I have attached a pic of how my grid looks like.

Below is my code for the grid. Since i am not passing info to the server i just created dummy create and destroy actions and controller.

 

@(Html.Kendo().Grid<HSBEnrollment.Models.EnrollAccountData>()
    .Name("grid")
    .AutoBind(false)

    .Scrollable(scr => scr.Height(350)) 
    .Editable(editable => editable.CreateAt(GridInsertRowPosition.Top))
    .ToolBar(tbar => tbar.Create())
    .Columns(c => {
        c.Bound(m => m.EnrollAccountsId).Width(150);
        c.Bound(m => m.AccountNum).Width(150);
        c.Bound(m => m.AccountTypeId).Width(150);
        c.Command(command => {  command.Destroy(); }).Width(100);
    })
              
    .DataSource(dataSource => dataSource
    .Ajax()
    .ServerOperation(false)
    .Model(m =>
    {
       
        m.Id(EnrollAccountData => EnrollAccountData.EnrollAccountsId);
        m.Field(EnrollAccountData => EnrollAccountData.AccountNum);
        m.Field(EnrollAccountData => EnrollAccountData.AccountTypeId);
     })
    .Create("IngGrid_Create", "Grid") // <-- dummy action that doesn't exist in controller
    .Destroy("IngGrid_Destroy", "Company") // <-- dummy action that doesn't exist in controller
    )
)

Daniel
Telerik team
 answered on 25 May 2015
1 answer
439 views

Hi,

   I am very new to kendo and I have of data in and want to bind that data to kendo grid using and procedure(for fetching).

I am familiar with Telerik's grid data binding with . Do we have the similar option with the Kendo?

Alexander Popov
Telerik team
 answered on 25 May 2015
4 answers
227 views
Hi,

If you compare the way you override the item definitions here:
  • http://docs.kendoui.com/getting-started/web/treeview/overview#item-definition

"The 
textimageUrlspriteCssClass and url fields can be changed through the datatextfielddataimageurlfield,dataspritecssclassfield, and dataurlfield, respectively."

And the way you override it here:
  • http://docs.kendoui.com/getting-started/framework/hierarchicaldatasource/overview#the-haschildren-property

The hasChildren property

The hasChildren boolean property indicates whether a data item contains children that can be fetched from the server. You can either hard-code it, map it to another property, or compute it with a function:



You can see that there is no standand. 
I need something like that to my project's datasouce options:
    schema: {
           model: {
               id: "Id",
               hasChildren: "HasChildUnits",
               expanded: "ChildrenDownloaded"
           }
       }
But that does not work as expected. The hasChildren made me believe that this would work.

I think it is a bug.
Alex Gyoshev
Telerik team
 answered on 25 May 2015
1 answer
294 views

 Hi,

  I'm having a couple of issues with the kendo grid which i can't seem to resolve.
  Have a look at the example at http://dojo.telerik.com/oWaMA and try to resize the first column.

  2 things happen : 

   - first all columns with no width set will be completely collapsed

   - if you keep making the column larger it will push the other columns out of the grid

 

  Is there any way to have a non scrollable grid with no-wrap that :

   - respects a min-width for a column

   - respects the initial width of the grid and does not push the columns out

   - when resizing a column is no longer possible due to all columns have reached min-width

     and the max size is reached that it stops resizing ?

 

  Any help on this is definitely appreciated.

regards,

Kris Daniels

 

regards,

Kris Daniels

 

​

Boyan Dimitrov
Telerik team
 answered on 25 May 2015
1 answer
142 views

Hey,

A "simplified" example of my problem:

http://dojo.telerik.com/UxEsU

Steps to reproduce:

Click on the 'Active' button to filter on that column

Click on the 'X' button to remove the filter from that column.

Problem:

=> no event was thrown on this last action  => the 'Active' button remains selected

Yet the underlying input box (not hidden here for debug purposes) is changed.

Questions: 

Which event is raised on removing this filter?

Is there a better way to achieve this?

 

 

What am I trying to do?

I have a lot of grids who use boolean values.  With the Template of a column I can show a Human Friendly string.

I'm trying to reuse this template to make the Filtering on that column also user friendly (instead of the  Istrue and IsFalse that is shown by default)

As per customer request I'm using buttons instead of the default radio boxes.  But that should not affect my problem imho?

 

Thanks in advance.

 

 

Alexander Popov
Telerik team
 answered on 25 May 2015
1 answer
152 views
Is it possible and how to add hint to Toolbar items (buttons). I do not want to add text, only hint or tooltip.
Alexander Valchev
Telerik team
 answered on 25 May 2015
1 answer
138 views

Hello,

 

Hi there,

 

We have implemented a Kendo's Pivot grid and works fine.

When expanding fields the grid tend to grow to the right and  users would like to change it to grow down instead.

 

Is there a way to configure such a functionality?

 

Will really appreciate your help

 

Regards

Adrian

Georgi Krustev
Telerik team
 answered on 25 May 2015
1 answer
94 views

Hi,

Lets say you have a 3 pane splitter. All of them have min width. First pane is collapsible. If you collapse first pane, then minimize second to its minimum, and after that you 'uncollapse' first one - it ingores min width of second pane, and just kinda collapse it.

Please have a look at this example:

http://dojo.telerik.com/AsOPO/2

1. Hide first slider

2. Move the second slider towards the hidden field to its minimum size.

3. Uncollapse the slider from step 1.

 

Is it normal behavior or it's some kind of bug? If not - how to avoid it?

 

Thanks,

Vlad.

 

Atanas Georgiev
Telerik team
 answered on 25 May 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Drag and Drop
Map
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?