Telerik Forums
Kendo UI for jQuery Forum
1 answer
140 views

How to stretch the entire height of the chart ?(adaptive-height)

help please

Helen
Telerik team
 answered on 07 Apr 2016
1 answer
746 views

Hi,

I am using tabstrip to load content from different partial views. I am doing it as below:

 

@(Html.Kendo().TabStrip()
    .Name("tabstrip")
    .Items(tabstrip =>
    {
        tabstrip.Add().Text("Tab1");
        tabstrip.Add().Text("Tab2");
    })
    .ItemAction(item=>
    {
        if(.....)
        {
            item.Selected = true;
            item.Html = Html.Partial("Tab1").ToString();
        }
        else if(....)
        {
            item.Selected = true;
            item.Html = Html.Partial("Tab2").ToString();
        }
    })
    )

 

When I do it without specifying if/else's, I am having issues loading the partial views. Each partial view is having kendo editor and in the editor we have some content and url's. Without using if/else, when I load the tabs by rendering the partials, the partial that is rendered first is loaded without issues. But the partial that is rendered after loading the first partial, does not load the 2nd partial correctly. It has issues like, url's are not clickable inside of the editor and even the editor is behaving unexpectedly.

Going through the threads in this forum, gave me the idea of using if/else and I thought that might be helpful. But, I am not sure how to specify the condition in there to know which tab is clicked.

 

I tried using condition like if(item.Text.Equals("Tab1"), but this is of no use. I am getting same error again.

Please help!

 

Thanks.

 

 

Dimo
Telerik team
 answered on 06 Apr 2016
1 answer
9.0K+ views
Maybe I've looked in the wrong places, but I just can't seem to find an answer to this simple question; I want my grid to behave like a table does in HTML - if there isn't room in a column to show something, I want it to set the width of that column such that it shows all the content, and I want the table to stretch too, so all the columns are visible. 

All the examples I've seen so far have fixed width columns, and if you put too much text in a column, either word wrap and stretch vertically, or (depending on settings) truncate the field data with ... ; neither of these is acceptable - I want it to stretch the column horizontally to fit. 

Could someone put together a quick demo in jsBin to show me how please?

Thanks in advance!

Clive
Dimo
Telerik team
 answered on 06 Apr 2016
8 answers
1.1K+ views

I am using the grid with a details template.The data is remote and the data set is large. The method that populates the grid is only going to give me a subset of that data. Upon expansion, I want to query for the full data for each particular record. The schema stays the same. This is what I have so far in the detailInit function.

 

function detailInit(e) {
    var detailRow = e.detailRow;
    var defaultData = e.data;
    $.ajax({
        type: "GET",
        url: urlBase + "candidatesearch/" + e.data.CandidateId,
        contentType: 'application/json',
        dataType: 'json',
        success: function (data) {
            kendo.bind(detailRow, data);
            detailRow.find(".tabstrip").kendoTabStrip({
                animation: {
                    open: { effects: "fadeIn" }
                }
            });
        },
    });
}

Everything seems to go fine. The event is fired, the data is retrieved but I cannot figure out a way to tell my template to refresh/rebind with the fully retrieved data. What am I missing?

 

Thank you in advance for your help.

William
Top achievements
Rank 1
 answered on 06 Apr 2016
3 answers
699 views
Hi Guys,

Have just tripped over the following issue with the 'items per page' dropdown overriding the 'All' setting with the total number of records.

To see the problem in action run the following dojo

        http://dojo.telerik.com/EZevo
        
- Set the 'items per page' to 'All'

- Now filter the Freight column to show items greater than 32 and less than 33 which now shows 1 - 12 of 12 items
  But the 'items per page' dropdown now shows 830 instead of 'All'
 
- Reset the dropdown to 'All' and clear the filter and the 'items per page' value gets set to 12

To my mind this seems wrong if I have set the dropdown to 'All' it should not get overridden with the total number of records of the previous filter.

Regards
Alan
Vasil
Telerik team
 answered on 06 Apr 2016
3 answers
206 views

I am having trouble with the filter row example from your demos for the kendo ui grid. My code looks similar to what you guys are showing but I get an error when I run my site. The code I am using is shown below:

 

However, when I run this I get an error saying "Cannot convert lambda expression to type "bool" because it is not a delegate type. This happens on line

columns.Bound(p => p.Name).Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));

What am I missing?

 

@(Html.Kendo().Grid<MyViewModel>()
    .Name("MyGrid")
    .DataSource(dataSource => dataSource
        .Ajax()
        .Read(read =>
        {
            read.Action("GetResults", "MyController");
 
        })
        .PageSize(10)
        .ServerOperation(true)
        )
        .Columns(columns =>
        {
            columns.Bound(p => p.Name).Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
            columns.Command(command => command.Custom("Report").Click("showDetails"));
        })
        .Filterable(ftb => ftb.Mode(GridFilterMode.Row))
        .Sortable()
        .Pageable()
        .Selectable(s => s.Mode(GridSelectionMode.Single))
 
)

Boyan Dimitrov
Telerik team
 answered on 06 Apr 2016
