Telerik Forums
Kendo UI for jQuery Forum
1 answer
588 views

ASP.NET MVC5, Razor, C# 

 

My grid shows 4 columns, 3 of which are read-only.  The user is required to modify the data in the 4th column.  For some of the rows, free-form text entry is allowed. For other rows, selection from a drop-down list is required.

 Based on the value of Column 1 (AttributeName), I will conditionally provide the user a textbox or ddl.

I have my DDL coded up as a partial view, and am able to display it in the appropriate column.  What I need is the ability to display this DDL, or the textbox control, in the same column in the grid, depending on the value of Column1.

 Grid code below.  Please let me know if you need to see anything else.  Thanks in advance.

 

 
@(Html.Kendo().Grid<EtlDataException>().Name("exceptionsGrid").Columns(c =>
    {
        c.Bound(p => p.AttributeName).Title("Column Name");
        c.Bound(p => p.ExceptionMessage).Title("Message");
        c.Bound(p => p.RawValue).Title("Raw Data");
        c.Bound(p => p.EditedValue).Title("Edited Value-Select").ClientTemplate("#EditedValue#").Width(120);
        
        c.Command(command => { command.Edit().CancelText("Cancel");}).Width(100);
    })
   .Editable(editable => editable.Mode(GridEditMode.InLine))
    .DataSource(d => d
        .Ajax()
            .Read(r => r.Action("GetExceptionRecords", "Etl"))
            .PageSize(50)
            //.Model(model => model.Id(p => p.Id))
            .Update(update => update.Action("EditingInline_Update", "Grid"))
            .Model(model =>
                {
                    model.Id(p => p.Id);
                    model.Field(p => p.AttributeName).Editable(false);
                    model.Field(p => p.ExceptionMessage).Editable(false);
                    model.Field(p => p.RawValue).Editable(false);
                    model.Field(p => p.EditedValue).Editable(true).DefaultValue(ViewData["defaultAttribConstraint"]);
                })
        )
        .Pageable()
        .Filterable()
        .Sortable()
      )

Boyan Dimitrov
Telerik team
 answered on 05 Feb 2016
1 answer
348 views

Hello,

I have a DataSource connected to the Scheduler. The DataSource read data from the remote web service. I proces data returned from the service with the function assigned to DataSource.schema.data.

In some occassions, reading data from webresource is called over and over again. I would say that it happens when there are no data returned from the web service. That means that there are no events and my function (assigned to DataSource.schema.data) returns an empty array.

Is it possible that when I return an empty array, the DataSource's read is called again? Or am I wrong and I should seek for the error somewhere else?

 

Thanks for answers,

Boris

Georgi Krustev
Telerik team
 answered on 05 Feb 2016
1 answer
351 views

I have the exact code from this example on my page:  http://demos.telerik.com/kendo-ui/grid/persist-state

 I have the following toolbar in my grid 

          .ToolBar(tools =>
          {
              tools.Save();
              tools.Excel();
          })

The toolbar disappears when the 'Load State' is clicked. Is this a known issue?

 

Boyan Dimitrov
Telerik team
 answered on 05 Feb 2016
1 answer
266 views

If I try to use tooltip properties described here:
http://docs.telerik.com/kendo-ui/api/javascript/ui/tooltip

 

In the Tooltip section of the Gantt configuration they get ignored?

 For example the Height property is ignored?

