Telerik Forums
UI for ASP.NET MVC Forum
1 answer
191 views

I have a chart that is pulling data from a web service.  That data has Dates in it, and if I use that date object as a label, the chart think's it's in GMT time and then changes the hours to match the local time.  In my case, I'm in Central Time Zone, so it's 6 hours off from GMT, so it subtracts 6 hours from the ReadingDate and displays it as 6 hours off.  Is there any way to stop the label formatting from changing the datetime?

  $("#ChartContents").kendoChart({
    theme: $(document).data("kendoSkin") || "default",
    dataSource: App.ChartDataSource,
    title: { text: "Energy Usage In Days", visible: false },
    seriesDefaults: { type: "line" },
    series:
    [
      { type: "line", field: "kWh", name: App.CurrentDeviceName, axis: "WattAxis", color: "#FF9900" },
      { type: "line", field: "kWh2", name: App.CurrentDeviceName2, axis: "WattAxis", color: "#339900" },
    ],
    categoryAxis: {
      labels: { rotation: -90, dateFormats: { minutes: "HH:mm", hours: "HH:mm", days: "ddd, MMM d", months: "MMM yyyy", years: "yyyy" } },
      type: "Date",
      field: "ReadingDate",
      baseUnit: App.DayChartBaseUnit,
      majorGridLines: { visible: false }
    },
    valueAxis: [{ name: "WattAxis", title: { text: "kWh" }, min: 0, color: "#FF9900" }],
    tooltip: { visible: true, format: "{0:N0}", template: "Date: #= dataItem.DisplayDate # <br />kWh 1: #= dataItem.kWh # <br />kWh 2: #= dataItem.kWh2 #" },
    legend: { position: "bottom" }
  });


Hristo Germanov
Telerik team
 answered on 11 Jan 2013
1 answer
112 views
Hi All,

I was trying out the window component but it didn't work when I tried to open it from javascript:
$("#Window").data("kendoWindow").open();

I found out I had to update my jQuery to 1.8.x in order for it to work, and it did. But then another problem arose, my grid component has now shrunk. The DIV containing the grid still has the correct height but the k-grid-content DIV now has fixed height of 25px. The problem dissapears when I don't use .Scrollable(). Does anyone have the same issue or can explain to me what I have to do?

I'm using jQuery 1.8.2 and Kendo version 2012.3.1114. (Before the jQuery update I was using jQuery 1.7.1).

Thanks in advance!

Lennart


Vladimir Iliev
Telerik team
 answered on 11 Jan 2013
1 answer
185 views
Can i have a control over how it looks and where to show it the popup template generated by default?
i noticed that without any cshtml file,automatically show a view with all the fields from the viewModel somewhere at the bottom,and maybe i want to show in the center of the screen,and the controls be with some width and some color.
Also,In case of a custom template(view) how do i use it with the grid in the popup mode ?
Thanks in advance,
Vladimir Iliev
Telerik team
 answered on 11 Jan 2013
3 answers
1.8K+ views
Hi Telerik Team,

I've a grid with column "sequence" and it needs to be auto incremented. 

if you see the picture, when I click on Add new item, the value in sequence column needs to be 40 and not 5.

Can you please let me know how to create an increment column which takes the latest added data (sequence) and increments it?

Thank you
Vladimir Iliev
Telerik team
 answered on 11 Jan 2013
1 answer
266 views
Hi!
(see edit - base questions fixed)

After implementing the grid for some of our core object listings using a combination of server-side and ajax databindings we have realized we would like to speed up the grid sorting/filtering/searching as well as implementing some more advanced scenarios.

After some reasoning we came up with the idea to use a local datasource and to manipulate evering in memory. However we couldnt find a straight-forward way of doing this. We expected something like:

@(Html.Kendo().Grid(Model.GridRows)
   //...
       .DataSource(dataSource =>
                        {
                            dataSource.Local()
                                .Model(model => model.Id(s => s.Id))
                                .Sort(sort => sort.Add(s => s.Name));
                        })
)

However we realize it would be problematic to do CRUD operations using this approach - for that we would prefer to be able to use Ajax.

So - hopefully I have explained the idea reasonably well. Basically:
  • Is there any good way to use a local datasource (custom js-driven supporting filtering etc)? 
  • Is there any good way to take direct control of the datasource (like @Html.DataSource().... and use that is some way)?

Edit: We realized we could use dataSource.Ajax().ServerOperation(false) to achieve the base behaviour. We can probably figure out how to do some advanced filtering using the Web demos. The second point we still wonder about though - is it possible to use the datasource more directly? For example using a shared datasource or doing some more custom refreshing scenarios without resorting to an all-javascript approach?

Thanks
/Victor
Atanas Korchev
Telerik team
 answered on 10 Jan 2013
3 answers
280 views
Is it possible to get the vsdoc file for just the kendo.web js ? Or, can I use the kendo.all file and just rename it to kendo.web-vsdoc.js?

BOb
Atanas Korchev
Telerik team
 answered on 10 Jan 2013
1 answer
189 views

I am using the MVC Helpers and would like to customize the generated Javascript - in particular, the js class name that is used.

For example, if I do something like this:

                @(Html.Kendo().Grid<ResourceViewModel>()
                    .Name("Grid")
                    .BindTo(Model.Resources)
                    .YadaYadaYada(...)
                )

... then it generates JavaScript for me like this, which creates a kendoGrid in JS:

        jQuery(function(){jQuery("#Grid").kendoGrid({ ... yada yada yada ...

I would like to change the kendoGrid class above to my own custom Widget class. So instead of kendoGrid, I have created a kendoCustomGrid which I would like to have generated instead.

What's the best way to do this?

Atanas Korchev
Telerik team
 answered on 10 Jan 2013
2 answers
2.3K+ views
Hi,

I would like to add a new row to the grid programatically (with certain values, let's say "111", "Mike") everytime a button is clicked(or another event happens, the button clicked is just an example). Can I do that in javascript (hooking the update event on button.click)?
Zora
Top achievements
Rank 1
 answered on 10 Jan 2013
2 answers
446 views
I have a web application, built using MVC 3 and Kendo extensions for MVC version 2012.3.1210.

I'm using the format function to format dates shown in Grids, however they are displaying in the US format (i.e. month first, then day), instead of the UK format, even though I'm setting the kendo culture to en-GB.
e.g.:- The field definition
columns.Bound(p => p.attdate).Title("Att Date").Format("{0:d}");

and the culture reference in _Layout.cshtml :-
<script type="text/javascript">
        //set current to the "en-GB" culture script
        kendo.culture("en-GB");
</script>

The dates shown in date picker controls are fine, - just when displayed in grids.  How can I get UK dates to display?

AP
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 10 Jan 2013
5 answers
576 views
We are using the MVC4 minification (web greese) stuff. To me there is a bug where if I specify the .min.js files in the bundle and we run in debug mode the bundles don't work because it expects non-minified versions. 

I know I can just copy the minified versions with new names but I would like to have the non-minified script files so when debugging we can actually see what is happening. 

Is it possible for you guys to include those files in the releases? If not, is there some place I can get them?

BOb
Sebastian
Telerik team
 answered on 10 Jan 2013
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Security
Wizard
Styling
Chat
DateInput
MediaPlayer
TileLayout
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?