Telerik Forums
Kendo UI for jQuery Forum
4 answers
176 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
70 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.0K+ 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
97 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
249 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
600 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
832 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
307 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
103 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
2 answers
112 views
Hi,

I would like to filter grid 2 based on the row selection in the first grid and First grid has primary key called CustID and second grid has foreign key CustID.

Please advise how i can achieve this. Thank you

First Grid:
@(Html.Kendo().Grid(Model)
    .Name("SList")
        .HtmlAttributes(new { @Style = "align:center; font-size:10px;" })
    .Columns(columns => {
        columns.Bound(p => p.CCID);
        columns.Bound(p => p.CRN);
        columns.Bound(p => p.CFirstName).Width(140);
        columns.Bound(p => p.CFamilyName).Width(140);
        columns.Bound(p => p.Alias).Width(45);
        columns.Bound(p => p.CGender).Width(45);
        columns.Bound(p => p.CAge).Width(45);
        columns.Bound(p => p.CDOB).Format("{0:MM/dd/yyyy}");
        columns.Bound(p => p.RDate).Format("{0:MM/dd/yyyy}");
        columns.Bound(p => p.RFrom);
        columns.Bound(p => p.RComments);
        columns.Bound(p => p.ReferralTo);
        columns.Bound(p => p.CStatusID);
        columns.Bound(p => p.DateScheduled).Format("{0:MM/dd/yyyy}");
  
        columns.Command(commands => commands.Edit()).Width(175);
    })
    //.ToolBar(toolBar => toolBar.Save())
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable()
    .Sortable()
    .Scrollable()
    .Navigatable()
    .Selectable(selectable => selectable.Mode(GridSelectionMode.Single)
                                        .Type(GridSelectionType.Row))
    .DataSource(dataSource => dataSource        
        .Ajax()
        .PageSize(10)   
        .Model(model => model.Id(p => p.CustID))
        .Read(read => read.Action("Index", "Management"))
        .Update(update => update.Action("Edit", "Management"))
      
    )
)

Second Grid:

@(Html.Kendo().Grid(Model)
    .Name("SList2")
        .HtmlAttributes(new { @Style = "align:center; font-size:10px;" })
    .Columns(columns => {
        columns.Bound(p => p.CreateDate).Format("{0:MM/dd/yyyy}");
        columns.Bound(p => p.CreateBy);
        columns.Bound(p => p.C3).Width(140);
   
  
        columns.Command(commands => commands.Edit()).Width(175);
    })
    //.ToolBar(toolBar => toolBar.Save())
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable()
    .Sortable()
    .Scrollable()
    .Navigatable()
    .Selectable(selectable => selectable.Mode(GridSelectionMode.Single)
                                        .Type(GridSelectionType.Row))
    .DataSource(dataSource => dataSource        
        .Ajax()
        .PageSize(10)   
        .Model(model => model.Id(p => p.CEventID))
        .Read(read => read.Action("Index", "Management"))
        .Update(update => update.Action("Edit", "Management"))
      
    )
)
Curtis Glesmann
Top achievements
Rank 1
 answered on 28 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?