Telerik Forums
Kendo UI for jQuery Forum
2 answers
289 views
Hi:
I am updating after initial rendering.  I am manually modifying the datasource data as follows:  
<div id ="listView2"></div>
<script>
    $("#listView2").kendoListView({
        dataSource: { data: [] },
        template: "<div>#:name#</div>"
    });
    var listView2 = $("#listView2").data("kendoListView");
    listView2.dataSource.data = [ { name: "Jane Doe" }, { name: "John Doe" }];
    listView2.refresh();
</script>
I expected the refresh after the data assignment to render the ListView widget, but the value of length is never set when refresh is called.

Phil
Phil H.
Top achievements
Rank 2
 answered on 17 Jun 2014
6 answers
247 views
Hi,

We are currently evaluating kendo UI charts, and here is our use case.

we need to display large number of points on line chart, for a date range selected.

We plan to use 2 charts on a page, one will be a selection/navigation chart (like this one: http://demos.telerik.com/kendo-ui/chart-api/selection) used to select date range. 2nd chart will be a line chart with multiple series. (screen cap attached)

Also we plan to have navigation options "<Next> Month, Week, Day <Prev>" so that user has an option to move/navigate through dates (without clicking/dragging the zipper on the navigation chart). During this we want the keep the navigation chart synchronized with Next/prev buttons navigation.
we could achieve this by setting:

navchart.options.categoryAxis.select.from
navchart.options.categoryAxis.select.to

But each time we need to do navchart.refresh() to reflect the changes.

This is causing some performance issues when the charts have more number of points (taking abt 5 to 6 seconds to redraw both charts for 3 series, each with 6000 points).
I noticed we can cut this time by half if I don't refresh the Selection/navigation chart (which really does not need to refresh, other than just moving the date selection zipper to keep both charts synchronized)

I have attached a screen shot of how our chart page looks like.

Please suggest on how to keep the Navigation/Selection chart synchronized without refreshing it each time.

Thanks very much!







Can you please suggest
Hristo Germanov
Telerik team
 answered on 17 Jun 2014
1 answer
183 views
Hi Team -

I am trying to play with locked columns within Kendo MVC Grid. No doubt, It is very intuitive. But when I'm trying to add a custom CssClass to grid table using TableHtmlAttributes method, It does not work

.TableHtmlAttributes(new { @class = "blue" })

It works well without locked column. Can you please suggest?

Thanks,
Raman
Dimiter Madjarov
Telerik team
 answered on 17 Jun 2014
2 answers
764 views
View:
@(Html.Kendo().Grid<ITNBuy.Models.BuyBuilder>()
.Name("gdBuy")
.AutoBind(false)
.HtmlAttributes("@class=gdBuy")
.Columns(columns =>
{
    columns.Bound(p => p.cName).Title("Market").Width(150);    
    columns.Bound(p => p.cStation).Title("Station").Width(100);
    columns.Bound(p => p.cDemo).Title("Demo").Width(100);
    columns.Bound(p => p.cProduct).Title("Prod").Width(100);
    columns.Bound(p => p.cDayofweek).Title("Days").Width(100);
    columns.Bound(p => p.cTime).Title("Time").Width(100);
    columns.Bound(p => p.cCode).Title("Code").Width(100);
    columns.Bound(p => p.cProgram).Title("Program").Width(100);
    columns.Bound(p => p.Cncl).Title("Cncl").Width(100);
})
.HtmlAttributes(new { style = "height:430px;" })
.DataSource(dataSource => dataSource
    .Ajax()
    .Batch(true)
    .Read(read => read.Action("PopulateGrid", "BuyBuilder")
        .Data("LoadParameters")
        )
    .Update(update => update.Action("Products_Update", "BuyBuilder"))
    .Destroy(destroy => destroy.Action("Products_Destroy", "BuyBuilder"))
    .ServerOperation(false) //false = don't read on page load
    .PageSize(100)
    //.Events(events => events.Error("error_handler"))
    .Model(model =>
            {
                model.Id(p => p.buylineid);
                model.Field(p => p.buylineid).Editable(false);                
            })   
)       
.Pageable()
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Selectable()
.Sortable(sortable => sortable
    .AllowUnsort(true   )
    .SortMode(GridSortMode.MultipleColumn))
.Scrollable(scrollable => scrollable.Virtual(true))
.ToolBar(toolBar =>
        {
            toolBar.Create();
            toolBar.Save();
        })    
)

Controller:
 public ActionResult PopulateGrid(string quarters, int? market, string station,
            string client, string contract, int? show, string cost, string dp, 
            string start, string end,
            string sortBy, bool blnFilter, bool includeTrade, bool exact, bool tradeonly,  bool option, 
            [DataSourceRequest]DataSourceRequest request)
        {
            var userid = Session["UserId"].ToString();
            int id = Int32.Parse(userid);

            return Json(db.GetData(quarters, market, station, client, contract, show, cost, dp, start, end, sortBy, blnFilter, includeTrade, exact, tradeonly, option, id).ToDataSourceResult(request), 
        }

GetData Function:
 public List<BuyBuilder> GetData(string quarters, int? market, string station,
            string client, string contract, int? show, string cost, string dp, string start,
            string end, string sortBy, bool blnFilter, bool blnIncludeTrade, bool blnExact, bool blnTradeonly,
            bool blnOption, int userId)
        {
            List<BuyBuilder> list = new List<BuyBuilder>();

            string conn = ConfigurationManager.ConnectionStrings["DevConnString"].ConnectionString;
            SqlConnection cn = new SqlConnection(conn);

            SqlCommand oCmd = new SqlCommand("Buy_BuyLine_Load", cn);

            oCmd.CommandType = CommandType.StoredProcedure;
            oCmd.Parameters.Add("@strQuarters", SqlDbType.VarChar).Value = quarters;
            oCmd.Parameters.Add("@strStation", SqlDbType.VarChar).Value = station;
            oCmd.Parameters.Add("@intShow", SqlDbType.Int).Value = show;
            oCmd.Parameters.Add("@intUserId", SqlDbType.Int).Value = userId;
            oCmd.Parameters.Add("@intMarket", SqlDbType.Int).Value = market;

            SqlDataAdapter oAdptr = new SqlDataAdapter(oCmd);

            DataSet dsResults = new DataSet();
            cn.Open();
            //oCmd.ExecuteNonQuery();
            oCmd.CommandTimeout = 600;
            // oAdptr.Fill(dsResults, "Results");
            cn.Close();

            var dataTable = new DataTable();
            oAdptr.Fill(dataTable);

            string costConvert = "";
            foreach (DataRow dr in dataTable.Rows)
            {
                BuyBuilder u = new BuyBuilder();
                u.buylineid = ((long)dr["buylineid"]);
                u.cName = dr["cName"].ToString();
                u.cStation = dr["cStation"].ToString();
                u.cDemo = dr["cDemo"].ToString();
                list.Add(u);
            }
            return list;
        }

Not sure how many records before it fails but i know it works for 2500 records and fails for 5000 records.  The grid just does not display the data once it returns more than 5000 records.  Please help. I also tried virtualization and that did not work as well.


Xinzhou
Top achievements
Rank 1
 answered on 17 Jun 2014
1 answer
71 views
Hello,

I have an grid bounded to some data & now I want to apply some pre-defined filters & sort to the Grid. If I use the methods dataSource.filter(initialFilter) or dataSource.sort(sortParams) an immediate request is sent to the controller. 

I want to do this operations offline & once I have added both the Sorts & Filters I want to do dataSource.read() which than my server side code shall take care of the added sorts & filters

Can you let me know how can I achieve the same?

Thanks & Regards,
Manoj Kapoor
Manoj
Top achievements
Rank 1
 answered on 17 Jun 2014
3 answers
582 views
This doesn't make any sense to me. I don't see it pointed out anywhere in the docs either.

You can see in the custom validator example:

productnamevalidation: function (input) {
  if (input.is("[name='ProductName']") && input.val() != "") {}

I didn't pay any attention to the .is()​ at first, but now I know why. I thought updating to the latest KendoUI would resolve the issue, but it does not. You can still see the behavior on the trykendo site: http://trykendoui.telerik.com/ajat/2. Open the console and you can see that it runs for every field.

Please incorporate the .is() check or another approach so that I don't have to remember to do it...
Kiril Nikolov
Telerik team
 answered on 17 Jun 2014
3 answers
152 views
Hello,

I am trying a simple layout as below.
The footer element doesn't show on any device.

Thanks for  your time and help.

--
Hiren



<!DOCTYPE html>

<html>
<head>
<title>Navy 4 Seniors</title>
<link href="../resources/css/kendo.mobile.all.min.css" rel="stylesheet" />
</head>

<body>

<div id="home" data-role="view" data-layout="default">KendoUI  Mobile World</div>
<section data-role="layout" data-id="default">
<header data-role="header">
<div data-role="navbar">Header</div>
</header>
<footer data-role="footer">
<div data-role="tabstrip">
<a href="#home">Footer</a>
</div>
</footer>
</section>
<script src="../resources/js/jquery.min.js"></script>
<script src="../resources/js/kendo.all.min.js"></script>
<script>
        var app = new kendo.mobile.Application();
    </script>
</body>
</html>
Kiril Nikolov
Telerik team
 answered on 17 Jun 2014
10 answers
1.3K+ views
I am using Bootstrap on a page that has the HTML 5 Report Viewer and the HTML 5 Report Viewer completely goes away.  If I remove the link to Bootstrap the HTML 5 Report Viewer is shown and works again.

I am using Bootstrap on all of my other pages.  How can I get Bootstrap to work on the pages where I have the HTML 5 Report Viewer?

Thanks and Best Regards,

Mark Kilroy
Stef
Telerik team
 answered on 17 Jun 2014
1 answer
257 views
Hi All,
Probably a simple question for you experienced folk.  How do I get the id of the element being dropped in the onDrop function?

​$(".dropArea").kendoDropTarget({ group: "choicesGroup", drop: onDrop });

function onDrop(e) {
                 /* how to get the id of the element being dropped? */
            }

Thank you!
Alexander Valchev
Telerik team
 answered on 17 Jun 2014
1 answer
166 views
We need to implement a treeview with checkboxes in a dropdownlist so that multiple selections can be made by the user, like the functionality offered now by RadDropDownTree for WebForms. I see there is an example of a treeview (no checkboxes) in a drop down. We are developing now in MVC and would like to be able to do replicate this functionality with jQuery.
Can you provide example code of how to implement a treeview with checkboxes for multiselect in a dropdown?
Thanks.
Dimiter Madjarov
Telerik team
 answered on 17 Jun 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
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?