Telerik Forums
Kendo UI for jQuery Forum
4 answers
784 views
Hi

I have a TabStrip control on my page but I would like to bind each tab to a separate page as opposed to put all the views in the same page:
<div data-role="footer">
    <div data-role="tabstrip">
        <a href="/Clients" data-icon="contacts">Clients</a>
        <a href="/Home" data-icon="organize">Tickets</a>
        <a href="/Settings" data-icon="settings">Settings</a>
    </div>
</div>
But when I click on the tabs I see strange URL results. For example if I am in <domain>/Clients page and click on Home the URL that is generated will be <domain>/Clients#/Home instead of <domain>/Home.

Could you let me know what I am doing wrong?

Thanks in advance
Ron Farko

Kiril Nikolov
Telerik team
 answered on 02 Oct 2013
2 answers
237 views
I am using Kendo UI Web Grid, not one of the Server Wrappers. I am only displaying a few fields in the grid.
The rest of the fields are displayed in the create or edit popup. For this popup I am using a template:

<script id="popup_editor" type="text/x-kendo-template">
<div class="k-edit-label">
<label for="Title">Title</label>
</div>
<div class="k-edit-field">
<input type="text" class="k-input k-textbox" name="Title" data-bind="value:Title" required>
</div>
</script>

and then I am calling it from the grid:
 editable: {
mode: "popup",
template: $("#popup_editor").html(),
confirmation: "Are you sure?"
}

This works great for input boxes. However I have a foreign key column in my table. I want to display all the options from the foreign key table in a dropdown and select the correct one based on the value in my table. I have searched around quite a bit but haven't been able to find an answer or example to this.

Any help would be greatly appreciated.
Joel
Top achievements
Rank 2
 answered on 01 Oct 2013
1 answer
199 views
I am trying to figure out how to get a date column to sort when the grid was initialized from an html table. I see from the demos that I would have added formatting to the columns, but I don't see how to add the format when initializing from HTML.

Some things to take into consideration in trying to answert this question:

The size of the table, and number of columns, is created dynamically in a JSP using jstl. This means that a row might be date, and it might not be.

The formatting of the date is always "ddMMMyyyy", all upper case.

Here is an example of what the html might look like:
<tr>
    <td><div>01JAN2013</div></td>
</tr>

Notice that it has a div in it, which is used for cell scrolling, should the value not be a date, and have large amounts of text in it.

The jstl for the header of the date might be something like this:

<c:forEach var="column" items="${row}">
<c:choose>
    <c:when test="${column.type eq "date"}" >
        <th <%---Add some kind fo attribute here to tell kendo this is a date?---%>My Date</th>
     </c:when>
     <c:otherwise>
         <%-- Do some other stuff, without date formatting --%>
     </c:otherwise>
 </c:choose>
</c:forEach>

I suppose I could try to build the JavaScript object dynamically, but I really dislike the idea of building JavaScript objects with jstl, and I'm not certain how that might conflict with initializing from html.

I'm working with some legacy data and services, and so I have no choice as to how the data is returned to the JSP. 


Alexander Valchev
Telerik team
 answered on 01 Oct 2013
1 answer
208 views
I'm not sure if I'm posting in the right place....

We're using KendoUI MVC with the help wrappers.

I have a simple page created in MVC using KendoUI.

The controller sets the value of a global variable "SomeValue" on initialization, but what I don't understand is when I use AJAX binding to bind data from the controller to the grid, why when "GetData()" is called it is unable to see the value of "SomeValue" or even the value of ViewBag.Heading.

When GetData() is called its almost as if the function is being called in isolation and doesn't know anything about the anything else in the controller....

What I wanted to do was when the Index controller is called, load all my data from my database into a global variable, so when "GetData()" is called it doesn't have to reload the data from the database, it can use the data that is set to the variable "SomeValue"....

How do you do this in KendoUI?

Here is a snippet of code of what I'm trying to do....


Controller
--------------
public string SomeValue;

public ActionResult Index(string strClient, string strProductType, string strCloseOfBusinessDate)
{
    ViewBag.Heading = "DV01";

    SomeValue = "Hello there!";

    return View();
}

public ActionResult GetData(string strClientName, string strDate)
{
    return Json(Graph.GraphData(SomeValue, strClientName, strDate));
}

Petur Subev
Telerik team
 answered on 01 Oct 2013
10 answers
2.0K+ views
Hi,

I have a Telerik MVC Combobox which I'm trying to migrate it to Kendo. The original code looked like :

@(Html.Telerik().ComboBox().Name("CbPlants")
    .BindTo(new SelectList(Model.PowerPlants, "Key", "Value", Model.SelectedPowerPlant))
    .Filterable(filter => filter.FilterMode(AutoCompleteFilterMode.Contains))
    .ClientEvents(c => c.OnChange("OnCbPlantsChange"))
    .AutoFill(true))
         
After migration as per the instructions, it looks like :
           
@(Html.Kendo().ComboBox().Name("CbPlants")
       .BindTo(new SelectList(Model.PowerPlants, "Key", "Value", Model.SelectedPowerPlant))
      .DataTextField("Text")
      .DataValueField("Value")
      .Filter(FilterType.Contains)
      .Events(c => c.Change("OnCbPlantsChange"))
      .Suggest(true))


