Telerik Forums
Kendo UI for jQuery Forum
23 answers
1.6K+ views
Hello,

I have a problem with showing two modal windows:
after second window is closed the page is still covered & unavailable.

Test project is attached.
Please select "change password" in menu and click "change".
Then close opened popup and see that the first window is still covered.

Is it a bug with kendo window or I'm using it in the wrong way?

Vova
Dimo
Telerik team
 answered on 05 Dec 2013
25 answers
3.1K+ views
Do you have any sample code to integrate knockoutjs with the grid?

I got the dropdownlist example working and was easy.

Just can't figure out how to follow the same method with a Datasource with the grid.

I would like to do something like the following again like with the DropDown list
  $(function () {
        $.get("GetJsonData", "", function (data) {
            for (var i = 0; i < data.length; i++) {
                var itemNew = new Item();
                itemNew.Id = data[i].Id;
                itemNew.Name = data[i].Name;
                viewModel.teams.push(itemNew);
            }

            ko.applyBindings(viewModel);

            $("#selectItem").kendoDropDownList();

        });
    });

thanks.
Atanas Korchev
Telerik team
 answered on 05 Dec 2013
1 answer
176 views
I have a pre-existing webforms .NET project that would benefit from KendoUI mobile for some dedicated mobile functionality.  I can get it functioning - and primarily utilize client side functions - but on the rare occasion when I need to use a server control - I'm encountering odd errors.

If I place a server control (like a link button) in a Kendo UI Mobile widget - I get an error when trying to postback.

<ul data-role="listview">
 <li><asp:LinkButton runat="server" ID="l" CommandName="db" CommandArgument='1' Text='Test'></asp:LinkButton></li>
 <li><asp:LinkButton runat="server" ID="l" CommandName="db" CommandArgument='1' Text='Test'></asp:LinkButton></li>
 <li><asp:LinkButton runat="server" ID="l" CommandName="db" CommandArgument='1' Text='Test'></asp:LinkButton></li>
 </ul>

It renders fine - a scrollable view of active list items - but any click/touch results in as js error:
Uncaught Error: Syntax error, unrecognized expression: unsupported pseudo: __doPostBack

Any way to work around this?
Bill O'Neil
Top achievements
Rank 1
 answered on 05 Dec 2013
2 answers
2.9K+ views
Hi Team, 

I am using Kendo UI file upload control with multiple attribute set to true.

Does File Upload control handles the failed uploads on its own ?

I am using the following code snippet on the server and i am posting data through web api.

[HttpPost]
        public Task Post()
        {
            var folderName = "Uploads";
            //var PATH = HttpContext.Current.Server.MapPath("~/" + folderName);
            var PATH = "C://Uploads/";
            var rootUrl = Request.RequestUri.AbsoluteUri.Replace(Request.RequestUri.AbsolutePath, String.Empty);
            if (Request.Content.IsMimeMultipartContent())
            {
                var streamProvider = new MultipartFormDataStreamProvider(PATH);
                var task = Request.Content.ReadAsMultipartAsync(streamProvider).ContinueWith(t =>
                {
                    if (t.IsFaulted || t.IsCanceled)
                    {
                        throw new HttpResponseException(HttpStatusCode.InternalServerError);
                    }                    
                });
                return task;
            }
            else
            {
                throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotAcceptable, "This request is not properly formatted"));
            }
        }

 I want to capture the error information for the failed files and display that information to the user.

Kendo file upload is just returning the status as Failed for the failed uploads but how we can pass the actual error information back to the user?

Thanks
Zachary
Top achievements
Rank 1
 answered on 04 Dec 2013
2 answers
84 views
Hi!

I'm implementing a function that will be used as callback for several routes in my SPA. My challenge now is that I don't know how to get the route definition inside the function. For example:

var callback = function(){
   ///How to get the according route definition? For instance: "/login", "/main", "/items/:category/:id"
}

router.route("/login", callback);
router.route("/main", callback);
router.route("/items/:category/:id", callback);

Does the Kendo API provide a way to get that information?

Thanks.
Olivier
Top achievements
Rank 1
 answered on 04 Dec 2013
4 answers
1.3K+ views
How can I customize business hours range? and how can I hide that option ?
Sreekar
Top achievements
Rank 1
 answered on 04 Dec 2013
4 answers
125 views
I have two modals. One modal opens on top of the other. If I click anywhere on the screen after the second modal opens, the first modal closes. This is very undesirable. Does anyone know a workaround?
Michael
Top achievements
Rank 1
 answered on 04 Dec 2013
3 answers
725 views
Using Razor syntax with the Grid Data Source, I am trying to specify a valid URL.

I see the documentation recommends the syntax of   

.Read(read => read.Action("Orders_Read", "Grid"))

I want to use a url for an API that I use in the app that looks like "/Orders_read/Grid/id/1/office/2"

Do you have any razor examples of passing in the URL instead of the Action/Controller?  

Alexander Popov
Telerik team
 answered on 04 Dec 2013
3 answers
201 views
If you have a View Model that has a property that is an array and you bind it via "kendo.bind", whenever you change any input bound to the array, it refreshes/rebinds the ENTIRE ARRAY.  Is this by design or a bug?  It is definitely a performance issue when you have a big array.  Below is a sample project I made to demonstrate.  If you type a character in any of the inputs, it will auto-tab to the next input.  However, due to performance issue, it takes a long time for it to do so.  I am logging the "get" event to the console, and you will see that after you type into one of the inputs, every property of every item in the array is gotten again; hence the horrible performance.

