Telerik Forums
UI for ASP.NET Core Forum
2 answers
300 views

Can we make a group row selected so that I can add record ist record under selected group header.

 

In this below Image1, Can I make the group header "def" selectable like as a row selectable in Image2, so that I can add ist record in that particular group on button click "Add Activity" Please provide solution asap.

 

 

 

Isha
Top achievements
Rank 1
 answered on 02 Sep 2018
7 answers
171 views

I have a method that validates if the registry is duplicated. How can I use this validation in the edit / insert popup?

 

 

 

@(Html.Kendo().Grid<Site.Models.BreedViewModel>()                                                             .Name("grid")                                                             .Columns(columns =>                                                             {                                                                 columns.Bound(b => b.BreedId).Title("ID")                                                                     .Filterable(ftb => ftb.Cell(cell => cell.ShowOperators(true))).Width(120);                                                                 columns.Bound(b => b.BreedCode).Width(140).Title("Code");                                                                 columns.Bound(b => b.BreedName).Width(220).Title("Name");                                                                 columns.Bound(b => b.Type)                                                                     .ClientTemplate("# if( Type === 1) { # <span>Beef</span> # } else { # <span>Dairy</span> # } #").Width(140);                                                                 columns.Bound(b => b.Active)                                                                     .ClientTemplate("# if( Active ) { # <span class='k-icon k-i-check-outline'></span> # } else { # <span class='k-icon k-i-close-outline'></span> # } #").Width(145);                                                                 columns.Bound(b => b.Description).Width(220).Title("Description");                                                                 columns.Command(command =>                                                                 {                                                                     command.Edit().CancelText("Cancel").UpdateText("Save").Text(" ");                                                                     command.Custom("wnDelete").Click("wnDelete").Text(" ").IconClass("k-icon k-i-delete");                                                                     command.Custom("ViewDetails").Click("ViewDetails").Text(" ").IconClass("k-icon k-i-zoom-in");                                                                 }).Width(100);                                                             })                                                             .ToolBar(t => { t.Create().Text("Add"); t.Excel(); })                                                             .Editable(editable => editable.Mode(GridEditMode.PopUp)                                                                 .DisplayDeleteConfirmation(false)                                                                 .TemplateName("BreedEdit").Window(w => w.Title("Breed")))                                                             .Scrollable(s => s.Height("auto"))                                                             .Pageable(pageable => pageable                                                                 .Refresh(true)                                                                 .PageSizes(true)                                                                 .ButtonCount(5))                                                             .Events(events => events                                                                 //.Change("onChange")                                                                 .DataBound("onDataBound")                                                                                                                                  //.Save("onSave")                                                             //.DataBinding("onDataBinding")                                                             )                                                             .Sortable()                                                             .Scrollable()                                                             .Excel(excel => excel.FileName("export.xlsx").AllPages())                                                             .Filterable()                                                             .DataSource(dataSource => dataSource                                                                 .Ajax()                                                                 .PageSize(20)                                                                 .Events(e =>{                                                                     e.Error("onGridError");                                                                                                                                          //e.RequestEnd("wasSaveSuccessful");                                                                 })                                                             .Model(model => model.Id(p => p.BreedId))                                                             .Create(update => update.Action("EditingPopup_Create", "Breed"))                                                             .Read(read => read.Action("EditingPopup_Read", "Breed"))                                                             .Update(update => update.Action("EditingPopup_Update", "Breed"))                                                             .Destroy(update => update.Action("EditingPopup_Destroy", "Breed"))                                                     ) )@(Html.Kendo().Window().Name("Details")                                             .Title("Details")                                             .Visible(false)                                             .Modal(true)                                             .Draggable(true)                                             .Width(500) )@(Html.Kendo().Notification()                     .Name("notification")                                     .Position(p => p.Pinned(true).Top(30).Right(30))                                      )

Georgi
Telerik team
 answered on 30 Aug 2018
1 answer
475 views

Hello, I'm creating simple grid, which is populated with data via controller and it's work just fine.

But the problem is when I'm trying to remove a row with .Destroy() method, which doesn't call method from my controller.

 

                         .DataSource(dataSource => dataSource
                                    .Ajax()
                                    .Read(read => read.Action("Read", "controller")) <-- this works well
                                    .Destroy(destroy => destroy.Action("Read", "controller"))) <-- isn't called at all

 

method in controller

        public ActionResult Delete([DataSourceRequest] DataSourceRequest request, Model model)
        { <-- I've put breakpoint here and it's not get there
            return NotFound();
        }

I have no idea where the problem is.

Stefan
Telerik team
 answered on 30 Aug 2018
3 answers
998 views

Hello.

I have a ListView which contains say 10 items. I add a new item programmatically, I am able to select it, but I am not able to make the Listview to Scroll to it.

I found several examples for Grid scrolling to selection, but none of them works for ListView.

Can you please provide some assistance?

Thanks,

Kyriakos

 

Stefan
Telerik team
 answered on 29 Aug 2018
2 answers
577 views

Hello, 

I'm trying to populate my Grid with Json data, which I gets from my controller. I have set breakpoints and checked that the data is returned correctly but Grid isn't filled somehow.

Controller :

        [Route("/api/list/getAll")]
        [HttpPost]
        public IActionResult GetList()
        {
            var result = _ListService.GetAll();
            if (result == null || result.Count == 0)
                return NotFound();

            return Json(result);
        }

 

Razor :

@(Html.Kendo().Grid<Model>()
    .Name("grid")
    .Columns(columns => {
        columns.Bound(c => c.Name).Width(140);
    })
     .Scrollable()
     .Sortable()
     .Pageable(pageable => pageable
                    .Refresh(true)
                    .PageSizes(true)
                    .ButtonCount(5))
     .DataSource(dataSource => dataSource
                .Ajax()
                .Read(read => read.Action("GetList", "controller")))
    )

 

Model has much more fields but I just put only Name for test purposes. But this isn't filled anyway.

I have no idea what I'm doing wrong there is no errors, page just loading and Grid isn't filled.

Konstantin Dikov
Telerik team
 answered on 27 Aug 2018
1 answer
693 views

     I am trying to make a very simple functionality but i cant seem to figure it out.

 

i want to be able to pick a category and a dependent subcategory, how can i achieve this in an inline grid edit? 

Georgi
Telerik team
 answered on 24 Aug 2018
1 answer
75 views

Hello I'm using Grid and my qiestuon is : Is there any way to remove video-wrapper from DOM ?

 

Greetings

Adrian
Top achievements
Rank 1
 answered on 24 Aug 2018
1 answer
90 views

Hey there,

I am new to learn Telerik. My internship is probably going to give me the task to build charts for their apps.

I've been looking around in VS to put those demo's in. But it is still unclear for me where to put it in.

So my question is, can someone help me with this? If you can reply that would be awesome! (or add me on discord: bjeako#1286)

Pavlina
Telerik team
 answered on 24 Aug 2018
5 answers
193 views

Hi, I'm having a problem on rendering my listbox every time I call my modal.

 

Please see the attached file.

here's my code:

<div class="modal fade" id="assign-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="max-width:790px!important;">
        <div class="modal-content">
            <div class="modal-header" style="display:block">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title" id="myModalLabel">t</h4>
            </div>
                <div class="modal-body">
                    <input type='text' id='searchBox' class='k-textbox' placeholder='Search' />
                    <div id="example" role="application">
                        <div class="demo-section k-content">
                            <div>
                                <label for="optional" id="agents">FROM</label>
                                <label for="selected">TO</label>
                                <br />
                                <select id="unoptional"></select>
                                <select id="unselected"></select>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button id="SaveEdit" type="button" data-save class="btn btn-primary">Assign</button>
                    <button type="button" class="btn btn-default" data-cancel>Cancel</button>
                </div>
        </div>
    </div>
</div>

 

$("#optional").kendoListBox({
                    connectWith: "selected",
                    dataTextField: "FullName",
                    dataValueField: "FullName",
                    selectable: "multiple",
                    toolbar: {
                        tools: ["transferTo", "transferFrom", "transferAllTo", "transferAllFrom"]
                    },
                    dataSource: {
                        serverPaging: true,
                        transport: {
                            read: {
                                url: myUrl,
                                dataType: "json"
                            },
                            schema: {
                                model: {
                                    fields: {
                                        FullName: { type: "string" },
                                        Id: { type: "string" }
                                    }
                                }
                            }
                        }
                    }
            });
            $("#selected").kendoListBox({
                dataTextField: "FullName",
                dataValueField: "FullName",
                selectable: "multiple",
            });

 

Konstantin Dikov
Telerik team
 answered on 23 Aug 2018
6 answers
239 views

Hi,

I have a grid inside a partial view that is bound to a local data (parent viewmodel is passed to the partial view).

The grid displays correctly the datas but when i try to edit a cell, i have this error: 'TypeError: Cannot read property 'Label' of undefined'.
Is there a way to solve this error?

Thanks;

Boyan Dimitrov
Telerik team
 answered on 22 Aug 2018
Narrow your results
Selected tags
Tags
+116 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?