3 answers
2.6K+ views

How would I set up a filter that looked for null values in a numberic field?

filter currently looks like this:

'$and': [
                { 'CompanyId': null },
                { 'IsActive': true }
            ]

 

If I look for a value in CompanyId it works, but trying find items with null values (or "Not set") finds nothing.

Rosen
Telerik team
 answered on 06 Apr 2016
8 answers
2.7K+ views
Hi,

Razor code in my MVC view:
    @Html.TextBoxFor(m => m.EstimatedDelivery, new { style = "width: 222px;", @readonly = "readonly", @class = "datetimepicker" })

CS code in controller:
ActionResult Index()
{
      ViewModel model = new ViewModel();
      model.EstimatedDelivery = DateTime.Now.AddDays(1);
      return View(model);
}

Javascript code:

$(document).ready(function () {

     var today = new Date();

     var todayplus180 = new Date();
     todayplus180.setDate(today.getDate() + 180);

    $("#estimatedDeliveryDateTime").kendoDateTimePicker({
            format: "yyyy/MM/dd hh:mm tt",
            parseFormats: ["yyyy/MM/dd", "hh:mm tt"],
            min: new Date(today.getFullYear(), today.getMonth(), today.getDate() + 1),
            max: new Date(todayplus180.getFullYear(), todayplus180.getMonth(), todayplus180.getDate())
        });
});

When the page opens the date is displayed in the datetimepicker as "18-03-2013 15:46:49"

If I change the date it's correctly displayed as "2013/03/19 05:30 AM"

Please let me know the reason for the same and also resolution if any for this issue.

Thanks,
PSSPL
Georgi Krustev
Telerik team
 answered on 06 Apr 2016
4 answers
957 views

I have requirement where application has to support the following formats, but DatePicker is not supporting the formats.

$("#sampleDate").kendoDatePicker({
    format: "MM/dd/yyyy",
    parseFormats: ["Mddyyyy", "Mddyy", "MM/dd/00y", "MM/d/00y", "M/dd/00y", "M/d/00y"]
});​

Can someone help with this!

Thanks,
Nishad

Georgi Krustev
Telerik team
 answered on 06 Apr 2016
2 answers
333 views

Background image wont export from Kendo.
Is there a way to get the background image to export to the png file.
I am not clear why the background image won't export.
Dojo is here: http://dojo.telerik.com/@jcbowyer/exuZi

 

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>Kendo UI Snippet - Background Image won't export</title>
 
 
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
</head>
<body>
   
<div class="content" style="background: #ffffff;background-image:url(https://static.pexels.com/photos/17666/pexels-photo-large.jpg)">
    <p>Lorem ípsum dolor sit amét, pro éu facilis vulputáte témporibus. Eu méi modus requé. Unum gloriátur has et. Modo stet vix ei, apéirian iñsolens plátoñem has ex. Cum eí oporteat inímicus, prí soluta torquatos témporibus éu.</p>
    <p>Ut eos assúm mazim vócent, cu gloríatur expetéñdis pro. Héñdrerit ádversarium reprehendunt eos ad, dúo an noster feugiat cotidieque. Vocent erroribus repudiáre ad meí. Oratio soluta eripuit sed éx. Vis et meliore appellañtur, át has discere convenire ocurreret. Eos at mazim melius aliquip, aperiam alterum commuñé pro id, zril soluta efficiantur in sit. Duis mundi duo ex, pér offendit probatus suavítate iñ.</p>
    <p>Nec id fácilis similique, audiam moderatius ad eum. Persecuti liberavisse eum ex. Qui anímal audiré et, éum vitae coñsul dolorum eu, ín sed partem antíopam. Velít suscipit te usu. Mea ea melius scripta.</p>
    <p>Illum delenit neglegentúr te cum, in errór inimicus disseñtias mel, placérat ocurreret ea vix. Vix ea latine voluptatum. Cúm eu albucius democritum coñsetetur, vix eu dicat deleniti, omñes ínimicus nám no. Nihil molestiae vel ex.</p>
    <p>Eú ñominavi placerat his, eu vix timeam qualisque. Príma recusabo torquatós eos ad, ín meí próbo aequé. Ex ñoñumy vóluptua accommodare seá, sit át sanctus detráxit, ín eos case probatus tractatos. Id sit nihíl coñtentíones, ñec ut audiré elaboraret, quo alia ferri múñere ét.</p>
</div>
<script>
    var draw = kendo.drawing;
    var geom = kendo.geometry;
 
    var contentSize = new geom.Rect([0, 0], [800, 600]);
    var imageSize = new geom.Rect([0, 0], [1200, 800]);
 
    draw.drawDOM($(".content")).then(function (group) {
         
 
        // export the image and crop it for our desired size
        return draw.exportImage(group, {
            cors: "anonymous"
        });
    })
    .done(function(data) {
        kendo.saveAs({
            dataURI: data,
            fileName: "frame.png"
        });
    });
</script>
</body>
</html>

Dimo
Telerik team
 answered on 06 Apr 2016
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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?