Telerik Forums
Kendo UI for jQuery Forum
1 answer
122 views

how can I access aggregate in the requestEnd event?

 

Eduardo Serra
Telerik team
 answered on 18 Jan 2017
6 answers
590 views
Hi,

I have Tabstrip inside a Grid with Rowtemplate and DetailTemplate. Grid is working but the tabstrip is not getting called from inside the detailtemplate. Any help would be appreciated. The code is below:

<div id="ah" class="Wrapper">
                <table id="Results">
                    <thead>
                        <tr>
                            <th>Date</th>
                            <th> Time</th>                           
                        </tr>
                    </thead>
            <tbody>
                <tr>
                    <td colspan="2"></td>
                </tr>
            </tbody>
        </table>
</div>
<script id="rowTemplate" type="text/x-kendo-tmpl">
                <tr class="k-master-row">
                    <td class="k-hierarchy-cell"><a href="\#" class="k-icon k-plus"></a></td>
<td class="k-hierarchy-cell">Master Row</td>
</tr>

 </script>
    <script id="detailTemplate" type="text/x-kendo-tmpl">
           <div class="TabHolder">
        <ul>
            <li class="k-state-active">Info</li>
            <li>Details</li>
           </ul>
  <div class="TabContent">
            profile
        </div>
        <div class="TabContent">
            activities
        </div>
</div>
</script>

$(document).ready(function () {           
            $("#Results").kendoGrid({
                scrollable: false,
                dataSource: datasource,
                rowTemplate: kendo.template(jQuery("#rowTemplate").html()),
                detailTemplate: kendo.template(jQuery("#detailTemplate").html())
            });
 $(".TabHolder").kendoTabStrip({
                animation: {
                    open: {
                        effects: "fadeIn"
                    }
                }
            });
});
Ivan Danchev
Telerik team
 answered on 18 Jan 2017
3 answers
131 views

The ListViewTag class serialises the entire data object, even if those fields aren't used in the ListView.  I'm using a Hibernate entity which uses a list of objects from a many-to-many relationship and I only want to retrieve these when I need them.  When the Serializer class tries to serialise the  object then Hibernate tries to populate the list but it can't because there is no database session open.

Is there any way fields can be ignored by the com.kendoui.taglib.json.Serializer?

See stack trace:

org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.syngenta.combichem.model.CcwEnumeration.buildingBlocks, could not initialize proxy - no Session
    org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:575)
    org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:214)
    org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:554)
    org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:142)
    org.hibernate.collection.internal.PersistentSet.iterator(PersistentSet.java:180)
    com.kendoui.taglib.json.Serializer.serializeIterable(Serializer.java:171)
    com.kendoui.taglib.json.Serializer.serialize(Serializer.java:109)
    com.kendoui.taglib.json.Serializer.serializeMap(Serializer.java:158)
    com.kendoui.taglib.json.Serializer.serialize(Serializer.java:121)
    com.kendoui.taglib.json.Serializer.serializeIterable(Serializer.java:174)
    com.kendoui.taglib.json.Serializer.serialize(Serializer.java:109)
    com.kendoui.taglib.json.Serializer.serializeMap(Serializer.java:158)
    com.kendoui.taglib.json.Serializer.serialize(Serializer.java:113)
    com.kendoui.taglib.json.Serializer.serializeMap(Serializer.java:158)
    com.kendoui.taglib.json.Serializer.serialize(Serializer.java:111)
    com.kendoui.taglib.WidgetTag.script(WidgetTag.java:101)
    com.kendoui.taglib.WidgetTag.doEndTag(WidgetTag.java:61)
    com.kendoui.taglib.ListViewTag.doEndTag(ListViewTag.java:82)
Alex Hajigeorgieva
Telerik team
 answered on 18 Jan 2017
2 answers
293 views

Dear, 

I am building dynamic scatter line & dot chart from database with dynamic numbers of chart series. When i tried pre-configure chart series it working fine.

Class representation.

public class GraphSeriesPoint {
     public GraphSeriesPoint(double X, double Y, string Tooltip)
{ this.PointValueX = X;  this.PointValueY = Y; this.PointTooltip = Tooltip; }        public double PointValueX { get; set; }<br>        public double PointValueY { get; set; }<br>        public string PointTooltip { get; set; }<br>    }<br>    public class GraphSeries<br>    {<br>        public int SeriesID { get; set; }<br>        public string SeriesName { get; set; }<br>        public string SeriesColor { get; set; }<br>        public string SeriesDashType { get; set; }<br><br>        public List<GraphSeriesPoint> Points {get;set;}<br>    }<br>    public class GraphData<br>    {<br>        public int GraphID { get; set; }<br>        public string GraphTitle { get; set; }<br>        public string OperatingWindow { get; set; }<br>        public string OperatingEnvelop { get; set; }<br>        public string DesignEnvelop { get; set; }<br><br><br>        public string XTitle { get; set; }<br>        public double XMin { get; set; }<br>        public double XMax { get; set; }<br><br><br>        public string YTitle { get; set; }<br>        public double YMin { get; set; }<br>        public double YMax { get; set; }<br><br>        public List<GraphSeries> Lines { get; set; }<br>    }
Stefan
Telerik team
 answered on 18 Jan 2017
