Telerik Forums
Kendo UI for jQuery Forum
2 answers
144 views
Hi,

I have a grid with server side paging and sorting. A search field is added where we execute 

$scope.mainGridOptions.dataSource.read(
{
   data: $scope.searchText
 });

We have defined our data source as
var gridData = new kendo.data.DataSource({
 transport: {
   read: {
       url: "api/engagement/GetEngagementLists",
       data: {
           searchStr: $scope.searchText
       },
       type: "GET",
            contentType: "application/json"
       }
    },
     schema: {
          data: "Data",
          total: "Count",
          errors: "Errors"
     },
     error: (e) => {
         console.log("error");
         toastFactory.error("error");
     },
        pageSize: 10,
        serverPaging: true,
        serverSorting: true
     });

The problem we faced is when we have some text in search box and if we do sorting by clicking a header it won't pass the search string. Therefore it will loose the search capability. Please let me know what can we do correct this problem.

Thanks
Tharindu
Top achievements
Rank 1
 answered on 30 Sep 2014
4 answers
189 views
Dear Sir,

    I need simple examples of upload files are saved to local directory using kendo ui upload.please give me a simple find out examples
Dimiter Madjarov
Telerik team
 answered on 30 Sep 2014
1 answer
272 views
Hello,
in release 2013.3 i used following drawer ..

<div data-role="drawer" style="width: 95%" id="teamauswahl" data-init="TeamCalendar.ListViewController.init">
    <header data-role="header">
       <div data-role="navbar" id="teamauswahl-navbar">
          <a href="#" data-role="button" id="teamauswahl-navbar-backbutton" data-align="left" data-click="TeamCalendar.ListViewController.back">Zurück</a>
          <span id="teamauswahl-navbar-title" data-role="view-title">Teams</span>
       </div>
    </header>
    <ul id="listViewTeams" data-role="listview" data-template="ListViewTemplate"></ul>
</div>

In JavaScript-Function behind the button i reset the datasource of my listview.

This works realy fine ... but after update Kendo UI to 2014.2.903 ... the drawer where closed at button click.

I changed nothing to my code ...

What do i have to do ?
How can i use latest realease and keep the drawer openend like in release 2013.3 ?

Regards

Jürgen
Kiril Nikolov
Telerik team
 answered on 30 Sep 2014
1 answer
372 views
Hi everyone

I have a view that have multiple charts and a grid on it. When I try and export the data of the grid, it seems that its trying to bind my onDataBound event to all my charts as well?
Here is my view and JS
<div class="col-lg-12">
    <h3>Overall</h3>
    <h5>Value</h5>
    @(Html.Kendo().Chart(Model.LineChartDataVALTOT)
         .Name("TOTVALLineChart")
         .Theme("Silver")
         .ChartArea(chartArea => chartArea
             .Background("white")
         )
         .DataSource(dataSource => dataSource
             .Group(group => group.Add(model => model.Element))
             .Sort(sort => sort.Add(model => model.TransactionDate).Ascending())
         )
         .HtmlAttributes(new { style = "height:250px;" })
         .Series(series =>
         {
             series.Line(model => model.Value, categoryExpression: model => model.TransactionDate)
                 .Name("#= group.value #");
         })
         .Legend(legend => legend
             .Visible(false)
         )
         .ValueAxis(axis => axis.Numeric("Value")
             .Labels(labels => labels
                 .Format("R {0:N}")
                 .Skip(2)
                 .Step(2)
             )
         )
         .CategoryAxis(axis => axis
             .Categories(model => model.TransactionDate)
             .Date()
             .BaseUnit(ChartAxisBaseUnit.Days)
             .BaseUnitStep(7)
 
         ).Tooltip(tooltip => tooltip
             .Visible(true)
             .Format("R {0:N}")
         )
    )
