Telerik Forums
Kendo UI for jQuery Forum
3 answers
385 views
Hi everyone,

I am looking at the HTML version of the following example.

http://demos.telerik.com/kendo-ui/web/grid/local-data.html

Can someone explain to me where/how the data is getting bound to the grid? I imagine it has something to do with the "data: products," line, but I don't see any element with an id products. Is it coming from the "<script src="../../content/shared/js/products.js"></script>" ?

If so, could someone show how I would use a .js file to pull data from somewhere?

Thanks  
Dimiter Madjarov
Telerik team
 answered on 25 Mar 2014
1 answer
90 views
I have an array of JavaScript ascript objects that I am setting as the data source on a Kendo UI Grid.  When an update come in to one of the JavaScript objects, how can I update the values in the grid? 
Alexander Valchev
Telerik team
 answered on 25 Mar 2014
2 answers
4.3K+ views
hi all:
I have a problem, I have 10 column of the grid, 6 lines, now I want to calculate  this grid value of the column third total,pls help me ,thanks.
Nathan
Top achievements
Rank 1
 answered on 25 Mar 2014
1 answer
298 views
This is a Search page. where I enter the name and dept name and hit search, This should load my grid with all matching data from the backend database.
I cannot get this to work in mvc4 vs 2012. I am new to mvc and I really need help
Help!!!!!!!

Index.cshtml
@model MvcMaster.Models.SearchModel
@{
ViewBag.Title = "Search";
}
<h2>Search Policy</h2>
<section id="searchForm">
<script type="text/javascript">
//$(function () {
// $('#SearchBtn').click(function (e) {
$(document).ready(function () {
$('#SearchBtn').click(function () {
$.ajax({
type: 'POST',
contentType: "application/json; charset=utf-8",
dataType: "json",
data: '@(Url.Action("BtnClick", "Search"))',
success: function (result) {
var grid = $("#MyGrid").data("kendoGrid"); 
grid.dataSource.data(result);
grid.refresh();
}
});
return false;
})
})
</script>
@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl })) {
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)

<fieldset>
<legend>Search for a Policy</legend>
<ol>
<li>
@Html.LabelFor(m => m.Name)
@Html.TextBoxFor(m => m.Name)
@Html.ValidationMessageFor(m => m.Name)
</li>
<li>
@Html.LabelFor(m => m.DeptName)
@Html.TextBoxFor(m => m.DeptName)
@Html.ValidationMessageFor(m => m.DeptName)
</li> 
<input type="submit" value="Search" id="SearchBtn"/>
<div id="searchGrid">
@(Html.Kendo().Grid<MvcMaster.Models.SearchModel>()
.Name("PolicyGrid")
.AutoBind(false)
.DataSource(dataSource => dataSource.Ajax()
.Read(read => read.Action("BtnClick", "Search"))
.PageSize(20)
)
.Columns(columns =>
{
columns.Bound(c => c.Id);
columns.Bound(c => c.Name).Title("Name");
columns.Bound(c => c.EMpNumber).Title("Id");
columns.Bound(c => c.JoinDate).Title("Effective Date");
columns.Bound(c => c.DeptName).Title("Department");
})
.Pageable(page => page.Enabled(true).PageSizes(new[] {10, 20, 30, 40}))
.Sortable(sorting => sorting.SortMode(GridSortMode.SingleColumn))
.Scrollable()
 )))
</div>
</fieldset>
}
</section>

@section Scripts {
@Scripts.Render("~/bundles/jqueryval")

}

Model.cs
public class SearchModel
{
public string Id { get; set; }
public string Name { get; set; }
public string EmpNumber { get; set; }
public DateTime JoinDate { get; set; }
public stringDeptName { get; set; }
 
}

Controller
// POST: /Search/
[HttpPost]
 
public ActionResult BtnClick(string name, string DptName, [DataSourceRequest]DataSourceRequest request)
{
DataTable dt = new DataTable();
using (SqlConnection con = new SqlConnection(connectionstring))
{
SqlCommand cmd = new SqlCommand("sp_mysproc", con);
cmd.CommandType = CommandType.StoredProcedure; 
cmd.Parameters.AddWithValue("@searchEmpName", name);
cmd.Parameters.AddWithValue("@searchDeptName", DptName); 
con.Open();
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
da.Fill(dt);

DataSourceResult result = dt.ToDataSourceResult(request);
 return Json(result, JsonRequestBehavior.AllowGet);
}
}
Vladimir Iliev
Telerik team
 answered on 25 Mar 2014