The combobox is bound to a list of powerplants, whose key is a guid. I pass both the list as well as the selected item in the binding.              
It works well except for the fact that, when the page is refreshed, I see the selected item's guid for sometime, before the correct value is displayed. Please have a look at the attached pic.

Maybe it's because of the time taken for the combobox to load. Can I suppress displaying the key till the list loads ?

I tried setting the selected item in the DataBound event, instead of the razor. That seems to work. But unfortunately, the filtering & auto fill feature doesn't then. Is there any other way to achieve what I could do with the old MVC extensions ?

Regards

Achilles
Achilles
Top achievements
Rank 1
 answered on 01 Oct 2013
1 answer
63 views
$("#stock-chart").kendoStockChart({
                   dataSource: {
                       data: incomeData
                   },
                   title: {
                       text: showName
                   },
                   dateField: "Date",
                   seriesDefaults: {
                       type: "area",
                   },
                   series:
                   [{
                       field: "Open",
                       name: "1",
 
                       color:"blue"
                   }, {
                       field: "High",
                       name: "2",
 
                       color: "green"
                   }, {
                       field: "Low",
                       name: "3",
 
                       color: "black"
                   }],
                   navigator: {
                       series: {
                           type: "area",
                           field: "Open"
                       }
                   },
                   legend: {
                       position: "bottom",
                       visible: true,
                   },
               });
           }
           $(document).ready(createChart);
           $(document).bind("kendo:skinChange", createChart);

Code works perfectly. The problem is that everytime when i hover over legend it appears in firebug that n is null. I specify that i don't have any problem with the script just it appears in firebug that n is null. My question is why? I have a problem or is from the Kendo Ui? Please if you can help it would be great.

P.S Sorry for my English is not my main language.
 
T. Tsonev
Telerik team
 answered on 01 Oct 2013
1 answer
118 views
Hi,
just I want to ask why we don't have pivot control for MVC, like the one for ajax?
and do we expect to find it in a new update ?

Thanks
Sebastian
Telerik team
 answered on 01 Oct 2013
1 answer
122 views
Hello,

We are upgrading the Kendo  version to be latest version and in this process I need to know what Jquery UI librarty version should I be using
NEW Update :I am using the new Kendo -- 2013.2.918,jquery-1.9.1.js ( this comes along with the kendo update), jquery-ui-?

Previous --jquery-ui-1.8.11.min.js, jquery-1.7.2.min, Kendo 2012.2.913

 

 

 

 

 

Sebastian
Telerik team
 answered on 01 Oct 2013
12 answers
4.9K+ views
I have a template that looks somewhat like this:

<script type="text/x-kendo-tmpl" id="thisTemplate"><div id="${data1}">
<div id="thisDiv" class="thisClass ${newClass}">
 ... Div content...
</div>
</script>

As I read in my data I would like to have ${newClass} be a string that is determined by a function:
 i.e.
if(condition A) {
${newClass} = "a string of text";
} else {
${newClass} = "a different string of text";
}

In essence, I want ${newClass} to be a string that is determined by a function.

Does anyone know how to do this...?
Atanas Korchev
Telerik team
 answered on 01 Oct 2013
5 answers
295 views
Hi,

I'm trying to implement the date filter that you have on the music store:
http://docs.kendoui.com/tutorials/ASP.NET/Kendo%20Music%20Store/Music%20Store%20Web/kendo-music-store-web-management-charts

i.e.
When a user selects 'Day', it only bring in data for a day, 'Week' only brings back information for the week .etc...
But I also want to enter a custom Start Date and End Date....

The problem is that for our implementation we had decided to go the MVC route and I cannot find any information on how to do this via your MVC toolset.

My chart looks like:

@(Html.Kendo().Chart<KendoWithChart.Models.RatioTimeSeries>()
    .Name("chartActualHedgeRatioTimeSeries")
    .Title("Actual Hedge Ratio")
    .Legend(legend => legend
        .Position(ChartLegendPosition.Bottom)
    )
    .ChartArea(chartArea => chartArea
        .Background("transparent")
    )
    .DataSource(ds => ds.Read(read => read.Action("GetRatioTimeSeriesData", "Home", new { ddlClient = @ViewBag.ClientName, dpkDate = @ViewBag.Date })))
    .Series(series =>
    {
        series.Area(model => model.Value1, model => model.Date).Name("Nuclear");
        series.Area(model => model.Value2, model => model.Date).Name("Hydro");
        series.Area(model => model.Value3, model => model.Date).Name("Wind");
    })
    .CategoryAxis(axis => axis
        .Date()
        .BaseUnit(ChartAxisBaseUnit.Days)
    )
    .ValueAxis(axis => axis.Numeric()
               .Labels(labels => labels.Format("{0:N0}"))
    )
    .Tooltip(tooltip => tooltip
        .Visible(true)
        .Format("{0:N0}")
    )
)

And it uses the controller from the demos.

What do I need to do to wire in the date filter? I want it to be seamless and to avoid any postbacks....

T. Tsonev
Telerik team
 answered on 01 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
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
Iron
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
Iron
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?