Telerik Forums
Kendo UI for jQuery Forum
1 answer
110 views
Hi all,

I have a question about switching views. It doesn't work the way I'd expect and I'm not sure if I'm structuring my project correctly.

My assumption is that I can switch views by using the controller the way you would usually do in ASP.Net MVC. Here's my code and the URL for the start view:

URL:
http://localhost:2121/Home/MobileHomePage

Code snippet for the button:
@Html.Kendo().MobileButton().Text("Go to new view").Url("ExpenseClaimListMobile", "ExpenseClaim")

When I click the button I'd expect the URL to be:
http://localhost:2121/ExpenseClaim/ExpenseClaimListMobile

Instead it is:
http://localhost:2121/Home/MobileHomePage#/ExpenseClaim/ExpenseClaimListMobile

Is this correct? It seems to work, but when I then navigate back to the home page the URL is:
http://localhost:2121/Home/MobileHomePage#/Home/MobileHomePage
Once we get to this URL the page has problems like the buttons not working, and my assumption is that this is because the application is being created twice (calling "var app = new kendo.mobile.Application();" twice because it's in the _Layout code).

What am I doing wrong?

Thanks in advance!
Kiril Nikolov
Telerik team
 answered on 26 Aug 2013
1 answer
241 views
have a kendo mvc grid with one of the column as client template images. Whenever images are clicked I would like to open jquery context menu which has links to other pages. Now, I have implemented my code this way.
@(Html.Kendo().Grid<FlightListViewModel>()
          .Name("Flights")
          .Events(builder => builder.DataBound("gridDataBound"))
          .DataSource(dataSource => dataSource
                                        .ServerOperation(false)
                                        .Read(read => read.Action("Index", "Flights"))
                                        .PageSize(50)
          )
          .HtmlAttributes(new { style = "height:220px;" })
          .Columns(col =>
              {
                  col.Bound(customer=> customer.Name).Width(280);
                  col.Template(t => t.ClassName).ClientTemplate("<img class='activate-menu' src='/Content/Images/flipo.jpg'  style='cursor: pointer;' />").Title("").Width(40);
              }).Sortable()
                .Scrollable()
                .Pageable(pageable => pageable.ButtonCount(1))
                .ColumnMenu()
                .Filterable()
          )
and in my javascript I would like to use jquery contextmenu..The standard form of using context menu by jquery team is like this:
$.contextMenu({
            selector: '.activate-menu',
            trigger: 'left',
            autoHide: false,
            callback: function (key, options) {
                if (key == "Book") {
                    $('body').css('cursor', 'wait');
                    $.post("/CustomerInformation/SetId", { code: className}, function (data) {
                        window.location.href = "/Hotels/CInformation/Index";
                    });
                }
        },
            items: {
                "Book": {
                    name: "Book", icon1: "Booking"
                }               
            }
        });

Now I would like pass the class name of the particular image  to the contextmenu . I have tried onclick on the client template to pass it, but When I nest function with jquery context menu function.. Its throwing me errors. How can I access directly clicked element class name in the context menu function.
Vladimir Iliev
Telerik team
 answered on 26 Aug 2013
4 answers
1.7K+ views

Now I write the event three times:
grid1 .Events(events => events.DataBound("onDataBound1")    function onDataBound1(){alert('grid1 bound!')}
grid2 .Events(events => events.DataBound("onDataBound2")    function onDataBound2(){alert('grid2 bound!')}
grid3 .Events(events => events.DataBound("onDataBound3").   function onDataBound3(){alert('grid3 bound!')}
I
have 3 grid in a view page,I use databound .Events(events =>
events.DataBound("onDataBound") on each gird,Can I pass a parameter on
the databound  event.
   function onDataBound(index){
if(index==1) alert('grid1 bound!');
else if(index==2) alert('grid2 bound');
else alert('grid3 bound');
}



Jayesh Goyani
Top achievements
Rank 2
 answered on 26 Aug 2013
1 answer
95 views
Hi!

I have a application with 2 views.
The first view contains a list of charts I can choose from.
When a user clicks on one of the rows in the list, the second view slides in and presents the chart.
All data is retreived from ONE json url. The data I get back from the json service contains all charts.

I been trying to figure out what's the best design for handling data retrival and ui interactions.
Shall I retrive all data when my application starts, and store it as a array?
Shall I retrived the chartsdata from the datasource, in the "OnClick" event, when the user clicks on a row?
Shall I create the chart in the OnClick event?

What is the best practice in this senario?

I'm greatfull for any answers :)

Regards
Per
T. Tsonev
Telerik team
 answered on 26 Aug 2013
3 answers
154 views
Good evening

I've got the attached chart showing  strange "holes" where the data actually exists.
Demo:
http://70.43.83.4/Test/date/
I know this would work when data from both series was "fitted into single elements" but this can't be done here because series can have different number of points. As I understand from docs for date axis data is always aggregated so I believe this is not a problem "by design"?
Thanks.

  Raido
Hristo Germanov
Telerik team
 answered on 26 Aug 2013
1 answer
411 views
Hi, 

I have a check box in one of the column, how can i make the column not selectable for the row?

thanks.
Jayesh Goyani
Top achievements
Rank 2
 answered on 26 Aug 2013
1 answer
129 views
Hi,
I use kendoui.complete.2013.2.716.commercial  to create a web page which shows data in the database. But when I slid down the mouse in the grid, there would appear blanks between scrollbar and pager div. At first I thought there might be some problems of my code or datasource, but when I turn to demos on your site, the problem exists! Maybe you can find where the problem is and kindly solve that.
As you can see in the attached file, if you resize the window until the x-scrollbar appears, there would be blanks between scrollbar and div 'pager'. If you modify the attribute scrollable:false the problem will not appear. This only appears on IE, not in Chrome and FF.
Dimo
Telerik team
 answered on 26 Aug 2013
3 answers
933 views
Hi;

I've got a grid and I want to have a custom editor in one column under certain conditions, and have no editor under other conditions. Building the editor without the conditions is trivial, but I cannot figure out how to do it conditionally.

Let me be specific: I want to have a dropdown editor in one column if the related dataItem has a value of "true" in another of its fields, and no editor if the value is "false".

I think it should be something like this:
{
  field: "ID",
  title: "Title",
  template: "#=TITLE#",
  editor: function () {
    if (RELATED) {
      MyEditor
    } else {
    }
  }
}
In this example the column with the editor uses the MyEditor function to create the editor. This works great without the conditional code, but fails with it. Essentially if the value of the dataItem field "RELATED" is true I want the editor, and otherwise I want no editor.
Alexander Popov
Telerik team
 answered on 26 Aug 2013
1 answer
257 views
I just noticed that when using the Kendo Mobile Forms, if the label of the form element is too long and takes up more than 50% of the row, it overlaps the input box. I had this happen on our project and didn't know if it was just us, so I manually changed a label on Kendo's demo page for Form, but it does the same thing (see screenshot). Is this broken, or are we expected to come up with some custom CSS to have the labels not overlap the inputs?
Iliana Dyankova
Telerik team
 answered on 26 Aug 2013
1 answer
371 views

I have a kendo grid in inline editing mode. When I press "Add new item" button, new row is added. some editable fields are ForeignKey column in the grid, if i fill the text fields in the new records without filling or select the dropdownlist fields for ForeignKey columns, a null values are set for ForeignKey  fields.

the question , how to enforce the user to select dropdownlist and make this field is required on "update" button click action.


i am using ASP.NET MVC 4.0 and Kendo UI for ASP.NET MVC Q2 2013.

Note: sample code for this issue if exist.
Vladimir Iliev
Telerik team
 answered on 26 Aug 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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
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
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?