Telerik Forums
Kendo UI for jQuery Forum
2 answers
67 views
The ComboBox binding to remote data demo is broken.  When it tries to bind the combobox, it throws the error "Uncaught SyntaxError: Unexpected token > ".  This happens in both Chrome 26 and IE8.

I tried to submit a bug report about this, but kept getting server errors when I tried to submit.
Richardsonke
Top achievements
Rank 1
 answered on 15 Feb 2013
3 answers
178 views

I have this situation:

I have some Views and by default they have assigned a Layout for them. The problem is that in some specific cases, I need to change the Layout of some of these Views in the Javascript file.

I am using this way:

$("#tabstrip-dash").setAttribute('data-layout', 'mobile-tabstrip-layout2');

This solution works only if I reload the application, but I want to change it instantly.

Is there any way to set the new Layout?

Thanks!

Alexander Valchev
Telerik team
 answered on 15 Feb 2013
1 answer
204 views
Hi,

I encountered a problem with listview endless scrolling.
The endless scrolling stops working after refesh the datasource.

I made a jsFiddle http://jsbin.com/amifov/3/edit

Try to make an endless scroll action and then hit the refresh button.

Thanks,
Martin
Georgi Krustev
Telerik team
 answered on 15 Feb 2013
1 answer
163 views
Hi All,

Just wondering if there is an out of the box solution for my small but frustrating issue: 

I am plotting bubbles on a chart, that has a y-axis of, say, min 0 and max 200. If I plot a bubble at y-0 the bubble will naturally cover the x-axis, which is correct. However, the way my chart has been designed (drop shadow involved!), I do not want the bubble to cover the x-axis line, I need some sort of buffering so min y-axis value appears higher up, therefore the whole bubble can fit into the chart, within the x-axis.

Any advice would be appreciated!

Cheers
Chris
Alexander Valchev
Telerik team
 answered on 15 Feb 2013
2 answers
128 views
So I have a scenario which I believe should be do-able in some form however I can't seem to figure out how to do it. Take for example the batch editing on the demo page: Batch Demo

Now imagine I've added another column which is now "Total Cost". What I'd like to do is trap on either a change in "Unit Price", or change in "Unit Stock" and be able to update the "Total Cost" field, and mark that as dirty.

I can go into the datasource and alter the value, but it seems when I refresh the grid, the dirty statuses are cleared. Is there a nicer way to do this that I'm missing?
Brian
Top achievements
Rank 1
 answered on 15 Feb 2013
4 answers
437 views
I'm just evaluating the Kendo grid for an upcoming project and I'm hunting for demos for the functionality that I need.

I have created a grid in an asp.net razor view that takes a viewmodel.  A couple of the model properties are enums which display nicely but when clicking into the cell just render a text box with the enum value (1,2,3,etc).

Does anyone have a demo where the edit field is an appropriate dropdown rather than the raw value of the enum?

Thanks in advance :)

=================================================================================

For reference the model and view I'm using are:
public class HomeMonitorViewModel {
 
  public int Id { get; set; }
  [Required, StringLength(255)]
  public string Name { get; set; }
  [Required, StringLength(128)]
  public string HostSystem { get; set; }
  public string Description { get; set; }
  public Data.MonitorClassification Classification { get; set; }
  public DateTime DateAdded { get; set; }
  public bool HasBeenAdministered { get; set; }
  public Data.MonitorSource Source { get; set; }
  public int MonitorAliasId { get; set; }
  public string MonitorAliasName { get; set; }
 
}
 
public enum MonitorClassification {
  Default = 1,
  Standard = 2,
  Bespoke = 3
}
 
public enum MonitorSource {
  Policy = 1,
  Adhoc = 2,
  Unknown = 3
}
@(Html.Kendo().Grid<ProjectBlackSun.Models.Home.HomeMonitorViewModel>()
  .Name("MonitorGrid")
  .Columns(c => {
    c.Bound(m => m.Name);
    c.Bound(m=>m.MonitorAliasName);
    c.Bound(m=>m.Description);
    c.Bound(m=>m.HostSystem);
    c.Bound(m=>m.Classification);
    c.Bound(m=>m.Source);
  })
  .ToolBar(t => {
    t.Create();
    t.Save();
  })
  .Editable(e => e.Mode(GridEditMode.InCell))
  .Pageable()
  .Sortable()
  .DataSource(d => d
    .Ajax()
    .Batch(true)
    .ServerOperation(false)
    .Events(e => e.Error("error_handler"))
    .Model(model => model.Id(monitor => monitor.Id))
    .Create("MonitorGridCreate", "Home")
    .Read("MonitorGridRead", "Home")
    .Update("MonitorGridUpdate", "Home")
    .Destroy("MonitorGridDestroy", "Home")
  )
)
 