</div>
 
    <div>
        @(Html.Kendo()
           .Grid<TitleListModel>()
           .Name("TitleList")
           .ToolBar(toolBar => toolBar.Custom()
                              .Text("Export To Excel")
                              .HtmlAttributes(new { id = "export" })
                              .Url(Url.Action("ExportNominalReportTitleGrid", "Dashboard", new { storeId = @Model.Stores.SelectedStoreId, page = 1, pageSize = "~", filter = "~", sort = "~" })))
    
           .Columns(columns =>
           {
               columns.Bound(c => c.ISBN13);
               columns.Bound(c => c.Title);
               columns.Bound(c => c.Author);
               columns.Bound(c => c.Publisher);
               columns.Bound(c => c.Value).Format("R {0:n2}").Title("Value");
               columns.Bound(c => c.Quantity).Format("{0:n0}").Title("Quantity");
               columns.Bound(c => c.ASP).Format("R {0:n2}").Title("ASP");
 
           })
           .Events(ev => ev.DataBound("onDataBound"))
           .Scrollable()
           .Groupable()
           .Sortable()
           .Pageable(pageable => pageable
                     .Refresh(true)
                     .PageSizes(true)
                     .ButtonCount(3))
           .DataSource(dataSource => dataSource
                         .Ajax()
                         .PageSize(20)
                         .Read(read => read.Action("NominalReportTitleGrid", "Dashboard", new { storeId = @Model.Stores.SelectedStoreId })))
         )
    </div>
