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

My grid has a lot of columns. When the grid loads, there is not horizontal scroll bar so the columns are quite squashed.

If I resize a column, a horizontal scroll bar appears.

Is there a way to show the horizontal scroll bar from the beginning, having all columns at their natural width?

Thanks,

Richard
Dimo
Telerik team
 answered on 03 Jul 2014
4 answers
127 views

I'm trying to use a Kendo grid for the first time: Here's the code for the grid:

@model IEnumerable<SustIMS.Models.ModelTest>

<div id="clientsDb">
@(Html.Kendo().Grid(Model)
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.Genre).Width(140);
columns.Bound(c => c.Title).Width(190);
columns.Bound(c => c.ReleaseDate);
columns.Bound(c => c.Price).Width(110);
})
.HtmlAttributes(new { style = "height: 90%;" })
.Scrollable()
.Groupable()
.Sortable()
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Read", "MasterDataController"))
)
)
</div>

<style scoped>
#clientsDb {
width: 95%;
height: 95%;
margin: 20px auto 0;
padding: 50px 4px 0 4px;
background: url('@Url.Content("~/content/web/grid/clientsDb.png")') no-repeat 0 0;
}
</style>

This displays the grid without any data in it. I've created a test model and am trying to add data like this in the controller:

public void Read()
{
ModelTest mt = new ModelTest();
mt.Title = "This is the title";
mt.Price = 10.5m;
}

This doesn't show any data in the grid. How can I pass data into it?
And does it have to come from a model or can it be added in a custom way?

Tomás
Top achievements
Rank 1
 answered on 02 Jul 2014
3 answers
144 views
Hi,

I'm using a grid to display the results from a search. The client made a request that when he/she bookmark the page the grid remember the fitlers, sort, and page. How can I achieve this?

Thanks,
Dimiter Madjarov
Telerik team
 answered on 02 Jul 2014
2 answers
1.0K+ views
Hello,

I have a kendo UI MVC grid, I use the popup edit template.
And I created a customer edit templates.  My model has a property as type (holds three different values).
For different type, my edit template condition changes.  

For example, the release date - for Type 1, it is read only; for Type 2, it is editable; and for Type 3, the label needs to be changed slightly.

I tried to use if statement in the partial view (custom edit template) to check.  But it does not work since popup edit template is loaded when grid is loaded.

So is there a way that I can accomplish what I described here with  kendo UI grid?

Thanks in advance

Dongfen Gao
Dongfen
Top achievements
Rank 1
 answered on 01 Jul 2014
1 answer
125 views
Hello,

I have been trying to figure out  solution that will work with my data. A StockChart has been working very well for right now but my data can be inconsistant with the days. Sometimes there will be two points hours apart, sometimes there will be two points days apart. As result of this, as you zoom into the StockChart, there won't always be data points for a day(s). The current view of this is that the line chart creates a gap from the edge of the graph to the first data point of that specific view. I wish for the line to be continuous at all points even if there is no data. In other words, it is a stepped line chart, and I want the value to maintain until it is changed, so that there is always a line as you continue to zoom. Is there a setting to achieve this?
Iliana Dyankova
Telerik team
 answered on 01 Jul 2014
3 answers
473 views
I am succeding in changing tick labels on a slider called on javascript

  <script>
        $(document).ready(function () {
 
            var slider = jQuery("#slider").kendoSlider({
                increaseButtonTitle: "Right",
                decreaseButtonTitle: "Left",
                showButtons: true,
                min: 1,
                max: 4,
                largeStep: 1,
 
                tooltip: {
                    enabled: false
                },
                orientation: "horizontal"
            });
 
            var steps = {};
            steps[0] = 'very low';
            steps[1] = 'medium';
            steps[2] = 'hight';
          
 
            var sliderItems = slider.siblings(".k-slider-items");
             
            $.each(steps, function (index, value) {
                var item = sliderItems.find("li:eq(" + (index) + ")");
                item.attr("title", value);
                item.find("span").text(value);
            });
 
        });
 
    </script>
 
 <div id="slider">
 
</div>

Work!
But, I would like to do the same trick on a Slider generated by an asp helper

@(Html.Kendo().Slider()
                      .Name("nameSlider")
                      .IncreaseButtonTitle("Right")
                      .DecreaseButtonTitle("Left")
                      .Min(0)
                      .Max(3)
                      .SmallStep(1)
                      .Value(0)
                      .Orientation(SliderOrientation.Horizontal)
                      .HtmlAttributes(new { @class = "balSlider" })
                      .Deferred()
)
 
 
  @Html.Kendo().DeferredScripts()
 
 <script>
 
$(document).ready(function () {
 
        var selectedSlider = $("#nameSlider").data("kendoSlider");
 
         var sliderItems = selectedSlider.siblings(".k-slider-items");
 
         $.each(steps, function (index, value) {
                var item = sliderItems.find("li:eq(" + (index) + ")");
                item.attr("title", value);
                item.find("span").text(value);
            });
 
    });
 </script>

unfortunately, it does not work.

Any ideas?



Iliana Dyankova
Telerik team
 answered on 01 Jul 2014
0 answers
113 views
Could someone point me to a working example of how to implement a Kendo MVC Wrapper Grid that has Add and Edit popup.
In the popup editor to Edit: I'd like to be able to show the Product.Name, but change only the ProductType and ProductCategory.
In the popup editor to Add, I'd like to be able to select the Product, ProductType, and ProductCategory.
e.g.

ProductCategory:
ID
Name

ProductType:
ID
Name

Product:
ID
Name
ProductType
ProductCategory

Thanks
Paul
Top achievements
Rank 1
 asked on 30 Jun 2014
2 answers
235 views
say I have draw a line chart with 5 data series. At some data points multiple series may intersect. e.g., at x=10, all the lines have a y-value of 0.  When user mouse hover these overlap data points, I always want to show the tooltip from series k. That is to say, series k has a "z-index" bigger than other series. Could kendo chart provide such a parameter? I want to show some particular line always on top of other lines when overlap, as well as its tooltip.
Iliana Dyankova
Telerik team
 answered on 30 Jun 2014
1 answer
207 views
I would like to call a JavaScript function when a nodes' checkbox is clicked so that I can update anther control on screen. There is not a "OnChecked" event, so is it possible ?

Any help appreciated,
John
Dimiter Madjarov
Telerik team
 answered on 30 Jun 2014
1 answer
121 views
Hello, 

I have seen the default behavior on the live demo of Zoom switch from Days to Weeks to Year if you zoom out far enough. I was wondering if it was possible to have data say in a week span to start in days and zoom into displaying hours. 

Thanks.
Iliana Dyankova
Telerik team
 answered on 27 Jun 2014
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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Wizard
Security
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
+? 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?