<script type="text/javascript">
    function error_handler(e) {   
        if (e.errors) {
            var message = "Errors:\n";
            $.each(e.errors, function (key, value) {
                if ('errors' in value) {
                    $.each(value.errors, function() {
                        message += this + "\n";
                    });
                }
            });       
            alert(message);
        }
    }
</script>



Nick
Top achievements
Rank 1
 answered on 15 Feb 2013
1 answer
214 views
Hello,

I have added an example of the problem, see:
http://jsbin.com/edamuj/427/edit

I have an editable grid and want to connect it with an editable datasource. This works if I create the grid with the datasouce available. However in my solution I am not sure when the js for the datasource is rendered but if it is rendered I register it in a kendo observable array. A function to set the the grids datasource is bound the change event of the observable array. After this function fires I would like the grid to show the data. Unfortunately this is not working. I simplified the problem and added it as an example. Can someone explain to me what I am doing wrong here?

Marcel
Rosen
Telerik team
 answered on 15 Feb 2013
1 answer
143 views
Hello, I need to fill TreeView Object from asmx webservice.
The data must be:
Main
    DepA
         A
             A1
    DepB
        B
          B1
..............................................................
I don't need to get all data for tree creation for the first time.
I need append the nodes, from the webservice and 'refresh' the tree
The node must include the ID & Name.
How I must organize the WebServise? What format of data must be returned?
How I could append new node and recreate tree?
Petur Subev
Telerik team
 answered on 15 Feb 2013
1 answer
260 views
I have a grid where the columns are dynamic.  By default (no schema set) all the columns are strings which causes the sorting to not be that helpful.

I use a web service that returns json to get the data for the grid, can I define the column types there or would that be a separate call?

Once I know the column types is it possible to set the column format based on the type? 

I have some code that defines the field type for columns if I know their exact name but that isn't very practical because there are many different possible column names.
schema: {
    model: {
        fields: {
            ReportDate: {
                type: "date"
            },
            Age: {
                type: "number"
            }
        }
    }
}
I also have some code that sets the template or format for a given column but it is also hard coded and not scalable.
//make first column a link using values from two columns
columns[0].template = "<a href='somepage.html?rid=#=ReportID#' target='_blank'>#=ReportNum#</a>";
 
//make sure value in 3rd column is formatted as a date
columns[2].format = "{0:M/d/yyyy h:mm tt}";
Any help would be appreciated. 
Alexander Valchev
Telerik team
 answered on 15 Feb 2013
1 answer
165 views
I am using the Kendo grid in remote virtualization mode for a very large data set. My stored procedures are aware of paging and capable of returning partial data fetches, instead of returning all rows for every request. Each service call will return exactly one page worth of data (100 records) based on my start/end markers. I use the request object to calculate the appropriate offsets for the next pull.

There are several 1000 records in my total record set, so I would like to avoid pulling all the data for every request.

However, for some reason I am not able to use ToDataSourceResult to build the JSON object that the grid expects to be passed back from my virtualization action:

EX:
public ActionResult Virtualization_GetProducts([DataSourceRequest] DataSourceRequest request, int productId)
        {
   int startIndex = (request.Page - 1) * request.PageSize + 1;
            int endIndex = startIndex + request.PageSize - 1;
            var result = service.GetProducts(productId,startIndex,endIndex);

            return Json(result.ToDataSourceResult(request));
        }

The result that I get is {"Data":[],"Total":100,"AggregateResults":null,"Errors":null} -- even though I get back the expected result from the service.

If I instead return all the data without using startIndex/endIndex the grid is able generate the correct JSON.

All the examples I've found (including your demo) involve pulling all the data in your data source every time. Is there a way to make this work with a data source that supports its own paging like above?
Rosen
Telerik team
 answered on 15 Feb 2013
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
Drag and Drop
Application
Map
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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
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?