1 answer
143 views
Any thought or discussions existing about adding a Kendo UI Web widget for visually filtering data sources?
(Like asp.net ajax radfilter)

We are making a new external application with asp.net mvc 4 and angular-kendo integration (AngularJS Directives) so I would have to have to try to hack in an asp.net ajax control or try to recreate it from scratch... We also have a WPF application internally and it has major use of the similar WPF RadDataFilter which our users have gotten use to over the last couple years.
Sebastian
Telerik team
 answered on 25 Mar 2014
3 answers
240 views
Hi

Can anyone help me with defining a toolbar template for a grid that is a child of a tabstrip? As I am already using @<text> at the tabstrip level, it doesn't allow me to use it at the child grid level and throws an error. I then tried using the following code but it still produces an error:

@(Html.Kendo().TabStrip() 
.Name("tabStrip_PickingAssigment") 
.SelectedIndex(0) 
.Animation(animation => animation.Open(open => open.Fade(FadeDirection.In))) 
.Items(items => 

items.Add().Text("Assignments").Content(@<text> 
@(Html.Kendo().Grid<DataModels.Picking.PickingAssignmentViewModel>() 
.Name("grid_PickingAssigment") 
.ToolBar(toolBar => 

toolBar.Template(toolbarTemplate); 

}) 
.Columns(columns => 

columns.Bound(a => a.Id).Width(100); 
}) 
.Filterable(filterable => filterable 
.Extra(false) 
.Operators(operators => operators 
.ForString(str => str.Clear() 
.StartsWith("Starts with") 
.IsEqualTo("Is equal to") 
.IsNotEqualTo("Is not equal to") 

.ForNumber(str => str.Clear() 
.IsEqualTo("Is equal to") 
.IsNotEqualTo("Is not equal to") 
.IsGreaterThan("Is greater than") 
.IsLessThan("Is less than") 

.ForDate(str => str.Clear() 
.IsEqualTo("Is equal to") 
.IsNotEqualTo("Is not equal to") 
.IsGreaterThan("Is greater than") 
.IsLessThan("Is less than") 



.Sortable() 
.Pageable(x => x.PageSizes(new int[] { 10, 20, 50, 100 }).Info(false)) 
.ColumnMenu() 
.Scrollable() 
.Resizable(resize => resize.Columns(true)) 
.Selectable(selectable => selectable.Mode(GridSelectionMode.Multiple)) 
.DataSource(dataSource => dataSource 
.Ajax() 
.Batch(false) 
.ServerOperation(true) 
.Model(model => 

model.Id(v => v.Id); 
model.Field(v => v.Id).Editable(false); 
model.Field(v => v.CreatedDate).DefaultValue(System.DateTime.Now).Editable(false); 
}) 
.Read("PickingAssignmentListByUserGroupId", "Picking", new { Id = "#=Id#" }) 

.ToClientTemplate() 

</text> 
); 


<script id="toolbarTemplate" type="text/x-kendo-template"> 
debugger; 
<hgroup class="title"> 
<h1>@ViewBag.Title</h1> 
</hgroup> 
@Html.Kendo().Menu().Name("GridMenu").Items(items => 

items.Add().Text(@UserInterface.Resources.GlobalRes.Delete).SpriteCssClasses("k-icon k-delete").HtmlAttributes(new { @id = "delete", @class = "k-button k-button-icontext k-grid-delete" }); 
}) 
</script>
Ian
Top achievements
Rank 1
 answered on 25 Mar 2014
3 answers
153 views
Hi
After testing my umbraco site on IE8, I found the my kendoMenu do not style correctly and the hover do not open the submenu.

my head:
<script src="~/scripts/jquery.min.js"></script>       
<script src="~/scripts/kendo.web.min.js"></script>
<script src="~/scripts/modernizr.custom.76706.js"></script>
<script src="~/scripts/Base.js"></script>
 
<link rel="shortcut icon" href="~/css/imgs/Altex-favicon.ico" >       
<link href="~/css/Themes/kendo.common.min.css" rel="stylesheet" />
<link href="~/css/Themes/kendo.silver.min.css" rel="stylesheet" />
<link href="~/css/Main.css" rel="stylesheet" />


my HTML:
               <table class="TableMenu">
                    <tr>
                        <td rowspan="2" class="TdLogo"><a href="/"><img alt="Altex" width="200" src="/css/imgs/Logo_Altex.jpg" /></a></td>                       
                        <td class="NavG"><ul id="NavG" class="menu">
    <li>
        <a class="MenuSelected" href="/home.aspx">Home</a>
    </li>
    <li>
        <a class="" href="/about-altex.aspx">About Us</a>
                <ul>
                        <li>
                            <a href="/about-altex.aspx">About Altex</a>
                        </li>
                        <li>
                            <a href="/about-altex/why-us.aspx">Why Us</a>
                        </li>
                        <li>
                            <a href="/about-altex/child-safety.aspx">Child Safety</a>
                        </li>
                        <li>
                            <a href="/about-altex/environmental-responsibility.aspx">Environmental Responsibility</a>
                        </li>
                </ul>
    </li>
    <li>
        <a class="" href="/your-needs.aspx">Our Fabrics</a>
                <ul>
                        <li>
                            <a href="/your-needs.aspx">Your Needs</a>
                        </li>
                        <li>
                            <a href="/your-needs/ambio®.aspx">Ambio®</a>
                        </li>
                        <li>
                            <a href="/your-needs/transparent.aspx">Transparent</a>
                        </li>
                        <li>
                            <a href="/your-needs/translucent.aspx">Translucent</a>
                        </li>
                        <li>
                            <a href="/your-needs/opaque.aspx">Opaque</a>
                        </li>
                </ul>
    </li>
    <li>
        <a class="" href="/our-products.aspx">Our Products</a>
                <ul>
                        <li>
                            <a href="/our-products.aspx">Our Products</a>
                        </li>
                        <li>
                            <a href="/our-products/roller-shade.aspx">Roller Shade</a>
                        </li>
                        <li>
                            <a href="/our-products/aleoâ„¢.aspx">Aleoâ„¢</a>
                        </li>
                        <li>
                            <a href="/our-products/panel-track.aspx">Panel Track</a>
                        </li>
                        <li>
                            <a href="/our-products/roman-shade.aspx">Roman Shade</a>
                        </li>
                        <li>
                            <a href="/our-products/inclinable-roman-shade.aspx">Inclinable Roman Shade</a>
                        </li>
                        <li>
                            <a href="/our-products/ready-to-install-shade.aspx">Ready-to-install Shade</a>
                        </li>
                        <li>
                            <a href="/our-products/fixed-multiform-shade.aspx">Fixed Multiform Shade</a>
                        </li>
                </ul>
    </li>
    <li>
        <a class="" href="/warranty.aspx">Support</a>
                <ul>
                        <li>
                            <a href="/warranty.aspx">Warranty</a>
                        </li>
                        <li>
                            <a href="/warranty/faq.aspx">FAQ</a>
                        </li>
                        <li>
                            <a href="/warranty/security.aspx">Security</a>
                        </li>
                </ul>
    </li>
    <li>
        <a class="" href="/contact-us.aspx">Contact Us</a>
    </li>
</ul>
 
</td>
                    </tr>
                    <tr>                       
                        <td><ul class="NavC-Hidden">
</ul></td>
                    </tr>
                </table>



My JS
$('#NavG').kendoMenu();


Any suggestion?
Note: I try the kendo menu demo on the old IE8 station, and all is working. The same site in IE11 work like a charm. What I missed out?!
Thanks
See pic1 for IE11 demo
See pic2 for IE8 demo
Kamen Bundev
Telerik team
 answered on 25 Mar 2014
1 answer
2.1K+ views
Hello,
I would like to create a grid with treeview as a first column. Similiar to this: image
Is it possible? How could I achieve this scenario? Grid should be filterable, scallable, scrollable and pageable.


Alexander Valchev
Telerik team
 answered on 25 Mar 2014
8 answers
3.8K+ views
Hello, 

is there a possibility to create a custom footer template for the grid? I haven't found anything in the examples. 

I want to implement paging with "first", "last", "previous" and "next" buttons and a textbox where a page number can be entered. 

Luciano
Top achievements
Rank 1
 answered on 25 Mar 2014
3 answers
1.0K+ views
Hi,

I need help on number formats in e.g. Kendo grid.
My number is 123456,78 and I need a format like 123.456,780.
In different threads I read formats like "{0:c}", "{0:0.000}", etc..
But I don't understand the formatting.
What means the 0 before the colon, and what possibilities I have to format the numbers?

Thanks for any help!
Masaab
Top achievements
Rank 1
 answered on 24 Mar 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
ScrollView
Switch
BulletChart
Licensing
QRCode
ResponsivePanel
TextArea
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
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?