gantt = $("#gantt").kendoGantt({
            tooltip: {
                visible: true,
                height: 800,
                template: kendo.template($("#task-template-gantt-tooltip").html())
                //template: "#= task.title #"
            },

 I really want to be able to display a clickable link in the tool tip.  However when the mouse goes to click the link the tooltip goes away.

From the tooltip docs I think doing this would solve my problem:
autoHide: false,
showAfter: 3,
showOn: "mouseenter"

How on the gantt when a user hovers over the task can i display a tooltip that stays when they mouseover the tooltip?

Bozhidar
Telerik team
 answered on 05 Feb 2016
3 answers
76 views

Hi there,

 Your documentation at http://docs.telerik.com/kendo-ui/ is returning a 500 error.

Kiril Nikolov
Telerik team
 answered on 04 Feb 2016
2 answers
145 views

Hello, I'm looking to find out if it's possible to scale the valueAxis on a line chart? The attached image is a silverlight chart that we are replacing with the kendo ui mvc chart. We would like it to look somewhat the same. I was able to step the years to the exact same as the silverlight chart. But can not achieve the value in the image. Any help would be much appreciated?

data":[{"Year":1965,"Index":"1712","Payout":"0"},{"Year":1966,"Index":"1590","Payout"
:"0"},{"Year":1967,"Index":"1789","Payout":"0"},{"Year":1968,"Index":"1677.5","Payout":"0"},{"Year":1969
,"Index":"1692.5","Payout":"0"},{"Year":1970,"Index":"1681.5","Payout":"0"},{"Year":1971,"Index":"1631"
,"Payout":"0"},{"Year":1972,"Index":"1645.5","Payout":"0"},{"Year":1973,"Index":"1618.5","Payout":"0"
},{"Year":1974,"Index":"1673","Payout":"0"},{"Year":1975,"Index":"1633","Payout":"0"},{"Year":1976,"Index"
:"1725","Payout":"0"},{"Year":1977,"Index":"1771.5","Payout":"0"},{"Year":1978,"Index":"1709.5","Payout"
:"0"},{"Year":1979,"Index":"1690.5","Payout":"0"},{"Year":1980,"Index":"1651.5","Payout":"0"},{"Year"
:1981,"Index":"1773.5","Payout":"0"},{"Year":1982,"Index":"1567.5","Payout":"0"},{"Year":1983,"Index"
:"1511","Payout":"0"},{"Year":1984,"Index":"1573","Payout":"0"},{"Year":1985,"Index":"1762.5","Payout"
:"0"},{"Year":1986,"Index":"1791","Payout":"0"},{"Year":1987,"Index":"1584","Payout":"0"},{"Year":1988
,"Index":"1666","Payout":"0"},{"Year":1989,"Index":"1679","Payout":"0"},{"Year":1990,"Index":"1663.5"
,"Payout":"0"},{"Year":1991,"Index":"1743.5","Payout":"0"},{"Year":1992,"Index":"1611.5","Payout":"0"
},{"Year":1993,"Index":"1562","Payout":"0"},{"Year":1994,"Index":"1731","Payout":"0"},{"Year":1995,"Index"
:"1686","Payout":"0"},{"Year":1996,"Index":"1628","Payout":"0"},{"Year":1997,"Index":"1559","Payout"
:"0"},{"Year":1998,"Index":"1681","Payout":"0"},{"Year":1999,"Index":"1714.5","Payout":"0"},{"Year":2000
,"Index":"1644.5","Payout":"0"},{"Year":2001,"Index":"1781","Payout":"0"},{"Year":2002,"Index":"1796
.5","Payout":"0"},{"Year":2003,"Index":"1673","Payout":"0"},{"Year":2004,"Index":"1677","Payout":"0"
},{"Year":2005,"Index":"1642.5","Payout":"0"},{"Year":2006,"Index":"1822.5","Payout":"0"},{"Year":2007
,"Index":"1666","Payout":"0"},{"Year":2008,"Index":"1679","Payout":"0"},{"Year":2009,"Index":"1688","Payout"
:"0"},{"Year":2010,"Index":"1793.5","Payout":"0"},{"Year":2011,"Index":"1789.5","Payout":"0"},{"Year"
:2012,"Index":"1767","Payout":"0"},{"Year":2013,"Index":"1690.5","Payout":"0"},{"Year":2014,"Index":"1707
.5","Payout":"0"},{"Year":2015,"Index":"1732.5","Payout":"0"}]}

 

MSIGW
Top achievements
Rank 1
 answered on 04 Feb 2016
5 answers
1.8K+ views

I've got an existing tree we're looking to replace w/ the Kendo TreeView. I've got most of it working, but I'm having issues w/ one particular use case.

Referring to the attached image, we load a tree view by default when the page is loaded. Then the user can choose to change the context of the tree - for example, showing items w/ various statuses, as shown in the filter button dropdown. In our current solution we remove the tree (the entire div) completely and re-create it from scratch by appending on a new, empty div and calling the tree init again.

I'm hoping we won't need to do this w/ the Kendo version, but I can't figure out how to refresh the tree while modifying the parameters passed to the datasource. I was able to get the general refresh button (bottom left) working by doing a read on the datasource, but it keeps the original parameters. We have similar functionaly tied to the dropdown above the tree (Users [by surname]), where they can change the whole tree, rather than just the parameters. For example, they could switch it to Users [by organization] or Users [by given name].

My current init for the TreeView:

function getTree(type, status) {   
    var url = page_init[type].tree_data;
     
    //if status is passed in, append it to the url
    if (typeof(status) != 'undefined') {
        url += status;
    }
     
    //set up the tree
    var tree_datasource = new kendo.data.HierarchicalDataSource({
        transport: {
            read: {
                url: url,
                dataType: "json"
            }
        },
        schema: {
            type: "json",
            data: "Entries",
            model: {              
                id: "ID"
            }
        }
    });
     
    $("#nav_tree").kendoTreeView({
        loadOnDemand: false,
        dataSource: tree_datasource,
        dataTextField: "Text"
    });
}

And the existing function calls for changing the full tree (dropdown, #tree_select) and filter (button, #tree_filter)

$("#tree_select").on("change", function (event) {
    event.preventDefault();
    getTree(this.value, 'active');
});

<ul id="tree_filter" class="dropdown-menu dropdown-menu-filter">
    <li onclick="getTree($('##tree_select').val(), 'active')">Active</li>
    <li onclick="getTree($('##tree_select').val(), 'inactive')">Inactive</li>
    <li onclick="getTree($('##tree_select').val(), 'all')">All</li>
</ul>
Ashleigh L
Top achievements
Rank 1
 answered on 04 Feb 2016
4 answers
169 views

I'm trying to find out if the charts can do a standard XY chart (looks like a cross)?

 

Matt

Matt
Top achievements
Rank 1
 answered on 04 Feb 2016
1 answer
760 views

I'd like to modify the pager section to center the content. I've tried the usual CSS adjustments to center the content (margin-left & margin-right set to auto, text-align set to center), but no luck. Any ideas?

Thanks,

--Ed

Konstantin Dikov
Telerik team
 answered on 04 Feb 2016
2 answers
469 views

I am creating a tree-map. Treemap is static. It will always have 3 tiles. The data can change but the number of tiles will remain fixed. I looked at the below example. 

How can I force each tile to have a unique color from the array of colors I have specified.  

<div id="treemap"></div>
<script>
  $("#treemap").kendoTreeMap({
    dataSource: {
      data: [{
        name: "Root",
        items: [{ name: "foo", value: 1 }, { name: "bar", value: 2 }, { name: "baz", value: 3 }]
      }]
    },
    valueField: "value",
    textField: "name",
    colors: ["red", "green", "yellow"]
  });
</script>

Dimo
Telerik team
 answered on 04 Feb 2016
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
TextArea
BulletChart
Licensing
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?