function onDataBound(e) {
    var grid = $('#TitleList').data('kendoGrid');
    // ask the parameterMap to create the request object for you
    var requestObject = (new kendo.data.transports["aspnetmvc-server"]({ prefix: "" }))
        .options.parameterMap({
                                  page: grid.dataSource.page(),
                                  sort: grid.dataSource.sort(),
                                  filter: grid.dataSource.filter()
                              });
 
    // Get the export link as jQuery object
    var $exportLink = $('#export');
 
    // Get its 'href' attribute - the URL where it would navigate to
    var href = $exportLink.attr('href');
    //console.log("EXPORT" + href);
     
    // Update the 'page' parameter with the grid's current page
    href = href.replace(/page=([^&]*)/, 'page=' + requestObject.page || '~');
 
    // Update the 'sort' parameter with the grid's current sort descriptor
    href = href.replace(/sort=([^&]*)/, 'sort=' + requestObject.sort || '~');
 
    // Update the 'pageSize' parameter with the grid's current pageSize
    href = href.replace(/pageSize=([^&]*)/, 'pageSize=' + grid.dataSource._pageSize);
 
    //update filter descriptor with the filters applied
 
    href = href.replace(/filter=([^&]*)/, 'filter=' + (requestObject.filter || '~'));
 
    // Update the 'href' attribute
    //console.log("EXPORT" + href);
    $exportLink.attr('href', href);
}
The error I am getting is:
ReferenceError: onDataBound is not defined
...tion(){jQuery("#TOTVALLineChart").kendoChart({"chartArea":{"background":"white"}...
Rosen
Telerik team
 answered on 30 Sep 2014
1 answer
227 views
Hello,

my requirement is parent splitter has 2 vertical panes. Top pane has serach box and search button, lower vertical pane should have 2 horizontal pane and each horizontal pane should have 2 vertical panes each. First 2 steps worked fine but when i am splitting left horizontal pane to 2 vertical panes those 2 panes show horizontally and not vertically. Here is my razor view code, what am i possibly doing wrong

@(Html.Kendo().Splitter()
      .Name("objvertical")
      .Orientation(SplitterOrientation.Vertical)
      .Panes(objverticalPanes =>
      {          
          objverticalPanes.Add()
             .Size("50px")
             .HtmlAttributes(new { id = "obj-top-pane" })
             .Resizable(false)
             .Collapsible(false)
             .Content(@<text><div class="pane-content">Suchen:
 @Html.TextBox("searchbox")<input class="k-button" id="searchBtn" type="submit" value="Suchen" /> <input class="k-button" id="selectBtn" type="button" value="OK" style="width:45px" onclick="SelectObject();" />
                                         </div></text>);
           objverticalPanes.Add()
              .HtmlAttributes(new { id = "obj-bottom-pane" })
              .Scrollable(false)
              .Collapsible(false)
              .Content(
                Html.Kendo().Splitter()
                    .Name("horizontal")
                    .HtmlAttributes(new { style = "height: 100%;" })
                    .Panes(horizontalPanes =>
                    {
                        horizontalPanes.Add()
                            .HtmlAttributes(new { id = "top-pane" })
                            .Size("320px")
                            .Scrollable(false)
              .Collapsible(false)
                            .Content(
                            Html.Kendo().Splitter()
                    .Name("vertical")
                    .HtmlAttributes(new { style = "height: 50%;" })
                    .Panes(verticalPanes =>
                        {
                         verticalPanes.Add()
              .Size("100px")
              .HtmlAttributes(new { id = "middle-pane" })
               .Collapsible(true)
              .Content(@<div class="pane-content">
                            <h3>left top</h3>
                            <p>Resizable only.</p>
                        </div>);

          verticalPanes.Add()
              .Size("100px")
              .HtmlAttributes(new { id = "bottom-pane" })
              .Content(@<div class="pane-content">
                            <h3>left bottom</h3>
                            <p>Non-resizable and non-collapsible.</p>
                        </div>);
     }).ToHtmlString()

                    );

                        horizontalPanes.Add()
                            .HtmlAttributes(new { id = "right-pane" })
                            .Content(@<div class="pane-content">
                                        <h3>right most</h3>
                                        <p>Resizable only.</p>
                                      </div>);

                    }).ToHtmlString()
              );




      })
     )
Attached image left top and bottom show side by side
Anamika
Anamika
Top achievements
Rank 1
 answered on 30 Sep 2014
3 answers
306 views
In my ViewModel I have a List<SelectListItem> and I am using the MVC Extension Html.DropDownListFor to create the <select> element with its child <option> elements.

In javascript, I am turning that into a Kendo DropDownList
$('#ddCategories').kendoDropDownList();


I have a second DropDownList constructed in the same way (Html.DropDownListFor & in js, make it a Kendo DDL)
$('#ddProducts').kendoDropDownList();

I want to keep the initial page load fast and therefore want to keep the DropDownListFor in place, but I also want to allow the Categories change event to repopulate the Products DDL.  I can easily add the change event to the ddCategories DDL, but how can I configure the ddProducts to not load via AJAX on page load, but then to repopulate on the event of ddCategories change?  It seems to me you can either do one or the other, but this is not as efficient as I would like.

For example, I will eventually have upwards to 8-10 dropdowns on a single page, all cascading from each other (optionLabel not allowed, so first item will always be selected).  If I have them all cascade from each other on page load, that will take way too long (up to 7-9 sequential AJAX calls).  Ideally, I would populate them all from the ViewModel on page load and only perform the ajax refresh when the user interacts with the page (other issues with that many cascading drop downs that I will save for a different post once this question is answered)

Thanks,
--Ed
Vladimir Iliev
Telerik team
 answered on 30 Sep 2014
4 answers
599 views
I have a total score field in the master table that I need to update from the detail(sub) table. 

I think this would be achieved in the detailed(sub) table, every change I calculate the full total score and need to update the row that the sub table belongs to. I tried the set command on the top object , but it hasn't worked for me yet. 

Any ideas would be appreciated?

Thanks

-Andrew
Kiril Nikolov
Telerik team
 answered on 29 Sep 2014
2 answers
129 views
When using the k-rebind attribute in the grid it will rebind correctly but first it clears all the data. I have made a Demo Here to illustrate my point. I couldn't find any reference to this in any other threads.

Demo Link: http://dojo.telerik.com/iviT
Tim
Top achievements
Rank 1
 answered on 29 Sep 2014
3 answers
302 views
Hi

I'm trying to create a slider with min value = 0%, max value = 0.1% and increment 0.01%, i.e. min=0,max=0.001, step = 0.0001, however, it seems that the smallest step the slider works with is 0.001, is this some weird limitation of the slider or am I doing something wrong?

I have recreated it here:
http://dojo.telerik.com/etuvI


Hristo Germanov
Telerik team
 answered on 29 Sep 2014
12 answers
2.1K+ views
Hi all,
Problem reproduced at http://jsfiddle.net/nA95j/7/

It seems that specifying decimals="0" option in the HTML initialization of numeric text box does not work. The same option when given as a constructor option does work.

It is mentioned in the Release Notes for Kendo UI version 2012.1.322 that this is fixed (http://www.kendoui.com/web/whats-new/release-notes/q1-2012-version-2012-1-322.aspx) but I see it is happening in case of HTML based initialization for a numeric text box.

I am using MVVM binding so I cannot declare the numeric text box and its arguments separately. Any suggestions or workarounds?

Thanks.
Dimo
Telerik team
 answered on 29 Sep 2014
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
Licensing
ScrollView
Switch
TextArea
BulletChart
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
TimePicker
FloatingActionButton
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
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?