================================================================
@{
ViewBag.Title = "Test";
}

<div id="placeholder"></div>

<script type="text/x-kendo-template" id="template">
<table id="scorecard">
<caption>#= TeamName #</caption>
# for (var i = 0; i < Scores.length; i++) { #
<tr>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H1', i) #" value="#= Scores[i].H1 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H2', i) #" value="#= Scores[i].H2 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H3', i) #" value="#= Scores[i].H3 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H4', i) #" value="#= Scores[i].H4 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H5', i) #" value="#= Scores[i].H5 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H6', i) #" value="#= Scores[i].H6 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H7', i) #" value="#= Scores[i].H7 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H8', i) #" value="#= Scores[i].H8 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H9', i) #" value="#= Scores[i].H9 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H10', i) #" value="#= Scores[i].H10 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H11', i) #" value="#= Scores[i].H11 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H12', i) #" value="#= Scores[i].H12 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H13', i) #" value="#= Scores[i].H13 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H14', i) #" value="#= Scores[i].H14 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H15', i) #" value="#= Scores[i].H15 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H16', i) #" value="#= Scores[i].H16 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H17', i) #" value="#= Scores[i].H17 #" /></td>
<td><input data-bind="#= kendo.format('value: Scores[{0}].H18', i) #" value="#= Scores[i].H18 #" /></td>
</tr>
# } #
</table>
</script>

@section Scripts
{
<script>
$(function () {
var
score, template, placeholder,
randomScore = function () { return Math.floor((Math.random()*10)+1); },
model = { TeamName: 'John Doe', Scores: [] };

for (var i = 0; i < 500; i++) {
score = { Number: i };
for (var j = 1; j <= 18; j++)
score['H' + j] = randomScore();
model.Scores.push(score);
}

model = kendo.observable(model);
model
.bind('get', function (e) {
console.log('getting...' + e.field);
})
.bind('set', function (e) {
console.log('setting...' + e.field);
});

template = kendo.template($('#template').html());
placeholder = $('#placeholder');
placeholder.html(template(model));
kendo.bind(placeholder, model);

$('#scorecard')
.on('focus', 'input', function (e) {
setTimeout(function () {
$(e.target).select();
})
})
.on('input', 'input', function (e) {
var next = $(this).closest('td').next().find('input').focus();
if (!next.length)
$(this).closest('tr').next().find('input:first').focus();
});

});
</script>
}

@section Styles
{
<style>
#scorecard input { width: 2em; }
</style>
}

================================================================
Petur Subev
Telerik team
 answered on 04 Dec 2013
1 answer
261 views
Hi I have a kendo grid which works well in firefox and internet explorer. 2013.2.716 is the version of the kendo I am currently using . When I call the grid edit in  the popup mode the popup window does not appear in Chrome. The google chrome version is   31.0.1650.57 m. I am running a windows 8 64 bit machine.
The kendo Grid Code is as below

 @(Html.Kendo().Grid<MyAssembly>()
     .Name("ListGrid")
      .DataSource(dataSource => dataSource // Configure the grid data source
          .Ajax() // Specify that ajax binding is used
          .Read(read => read.Action("Method1", "ControllerName").Type(HttpVerbs.Post))
          .Update(update => update.Action("Method2", "ControllerName"))  // Action invoked when the user saves an updated data item
          .Destroy( delete => delete.Action("Method3" ,"ControllerName"))
                  .Model(model =>
                  {
                      model.Id(item => item.ID);  
                      model.Field(item => item.ID).Editable(false);  
                  })
       )
      .Columns(columns =>
      {
          columns.Bound(o => o.ID)
                    .HeaderTemplate(@<text>
                      <input type="checkbox" title="check all records" id="checkAllRecords" onclick = "checkAssemblyRows()"/> </text>)
                    .ClientTemplate("<input type='checkbox' title='check record'  name='checkedRecords' onclick= 'checkRecords(this)' value='#=ID#' />")
                    .Sortable(false)
                    .Width("2%");
            columns.Bound(o => o.No).Width("15%");
            columns.Bound(o => o.ShortDesc).Width("15%");
            
            columns.Command(commands =>
            {
               // commands.Edit();
                    
                 
                //commands.Destroy(); // The "destroy" command removes data items
                
            }).Title("Commands").Width(200);
      })
      .Events(e => e.Edit("AssemblyListGrid_OnEdit_Kendo")
              
              )
        .Filterable()
        .Sortable()
        .Pageable(p => p.Refresh(true))
        .Scrollable()
        .ColumnMenu(col => col.Sortable(false))
        .Groupable()
        .Resizable(resize => resize.Columns(true))
        .Reorderable(reorder => reorder.Columns(true))
        .Editable(edit => edit.Mode(Kendo.Mvc.UI.GridEditMode.PopUp).DisplayDeleteConfirmation(false))   
      
      
      )

I have attached the error screen shot and the screen shot I took while I do the inspect element in chrome. It looks like it is working partly and the modal edit window fails to display.
Works perfectly in firefox and IE.
 This project has both the telerik and kendo controls.
Thanks
Vladimir Iliev
Telerik team
 answered on 04 Dec 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)
SPA
Filter
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
OrgChart
TextBox
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
Popover
DockManager
FloatingActionButton
TaskBoard
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
TimePicker
DateTimePicker
RadialGauge
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?