Telerik Forums
Kendo UI for jQuery Forum
2 answers
333 views
Hi.
I'm trying to use  angular-kendo framework and it seems pretty cool!
But I can't to make working treeview...
I use following angular controller:
function HomeCtrl($scope)
{
 $scope.things = {dataSource: [{ name: "Thing 1", id: 1 },{ name: "Thing 2", id: 2 },{ name: "Thing 3", id: 3 }]}
}
and following template:

<div  kendo-treeview   <br>        
k-data-source="things"        
k-data-text-field="'name'" />
But it doesn't work...  While other controls taken from sample angular-kendo framework like grid
work great.

This chunk of code also works:
<div id="treeview"></div>
<script>
$("#treeview").kendoTreeView({
  dataTextField: [ "name"],
  dataSource: [{ name: "Thing 1", id: 1 },{ name: "Thing 2", id: 2 },{ name: "Thing 3", id: 3 }]
});
</script>


What I'm doing wrong?

Thanks in advance.
Jose Mejia
Top achievements
Rank 1
 answered on 29 Aug 2013
4 answers
191 views
I would like to simulate hierarchical multiselect so values from one multiselect efects on values on other one.
So when I click mouse on other multiselect it checks server with values from first multiselect.

I think I know how to set values with param value on second multiselect data source.
But I how to force to re read server when popup is opened?  Like initial autobind = false. But always.

I'm using simple Json request and I cannot use odata  type.
Marcin
Top achievements
Rank 1
Veteran
 answered on 29 Aug 2013
3 answers
80 views
I tried to display the week format format for the current week for my calendar app, but it is not working for having the day start time of 7am. Is there a way to do this? This is my API rendering call:

$scheduler = new \Kendo\UI\Scheduler('scheduler');
$scheduler->timezone("Etc/UTC")
          ->date(new DateTime())
          ->height(600)
          ->addView(array('type' => 'day', 'startTime' => new DateTime('2013/6/13 7:00')),
            array('type' => 'week', 'selected' => true, 'startTime' => new DateTime('2013/6/13 7:00')), 'month', 'agenda')
          ->dataSource($dataSource);

It does show the week of "August 26th", but, it starts to display 1am instead of 7am??

paul
Rosen
Telerik team
 answered on 29 Aug 2013
4 answers
1.1K+ views
How do I go about getting some placeholder text inside the combo so when they click on it or start tying it disappears?

I tried the HTML5 placeholder attribute on the input, but it doesn't seem to work.
Georgi Krustev
Telerik team
 answered on 29 Aug 2013
1 answer
107 views
While Changing the view, fresh data is loaded in grid based on view selection [ Making the ajax call for retrieving the grid data].
Groupby is stop working once fresh data is loaded. [ Not able to drag the column ]

     
function GridBind(urlGetData) {
    $.ajax({
        url: urlGetData,
        dataType: 'json',
        success: function (results) {
               _grid = $("#grid").kendoGrid({
                dataSource: {
                    data: results.Rows  ,
                    pageSize: parseInt($('#DefaultPage').val())
                },
                groupable: true,
                scrollable: true,
                sortable: true,
                filterable: { extra: false },
                pageable: {
                    refresh: true,
                    pageSizes: [10, 20, 30, 40, 50, 100]
                },
                detailTemplate: kendo.template($("#template12").html()),
                detailInit: detailInitDB,
                cache: false,
                resizable: true,
                dataBound: function () {
                    resizeGrid();
                },
                selectable: "multiple",
                change: function () {
                    onSelection();
                },                columns: results.Cols
                });     
                resizeGrid();
            }
        }    });              
Nikolay Rusev
Telerik team
 answered on 29 Aug 2013
3 answers
263 views
Hi Telerik Team,

I am new to Kendo UI charts ( MVC ). Do Kendo charts provide any provision for auto scaling x axis in MVC for column chart ? like I have a large number of values which mess up the chart display.

I want to display dates on x-axis.

Thanks
Pratik
Hristo Germanov
Telerik team
 answered on 29 Aug 2013
