Telerik Forums
Kendo UI for jQuery Forum
4 answers
295 views
I have simple Kendo UI Grid in partialview to display information using AJAX binding.

Sample Code Below
     @(Html.Kendo().Grid(Model)
          .Name("Grid")
          .Columns(columns => {
               columns.Bound(p => p.Id).Groupable(false).Hidden();
               columns.Bound(p => p.Name);
        })
       .DataSource(dataSource => dataSource
                            .Ajax()
                            .Read(read => read.Action("Value_Read", "Value"))
                          )
        .Pageable()
        .Sortable()
        .Filterable()

   I have problem with filtering.  When I clicks on Filtering icon, it works as sorting.
   If I add filtering only without sorting, then it works.
   Only way to make filtering working along with sorting is by turning on Compatibility View
  
   Below is pictorial explanation.  Hope this helps.

       launch partialview with Grid.  You see filtering icon next to name. 
       when hover over filtering icon to click, the icon disappears. 
       Tries to click filtering icon, sorting will work. 
      
  




Do same step as above.  But this time I turn on Compatibility View (Notice red circle)
This times, when I hover over on Filtering icon, I can see filtering icon.
Filtering and sorting are working here.


I have IE9. 
I ran this with Firefox, I cannot make filtering works regardless what.

I added below as order suggested.
        <script src="@Url.Content("~/Scripts/jquery.min.js")"></script>
        <script src="@Url.Content("~/Scripts/kendo/2012.2.710/kendo.web.min.js")"></script>
        <script src="@Url.Content("~/Scripts/kendo/2012.2.710/kendo.aspnetmvc.min.js")"></script>


I also have jQuery 1.7.2 and 1.8.20

Please let me if there is any information I need to provide.  I really spent huge amount of time to figure out this issue. 

Thank you in advance.





D.Kermott
Top achievements
Rank 1
 answered on 15 Nov 2012
1 answer
136 views
This is the html code of one of my views in an Android app. What I have in this view is a listview (li-items are added dynamically) and when an item in the listview is clicked, the 'contenPageContainer' is made 'visisble'

<div data-role="view" id="tabstrip-home" data-title="MaxApp">
    <ul id="linksList" data-role="listview" data-style="inset">
    </ul>

   
<div id="contentPageContainer" class="contentPageContainer" style="visibility:hidden">
        <div data-role="scroller" class="contentPageContainer" id="scrollContentPageContainer">
            <div id="eventTitle" class="contentPageHeader"></div>
            <div id="entryText"></div>
            <p><a id="btnOk" data-role="button" style="background-color: rgb(0, 111, 81);float:right;">Ok</a></p>
            <p> </p>
        </div>
    </div>
</div>
In the click event I call a function that sets the content of div 'eventTitle' and div 'entryText' and it sets visibility of div 'contentPageContainer' to 'visible'.
function showRssItem(selectedEntry) {
    document.getElementById("eventTitle").innerHTML = '<strong><p>' + entries[selectedEntry].title + '</p></strong>';
    var contentHTML = "";
    contentHTML += entries[selectedEntry].description;
    contentHTML = '<p><img src="images/menu_logo_maxgrip.png" /> ' + contentHTML + '</p>';
    contentHTML += '<p><a href="' + entries[selectedEntry].link + '">Read Entry on Site</a></p>';
    document.getElementById("entryText").innerHTML = '';
    document.getElementById("entryText").innerHTML = contentHTML;
    document.getElementById('contentPageContainer').style.visibility = 'visible';
}
This seems to work ok als long as the scrolling functionality of scroller is not needed. Ie. if div 'entryText' contains only a few lines of text there is no problem. The 'Ok' button is in view and when the user clicks it, the javascript code to close it is executed properly causing the div 'contenPageContainer' to hide again.

If it contains too much text to show in the div 'contentPageContainer' then the user has to scroll down to get the 'Ok' button in view. Closing still works fine, but when you click a differen listview item afterwards, then the container is shown, but eventTitle and entryText are not visible.

I have tried to solve that with this code, but to no avail.
var scroller = $("#scrollContentPageContainer").kendoMobileScroller();
scroller.reset();
scroller.movable.moveTo({x:0,y:0});
Clicking the listview item with many lines again, shows the bottom of the content and the 'Ok' button, but I can't scroll to the top of the text. Actually I can, but when I lift my finger from the screen, the scroller jumps back to the bottom.

Any suggestions what could be wrong?

To make it complete, here is the css code of the div 'contentPageContainer'
div.contentPageContainer
{
  display: block;
  background-color: #5EA491;
  color: #FFFFFF;
  position: absolute;
  top: 10px;
  left: 2%;
  width: 96%;
  height: 95%;
  -moz-border-radius: 5px;
  border-radius: 5px;
}







Jan-Dirk
Top achievements
Rank 1
 answered on 15 Nov 2012
5 answers
2.5K+ views
Hello,

I'm wondering if what I'm doing to remove the grid's filter is correct or if there's a right approach.

Here's the code

var filter = { };
grid.dataSource.filter(filter);

Just
Top achievements
Rank 1
 answered on 15 Nov 2012
0 answers
122 views
Why can you not release the samples you have in your various screenshots as demos? The Music Store demo
was nice but I still prefer that interesting looking Customer View you have in your screenshots for Web Demos.

Also. The nice looking Mobile screenshot with various DataViz integrations looks exactly what we would need as inspiration.

The Webcast yesterday promised some new interesting Mobile Demos but I have yet to see any.

Marcus
Top achievements
Rank 1
 asked on 15 Nov 2012
1 answer
280 views
I found similar posts but nothing that really addresses the concern.  Basically want to implement Cancel on a ViewModel.  I've created a fiddle http://jsfiddle.net/yN5Cd/1/
Pretty simple, just create a model and a schema.  Create  a datasource setting the schema.  Add the model to the datasource and call sync().  Bind the first and only item in the datasource to a template.

What I really want to is to able to cancel changes on the item in the datasource.  I do have a Cancel button and it calles cancelChanges on the datasource but results in a an empty dataSource. 

I don't see why it's so much different than editing a datasource bound to a listview.  The cancel works great when the datasource is populated using the transport url.  But when I add an item in the javascript, the datasource removes it as soon as cancelChanges is called.
I would expect the original state of the model to be restored and the model to remain in the datasource.

Thanks,
Petur Subev
Telerik team
 answered on 15 Nov 2012
1 answer
179 views
Hi All i am trying to change the width of the actual drop-down from the dropdownlist while keeping the dropdownlist element itself a smaller size.

In the combobox you can

.data("kendoComboBox").list.width(380); and that sets the width of drop down itself.

this does not work for the kendoDropDownList . I've tried:

data("kendoDropDownList").list.width(380); and the items themselves no longer wrap BUT the actually background container stays the fixed width.

I don't want to go and modify the css because different instances of the drop down require different widths. 
Georgi Krustev
Telerik team
 answered on 15 Nov 2012
1 answer
110 views
We've run into an issue while developing our application that appears to be a serious design flaw in the way Kendo Mobile handles parameterized remote views.

Our app will be relatively large; large enough that putting all the HTML in a single file and using local views for everything is not an option. So we are using remote views, but all remote views are still going to be static HTML files living inside the app (we are using PhoneGap), and we plan to pass parameters to the remote views through the query string. Unfortunately we've run into problems with this. Let me try to explain the issue:

When calling a local view and passing parameters, the first time it is called the view is initialized, then the "show" event is called, passing the parameters. Subsequent calls to the local view will skip the initialization, and only the "show" event is called with the new parameters.

When calling a remote view with parameters, the first time it is called the view is loaded and initialized, then the "show" event is called, passing the parameters. Subsequent calls to the remote view with the same parameters then skip initialization, and the "show" event is called passing the parameters. However, if you pass different parameters, the view is loaded and initialized again, creating a copy of the original remote view, then the "show" even is called on this new instance of the remote view. Calling it again with different parameters will create yet another copy of the view, and so on until you have potentially many, many copies of the same remote view.

This behavior is very inconsistent, and causes a host of issues, including:
  • Multiple copies of the same view unnecessarily consume additional resources
  • Scripts included in the remote view are loaded multiple times, causing hard to debug issues
  • Elements with IDs get duplicated, creating issues when trying to target elements inside a view
  • The same remote view is initialized multiple times, reducing performance
  • It's inconsistent with the way local views work, causing confusion for the developer
The main problem is that there is no way to call an existing instance of a remote view with different parameters. As far as I can tell, with the current design it is impossible.

According to the answer in this thread, this behavior is by design: http://www.kendoui.com/forums/mobile/general-discussions/remote-views-querystrings-odd-behaviour.aspx. It was also suggested that a possible solution is to remove the remote view from the DOM on hide. This causes its own set of issues, and is only a work-around for a design limitation in Kendo Mobile.

Now I realize that in some cases it may be desirable to have a remote view be loaded as a separate instance based on the parameters, but that would be the special case in my opinion, and it would be more common to want the remote views to work in a way consistent with local views.

I hope I have described the issue clearly enough. Here are some possible solutions that I can think of:
  1. Make an option on the Application object that lets developers choose how they want parameterized remote views to function
  2. Allow passing parameters to remote views through the URL fragment (after the '#' character). These parameters would be ignored when determining if a remote view is already loaded or not, but would be passed to the 'show' event
  3. Allow passing parameters to views through some other means. For instance, the navigate() function could take an additional parameter that is passed to the show event (this could also be useful because it would allow us to pass JS objects to other views)
For now in our project, I have been forced to implement a work-around that overrides the showView and _createRemoteVew functions to use the urlPath variable instead of the full url when reading and writing to the data-url attribute of the view element. This simple change brings the behavior of parameterized remote views in line with local views, allowing us to continue development of our application.

Please consider changing the behavior of Kendo UI Mobile for future releases, or at least giving us viable options, so I don't have to resort to nasty hacks and workarounds.

Thanks,
Jonathan

Petyo
Telerik team
 answered on 15 Nov 2012
1 answer
44 views
Hello,

when using the splitter in the IE8 Panes are on mouseover reloaded - not in IE9 - how can we explain this?
Is that a bug ? How we can fix this ? (the behavior in IE9 is better !)

Thank you for answer
Dimo
Telerik team
 answered on 15 Nov 2012
1 answer
99 views
We try to make our mobile site viewable on PC browsers, but in the latest release, but the fall release (2012.3 1114) broke ScrollViews on FireFox. It is easily seen by bringing up the ScrollView demo in FireFox. No ability to scroll.

Thanks/Anker

Kamen Bundev
Telerik team
 answered on 15 Nov 2012
1 answer
103 views
how to accomplish this coding using kendo ui
 function Grid_onSubmitChanges(e) {
        e.values.uid = '@Model.uid';
        var insertedrows = e.inserted;
        var updatedrows = e.updated;
}
Muthu
Top achievements
Rank 1
 answered on 15 Nov 2012
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
Date/Time Pickers
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
Gauges
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
ScrollView
PivotGridV2
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Collapsible
Localization
MultiViewCalendar
Touch
Breadcrumb
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
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?