1 answer
280 views

I am trying to load the grid state from the json that is saved when saving grid state.  I am using `JSON.parse(text)` text being my json.  The actual code works everywhere else but the unexpected token # in json is causing issues.

 

This is the specific area that is causing the issue

columns.Template(@<text>
 
            </text>)
                      .Title("Actions")
                      .ClientTemplate(
                          "<a href='" + @Url.Action("EditTime", "TimePunches", new { id = "#=ID#", flt = @ViewBag.FLT }) + "' title='Edit'><i class='icon-edit fa fa-pencil fa-fw fa-lg'></i></a>" +
                        "<a href='" + @Url.Action("PunchLogIndex", "TimePunches", new {id = "#=ID#", flt = @ViewBag.FLT}) +"' title='Punch Log'><i class='icon-purple fa fa-book fa-fw fa-lg'></i></a>" +
                        "<a href='" + @Url.Action("PunchRequestIndex", "TimePunches", new { punchId = "#=ID#", flt = ViewBag.FLT }) + "' title='See Change Request Log'><i class='icon-niagara fa fa-list fa-fw fa-lg'></i></a>" +
                        "<a href='\\#' id='delete' data-id='#=ID#' data-client='#=ClientID#'><i class='icon-red fa fa-times fa-fw fa-lg'></i></a>").Width(150).HeaderHtmlAttributes(new { @class = "header-center" });

 

It's my understanding that the razor text attributes are not liked when loading grid state. Is there a way to load this template in after the fact?

Dan
Top achievements
Rank 1
 answered on 18 Jan 2017
5 answers
70 views
I'm developing an MVC 4 app that uses Windows Authentication on my domain. When the user goes to the root address on their iOS device they are presented with the standard log in box (because they aren't joined to the domain). When the log in everything is great and the apps works fine.

I want my users to be able to add a home screen icon for the app. Doing so gives us a great looking app experience but every time it's re-launched it starts back at the login screen and at the default view of the app.

So, I need to do one of the two:

1. Figure out a way to make the independent app remember its state and keep it authenticated or...
2. Force the home screen icon to open in Safari rather than it's own independent window.
Stefan
Telerik team
 answered on 18 Jan 2017
5 answers
1.0K+ views

I am having trouble with some Site CSS box-sizing interfering with the Kendo DatePicker.

The problem is some standard CSS is globally applied to all text inputs with the following CSS:

input[type="text"], input[type="password"] {
      border-color: #cdcdcd;
      border-style: solid;
      border-radius: 3px;
      border-width: 1px;
      border-radius: 3px;
      height: 32px;
      padding: 8px 8px 8px 8px;
      box-sizing: border-box; /* Remove this, date picker displays ok but text box too big */
    }

This causes a grey line to appear at the bottom of the DatePicker which I want to get rid off.  The problem seems to stem from the box-sizing css property above.  Remove this, the grey area is removed.  However, the text input appears too big.

I have prepared a Dojo example for this:

http://dojo.telerik.com/@andez2000/eHEZA/17

Any help is appreciated

Iliana Dyankova
Telerik team
 answered on 18 Jan 2017
4 answers
633 views

We are migrating our application from the ASP.NET AJAX Grid, where we had the PageCount in the Pager-Message as stated here:

http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/functionality/paging/changing-the-default-pager/using-pagertextformat

{1} is total number of pages.

Unfortunately, the Pager of the Kendo Grid does not support the PageCount.

http://docs.telerik.com/kendo-ui/api/javascript/ui/pager#configuration-messages.display

Is there any workaround to get the pageCount in the pager?

Daniel Knoll
Top achievements
Rank 1
 answered on 18 Jan 2017
2 answers
852 views

i'm new with kendo-ui and mvc.

how can i implement a parent-child structure in kendo-grid with expand/collapse behavior?

we are currently using kendo-ui 2013.

hoping for your kind help.

thank you in advance.

christine
Top achievements
Rank 1
 answered on 18 Jan 2017
1 answer
327 views

hi,

I am opening an kendo window using the below jquery function.

However I need to pass __RequestVerificationToken to the MVC Controller because I am having "ValidateAntiForgeryToken" Attribute.

However, I am not able to pass it. Can you please suggest how to pass __RequestVerificationToken  while opening an kendoWindow

function OpenTest() {           

var url = '@Url.ActionWithArea("OpenTest", "Test", GlobalConst.AREA_EL_ElectiveEB)';

url += "?test=" +$("#test").val() +
"&test1=" +$("#test1").val();

 

    windowElement = $('<div id = "abc" />').kendoWindow({
    title: 'test',
    content: url,
    modal: true,
   resizable: false,
   draggable: false,
   width: 900,
   height: 400,
   close: function () { windowElement.destroy(); }
}).data("kendoWindow").center().open();

return false;

}

Boyan Dimitrov
Telerik team
 answered on 17 Jan 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?