1 answer
627 views
Hi, I currently try to tweak the dataSource Read function to load local data instead of using URL.
In my page I got several grid binding to several dataSource (I do not know at loading time because all page is dynamically created). All dataSource take data in one Read function that read an hugde local data array. I need to know witch DataSource (or Grid) call the Read function. But I can't found a way to do this.
Thanks for your help
function CreeDataSourceGroupes() {
    var that = this;
 
    //Pour cahque groupe présent
    $("[id*='Groupe'][data-role='grid']").each(function () {
 
        var groupeID = $(this).attr('Id')
        dsGroupes = new kendo.data.DataSource(
                   {
                       groupId: 'ID1',         // ============= NEED TO READ THIS ID SET WHEN CREATING THE DS
                       transport: {
                           read: function (options) {
                               that.DsGroupeRead(options);
                           }
                       }
                   });
 
     
            $(this).data('kendoGrid').setDataSource(dsGroupes);
    })
}
 
function DsGroupeRead (options, x)
{
 
    // NEED THE GROUP ID HERE
 
    //var data = speakerData1
    //options.success(data);
}
Rosen
Telerik team
 answered on 29 Aug 2013
1 answer
855 views
for following cases
- I am creating grid for Tests if failed then row style color should be read or passed then row style color should be green.
- Another thing is I want to create a runtime column which will be computed result from data
   example Completed is 9 and Total is 20: so I want to create column say Available which will be (20-9)=11

Thanks,
Suhaib
Dimo
Telerik team
 answered on 29 Aug 2013
3 answers
349 views
I've been following the steps outlined here to practice CRUD operations with the Kendo UI Grid:

http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/batch-editing

And the incell editing is not actually saving the data changes I make. I've figured out that I'm running into ModelState errors, and so the ModelState.IsValid flag is false. Here is my edit method:

public ActionResult Editing_Update([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<TestTable> tests)
        {
            var results = new List<TestTable>();
 
            foreach (var modelStateValue in ViewData.ModelState.Values)
            {
                foreach (var error in modelStateValue.Errors)
                {
                    // Do something useful with these properties
                    var errorMessage = error.ErrorMessage;
                    var exception = error.Exception;
                }
            }
 
            if (tests != null && ModelState.IsValid)
            {
                using (var delta = new DeltaHREntities())
                {
                    foreach (var test in tests)
                    {
                        var entity = new TestTable
                        {
                            ID = test.ID,
                            Name = test.Name,
                            DateCreated = test.DateCreated
                        };
 
                        results.Add(entity);//store the test object for later use
                        delta.TestTables.Attach(entity);
                        //delta.Entry(test).State = EntityState.Modified;//why doesn't this work?
                        delta.ObjectStateManager.ChangeObjectState(entity, EntityState.Modified);
                    }
                    delta.SaveChanges();
                }
            }
 
            return Json(results.ToDataSourceResult(request, ModelState, test => new TestTable
            {
                Name = test.Name,
                DateCreated = test.DateCreated,
                ID = test.ID
            }));
        }
The exception that is raised is this:

"The key-value pairs that define an EntityKey cannot be null or empty"

Now the only part of my dataset that is null is the Name column, but this is set to Nullable in the edmx file, and the db field itself is set to nullable. So why do I keep getting this error message?

Another thing I'm confused about is how the demo (see the link above ) says to create a class called ProductViewModel in step 5. Why is this necessary when the Entity Framework has already created a Product table for you automatically? This seems to be an unneeded duplication of data. Thanks.
Daniel
Telerik team
 answered on 29 Aug 2013
1 answer
123 views
I have a treeview with subitems. I want to have the ‘checkchildren’ optie set to true, so if a user click on a parent, als the children are checked.
But I also want to be able to uncheck some childeren, while parent remains checked.

The problem is when i load the treeview, and i have the above situation (a parent checked and only a few of the subitems), all the subitems are then automatically checked. At that point the treeview is not representing the checked items anymore that were supplied in the datasource. 

So how can i achieve that (1)on a form submit, the parent is also marked as ‘checked’ when not al subitems are checked and (2)prevent that on a load with a datasource, all the childeren are automatically checked if a parent is checked and (3) that on a select of a parent with a mouseclick, all subitems are checked.


Thanks
Alex Gyoshev
Telerik team
 answered on 28 Aug 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
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?