Telerik Forums
Kendo UI for jQuery Forum
3 answers
535 views
I have this Kendo UI multiselect:

@(Html.Kendo().MultiSelect()
      .Name("EditModel.Modules.ID")
      .DataValueField("ID")
      .DataTextField("Name")
      .Filter(FilterType.Contains)
      .DataSource(source =>
      {
        source.Read(read =>
                    {
                    read.Action("GetModules", "Modules");
                    })
                   .ServerFiltering(true);
                    }))

How can I add [index] to name so the array maps to the array in my editmodel?

Is there some setting that would add [x] automatically to the name?

/Lasse
Atanas Korchev
Telerik team
 answered on 14 Oct 2013
1 answer
257 views
I can't make the scheduler to read the data I created SchedulerTaskService here I put some of the code:

public class SchedulerTaskService : ISchedulerEventService<TaskViewModel>
{

public SchedulerTaskService()
{

}

public virtual IQueryable<TaskViewModel> GetAll()
{

List<TaskViewModel> lista = new List<TaskViewModel>();

TaskViewModel node = new TaskViewModel();

node.TaskID = 1;
node.Description = "Hello";
node.Ficha_Num = "126293860";
node.Medico = "JGO1230";
node.Title = "JOHNNY GONZALEZ SOTO";
node.Start = new DateTime(2013,10,13,9,0,0);
node.End = new DateTime(2013, 10, 13, 9, 15, 0);
node.Telefono = "2719944";
node.StartTimezone = "Etc/UTC";
node.EndTimezone = "Etc/UTC";
node.OwnerID = 1;

lista.Add(node);

return lista.AsQueryable();
}
____________________________________________________________________

public partial class SchedulerController : Controller
{
private SchedulerTaskService taskService;


public SchedulerController()
{
this.taskService = new SchedulerTaskService();
}

public ActionResult Index()
{
return View();
}

public virtual JsonResult Read([DataSourceRequest] DataSourceRequest request)
{
return Json(taskService.GetAll().ToDataSourceResult(request));
}
______________________________________________________________________________________

@(Html.Kendo().Scheduler<TaskViewModel>()
.Name("scheduler")
.Date(DateTime.Today)
.StartTime(new DateTime(2013, 1, 1, 7, 00, 00))
.EndTime(new DateTime(2013, 1, 1, 18, 00, 00))
.Height(500)
.MinorTickCount(1)
.MajorTick(15)
.Selectable(true)
 

.Editable(e => e.TemplateId("editor"))

.Views(views =>
{
views.DayView();
views.WeekView(weekView => weekView.Selected(true));
views.MonthView();
views.AgendaView();

 })

.Messages(message =>
{
message.Today("Hoy Día");
message.AllDay("Todo el Día");
message.Save("Reservar");
message.Cancel("Cerrar");
message.Views(views =>
{
views.Day("Diario");
views.Month("Mensual");
views.Week("Semanal");


});

message.ShowWorkDay("Mostrar Todo el Día");
message.ShowFullDay("Mostrar Horario");


message.Editor(Editor =>
{
Editor.EditorTitle("Cita");

});


})

.Timezone("Etc/UTC")

.DataSource(d => d
.Model(m =>
{
m.Id(f => f.TaskID);
//m.Field(f => f.OwnerID).DefaultValue(1);
})


.Read("Read", "Scheduler")
.Create("Create", "Scheduler")
.Destroy("Destroy", "Scheduler")
.Update("Update", "Scheduler")
//.Filter(filters =>
//{
// filters.Add(model => model.OwnerID).IsEqualTo(1).Or().IsEqualTo(2);
//})
)

)
____________________________________________________________________

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

<table border="0">
<tr style="border-style:hidden">
<td style="border-style:hidden"><label>Paciente</label></td>
<td style="border-style:hidden"><input style="width:300px;" data-bind="value: Title" /> <button class="k-button" data-bind="value: buscar_ficha">Buscar</button></td>
</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Teléfono</td>
<td style="border-style:hidden"><input data-bind="value: Telefono"/></td>
</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Comienza</td>
<td style="border-style:hidden"><input data-role="datetimepicker" data-bind="value: start" /></td>

</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Finaliza</td>
<td style="border-style:hidden"><input data-role="datetimepicker" data-bind="value: end" /></td>
</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Médico</td>
<td style="border-style:hidden"><input data-bind="value: Medico"/></td>
</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Ficha</td>
<td style="border-style:hidden"><input data-bind="value: Ficha_Num"/></td>
</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Memo</td>
<td style="border-style:hidden"><input style="width:300px;" data-bind="value: Description"/></td>
</tr>
</table>

</script>


any help would be appreciated

Johnny
Rosen
Telerik team
 answered on 14 Oct 2013
3 answers
146 views
Hi,
I'm testing both devexpress and telerik MVC components to decide which one is more suitable for my company needs.
we need to implement a filter on a column with multiple selection. I couldnt find a way to achive that in kendo ui like http://demos.devexpress.com/MVC/GridView/Filtering.
Filter section should be at the header and each column can have its own multi selection filter.

is there anyway to do that in kendo ui?

thanks

Alexander Valchev
Telerik team
 answered on 14 Oct 2013
3 answers
195 views
Hi,

I  am working with a login page, in that form i am having two fields(username, password). When i submit the page, it will validate the form and post the data to a url and api returns a message if the credential are correct. Now i want to get the success value to check whether its success/error. If success i am navigate to dashboard page. Please find my index.html, loginViewModel.js files. Kindly approach me how to get the response value from server and navigate to other page one its success.

index.html

<!DOCTYPE html><br><html><br><head><br><meta charset="ISO-8859-1"><br><title>Login</title><br>  <link href="styles/kendo.mobile.all.min.css" rel="stylesheet" /><br></head><br><body><br> <div data-role="view" data-title="Settings" id="loginForm"><br>       <header data-role="header"><br>           <div data-role="navbar"><br>              <span data-role="view-title"></span><br>          </div><br>        </header><br>       Server: <input id="serverid" name="authserver" type="url" data-bind="value: authserver" required data-required-msg="Enter server address" data-url-msg="Enter a valid url for server"><br>        <span class="k-invalid-msg" data-for="authserver"></span><br/><br>        UserName: <input id="emailid" name="username" type="email" data-bind="value: username" required data-required-msg="You need to enter email" data-email-msg="Enter a valid email id"><br>      <span class="k-invalid-msg" data-for="username"></span><br/><br>      Password: <input id="pwd" name="password" type="password" data-bind="value: password" required validationMessage="Enter Password with minimum 6 characters"><br>      <span class="k-invalid-msg" data-for="password"></span><br/><br>      <button data-bind="click: getUserDetails">Login</button><br>    </div><br>    <script src="scripts/jquery.min.js"></script><br>    <script src="scripts/kendo.all.min.js"></script><br>    <script src="scripts/viewModel/loginModel.js"></script><br>    <script src="scripts/viewModel/loginViewModel.js"></script><br>    <script><br>     /** Initial the kendo mobile application */<br>       var app = new kendo.mobile.Application(document.body);<br>    </script><br></body><br></html>


Below is the viewModel file loginViewModel.js


var validator = $("#loginForm").kendoValidator().data("kendoValidator");<br><br>var loginViewModel = kendo.observable({<br> authserver: "",<br> username:"",<br>    password:"",<br>    getUserDetails: function(){<br>     if(validator.validate()){<br>       //  alert("Server Address -- "+ this.get("authserver")+" User Name -- "+ this.get("username")+" User Password -- "+ this.get("password"));<br>          <br>                var dataSource = new kendo.data.DataSource({<br>                    transport:{<br>                     read:{<br>                          url: "http://127.0.0.1/api/index.php",<br>                          type: "POST",<br>                           dataType: "html",<br>                           <br>                        }<br>                   },<br>                  change: function(data){<br>                     alert("aaa"+dataSource.data);<br>                       alert(data);<br>                    },<br>                  error: function(xhr, error){<br>                        console.log(xhr);<br>                       console.log(error);<br>                 }<br>               });<br>     }else{<br>          alert("Not valid");<br>     }<br>       <br>    },<br>  <br>}) ;



kendo.bind($("#loginForm"), loginViewModel);
Kiril Nikolov
Telerik team
 answered on 14 Oct 2013
1 answer
294 views
Hi! i creating a nested list view as much as possible it must be accordion like this:
 http://jquerymobile.com/wp-content/uploads/2012/07/jquery-mobile-collapsible-lists.png

But i cant find any examples near to that so i aim to do this
http://demos.telerik.com/teampulse-demo/view#IterationsStatus 

with this code:

<!--- Layout --->
    <section data-role="layout" data-id="default">
        <!--View content will render here-->
        <header data-role="footer">
            <div data-role="navbar">
                <span data-role="view-title">Home</span>
                <a data-align="right" data-icon="icon-three-dot" data-role="button" href=""></a>
                <a data-align="left" data-icon="icon-three-bar" data-role="button"  href="#sideMenuView" data-rel="drawer"></a>
            </div>
        </header>
    </section>
<!--- End Layout --->
 
<!--- Drawers --->
    <div data-role="drawer" id="sideMenuView" data-show="rebindListView" data-transition="slide">
        <div data-role="footer">
           <div id="sideMenuNavbar" data-role="navbar" class="bg-white">
                <span data-role="view-title" >
                    <img src="./styles/images/SlideNav.png">
                </span>
                <a data-role="backbutton" id="btnDrawerBack" data-align="left">Back</a>
           </div>
        </div>
        <div class="container">
            <ul id="sideMenuListView"
                class="sideMenuListView"
                data-role="listview"
                data-template="sideMenuDrawer-template"
                data-style="inset">
            </ul>
        </div>
    </div>
<!--- End Drawers --->
 
<!-- Script Templates -->
         <script id="sideMenuDrawer-template" type="text/x-kendo-template">
        <div class="#: style #">
            # if (data.style == 'settings') { #
                <a data-align="left" data-icon="icon-gears" data-role="button" class="btn-icon" data-click="rebindListView"></a>
            # } else { #
                <a data-align="left" data-icon="icon-angle-right" data-role="button" class="btn-icon" data-click="rebindListView"></a>
            # } #
            <div data-role="button" class="text btn-text" data-click="#: view #">#: name #</div>
        </div>
         </script>
<!-- End Script Templates -->
 
<!-- Script Variables -->
    <script>
        var category = new kendo.data.DataSource({
            data: [
                {id: 1, name: "Dogs", view:"dogView", style:""},
                {id: 2, name: "Cats", view:"catModalView", style:""},
                {id: 3, name: "Birds", view:"birdView", style:""},
                {id: 4, name: "Snakes", view:"snakeView", style:""},
                {id: 5, name: "Cows", view:"cowView", style:""}
            ]
        }),
        type = new kendo.data.DataSource({
            data: [
                {id: 1, category: 2, name: "Persian"},
                {id: 2, category: 2, name: "Arabian"},
                {id: 3, category: 2, name: "Local"},
                {id: 4, category: 1, name: "Husky"},
                {id: 5, category: 1, name: "Retriever"}
            ]
        })
    </script>
<!-- End Script Variables -->
 
<!-- Script Functions -->
    <script>
        function rebindListView(e) {
            var params  = e.view.params,
                element     = e.view.element,
                backButton  = element.find('#btnDrawerBack'),
                listView    = element.find("#sideMenuListView").data('kendoMobileListView');
                 
            if (params) {
                var parentID = e.view.params.parent;
                    sideItem    = type.filter({field: "category", operator: "eq", value: parentID});
                     
                    if (sideItem) {
                        backButton.show();
                        listView.setDataSource(sideItem);
                    } else {
                        // redirect to root
                        setTimeout(function() {
                            kendo.mobile.application.navigate('#homeView');
                        }, 0);
                    }
                     
            } else {
                backButton.hide();
                listView.setDataSource(category);
            }
     
            e.view.scroller.scrollTo(0, 0);
             
        }
 </script>
<!-- End Script Functions -->

When i click the button for more options (the one that call rebindListView)
i always got this error: Uncaught TypeError: Cannot read property 'params' of undefined index.html:206
Kiril Nikolov
Telerik team
 answered on 14 Oct 2013
3 answers
356 views
Hi There,

I'm trying to get a dropdown list used with Kendo UI mobile and data bind the source of the dropdown list to some set data.

It seems to work when a plain select is used but when i change the data-role to dropdown list the list is always empty. 

I have include a sample of the problem i am experiencing.

http://jsbin.com/ADOTuG/1/

Is there something I am doing wrong here or should do differently?

Thanks,

Rob
Petyo
Telerik team
 answered on 14 Oct 2013
1 answer
240 views
I'm building a table with large number of columns which I want to be able to show and hide from user menu.
As the example I can use this

http://demos.kendoui.com/web/grid/column-menu.html

My problem is that show/hide menu is the same for all columns, but it is buried deep inside column menu of each individual column.
I want to have that menu only in one place, possibly in table toolbar or exposed in footer so the user does not need to click through the complex dropdowns.



Nikolay Rusev
Telerik team
 answered on 14 Oct 2013
1 answer
68 views
Hello team

After replacing the .css and the .js files with the latest KendoUI Mobile - and installing on my iOS7 device, the tabstrip icons, and data-icons for various menus within my application have mucked up. Instead of the data-icon "home" , the data-icon "search" pictures, I get random pictures, like a love heart, a spade, a number 3 in a box, an angel.. etc... is there something I have missed?  Do I have to explicitly define images now?

Thankyou.

Regards
Kamen Bundev
Telerik team
 answered on 14 Oct 2013
8 answers
732 views
We're using this control for tags and we want to let them select an existing tag or add a new tag.

What's the recommended approach for adding an option to the list such as "Add New" that uses the currently entered text to create a new item?

  Nick
Joshua
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 13 Oct 2013
5 answers
1.7K+ views
I have custom buttons inside my Kendo Grid, but would like the buttons to show an image and not text, how can I do this?  I have searched the forum but can't find a solution.

Thanks!
Kris Nobels
Top achievements
Rank 2
 answered on 12 Oct 2013
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
Map
Drag and Drop
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?