Telerik Forums
UI for ASP.NET Core Forum
1 answer
136 views

Hi,

I am successfully able to display a nested grid. However there is a new requirement and I need some help.

For simplicity, please consider the following.

Outer grid displays grade information with columns like Grade, Instructor, Room

Inner grid display student information with columns like Name, Race.

So far so good.

Now based a condition in outer grid i.e. if Grade is 12, I would like to add a column to the inner grid called SATAppeared. That is,  I would like a grid like the following

Grade   Instructor   Room

    3          Kelly            20

    Name   Race

      Bo         W

      Li           A

Grade   Instructor   Room

    12          Mac            34

    Name   Race   SATAppeared

      Sue        W            Yes

      Ken        W             No

 

To achieve this, in the template of inner grid, I have put a condition on SATAppeared column. Something like the following but it doesnt seem to work. SATAppeared column doesnt display for any of the grades.

.Columns(columns =>
 {

   columns.Bound(o => o.Name);

   columns.Bound(o => o.Race);

if (Model.Grade == "12")
{
      columns.Bound(o => o.SATAppeared);
}

}

Can you please help. Thank you!

Aleksandar
Telerik team
 answered on 02 May 2023
1 answer
401 views

Hi,

I have set up my grid table to save gridOption on certain events (etc., Sorting, column reorder, filter).

On the document ready, I will load the stringified JSON from the localStorage, and set that as the grid option.

However, I wasn't able to get the table to load properly in a few instances.

1.) When I enter something in the searchbar, the rows will be filtered via the searchbar. 

But if I do sorting to save the grid option and reload it, the following happens:
- The loaded table did not show the previous search item on the searchbar.
- The column filters (with checkbox) only show the filtered list, not the whole list.

I have to manually type in another placeholder text into the searchbar, then remove the placeholder text to "refresh" the table to get the whole list appearing in the column filter.

2.) When I filter some row via the column filter (with checkbox), the rows will be filtered.

But if I do sorting to save the grid option and reload it, the following happens:
- The column filters (with checkbox) only show filtered list, not the whole list.
- When I unselect, the table shows all the rows, but the column filter still doesn't show the whole list, only the previously preselected list.

Can you advise how to get state persistence working with searchbar and column filters with checkbox?

Thanks,
Luke

Aleksandar
Telerik team
 answered on 28 Apr 2023
1 answer
338 views

Hi

After installing Telerik nuget package, my application stopped working.
I added lines to the csproj

<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.5.0" />

<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.5.0" />
<
PackageReference Include="Telerik.UI.for.AspNet.Core" Version="2023.1.314" />

When I run my application, I get log file looks like that:

2023-04-21 14:49:05.5881 INFO DEVELOPMENT Mode
2023-04-21 14:49:05.7374 INFO User profile is available. Using 'C:\Users\mariuszw\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
2023-04-21 14:49:06.3588 INFO Now listening on: https://localhost:7040
2023-04-21 14:49:06.3588 INFO Now listening on: http://localhost:5041
2023-04-21 14:49:06.3588 INFO Application started. Press Ctrl+C to shut down.
2023-04-21 14:49:06.3588 INFO Hosting environment: Development
2023-04-21 14:49:06.3588 INFO Content root path: C:\vs\WebApp\ASP.NET_CORE_CQRS\MwTechCqrs\MwTech.UI
2023-04-21 14:49:07.7292 INFO Request starting HTTP/2 GET https://localhost:7040/ - -
2023-04-21 14:49:07.8831 INFO Request finished HTTP/2 GET https://localhost:7040/ - - - 404 0 - 148.1378ms

Did i do something wrong ?

 

Mihaela
Telerik team
 answered on 26 Apr 2023
1 answer
106 views

Hello,

Is there any way to change the <input> attr to <textarea></textarea> in popup?

I have gotten as far as doing some basic jquery removeClass and replaceWith. that seems to do the trick it to show the box,

but not the data. 

I know there is an example in how to do it in grid for jquery. But I am trying to see if there is another solution in mvc grid.

Any help is greatly appreciated. 

 

Thank you,

Andi.

Alexander
Telerik team
 answered on 25 Apr 2023
1 answer
1.0K+ views

I upgrade from 'telerik.ui.for.aspnet.core.2019.1.220.commercial' to 'telerik.ui.for.aspnet.core.2023.1.117.commercial' and now the check box doesn't display check even though the data from the database is true

@(Html.Kendo().CheckBox() .Name("MyCheckbox").Label("Yes")

I even tried @(Html.Kendo().CheckBox() .Name("MyCheckbox").Checked(true).Label("Yes"), it still won't show the checkbox as checked.

Regards

 

Alexander
Telerik team
 answered on 21 Apr 2023
1 answer
150 views

Hi,

How can I use JS to scroll the ListView to the bottom.
The solution below does not work
            var listView = $("#ChatListView").data("kendoListView");
            var lastIndex = listView.dataSource.total() - 1;
            var lastItemOffsetTop = listView.items().eq(lastIndex).offset().top;
            var listViewHeight = listView.element.height();
            var scrollDistance = lastItemOffsetTop - listViewHeight + listView.items().eq(lastIndex).height();
            listView.element.scrollTop(scrollDistance);

Alexander
Telerik team
 answered on 20 Apr 2023
1 answer
192 views

Trying to setup Azure CI/CD w/ Telerik.UI.for.AspNet.Core.Trial and w/ a Docker Image.

I followed all the instructions provided in your documentation for including Telerik in a Docker image.

But I'm getting the following error in Azure, is the trial version not supported for a CI/CD pipeline?

Mihaela
Telerik team
 answered on 19 Apr 2023
1 answer
336 views

Hi All

Right now Kendo Wizard only allows to move 1 step up or down. Do we have any way to make it all steps clickable. If I am on step 1 I can click on step 4 to see the content or click anyway to go to any step instead of only 1 +-

https://demos.telerik.com/aspnet-core/wizard/ajax

 

Mihaela
Telerik team
 answered on 13 Apr 2023
1 answer
214 views

HI
I added the search with filter="FilterType.Contains" to the dropdowntree-editor control

Now if I select the parent checkbox, the children are no longer automatically selected.
How can I do?
Thank you

 


  <form-item field="Destinatari" col-span="1">
                                <item-label text="Destinatari (attivi con capacità espositiva):" optional="false" />
                            <dropdowntree-editor LoadOnDemand="false" name="dropdowntree_Destinatari" auto-close="false" dataspritecssclassfield="spriteCssClass" value-template-id="dropdowntree-value-template" template-id="dropdowntree-template"
                                                 datatextfield="text"
                                                 filter="FilterType.Contains"
                                                style="width: 100%" >
                                <hierarchical-datasource>
                                    <schema>
                                        <hierarchical-model id="id"></hierarchical-model>
                                    </schema>
                                    <transport>
                                            <read url="@Url.Action("Items_GetDestinatari", "FormCampagna")"  />
                                    </transport>
                                </hierarchical-datasource>
                                <checkboxes check-children="true"  enabled="true" />
                                </dropdown

Alexander
Telerik team
 answered on 12 Apr 2023
1 answer
246 views

I am trying to implement the Hierarchy with asp.net core razor grid. The child detail rows are not coming up. Can you please help me with this issue

@(Html.Kendo().Grid < Orders.Models.Case>
                                ().Name("grid")
                                //.Groupable()
                                .Sortable()
                                .Scrollable()
                                .Filterable()
                                 .ToolBar(t => t.Search())
                                 .Resizable(resize => resize.Columns(true))
                                //.ToolBar(x => x.Create())
                                .Columns(columns =>
                                {

                                    columns.Bound(column => column.EmpId).Stickable(true);
                                    columns.Bound(column => column.Name);
                                    columns.Bound(column => column.Type);

                                    //columns.Command(column =>
                                    //{
                                    //    column.Edit();
                                    //    column.Destroy();
                                    //}).Width(230);
                                })
                                .ToolBar(tools => tools.Excel()).Excel(excel => excel.FileName("cases.xlsx"))
                                .Excel(excel => excel.AllPages(true))
                                 .Reorderable(reorder => reorder.Rows(true).Columns(true))
                                .DataSource(ds => ds.Ajax()
                                .Read(r => r.Url("/Index?handler=Read").Data("forgeryToken"))
                                .ServerOperation(false)
                             
                                .PageSize(10)
                                )
                                .Pageable()
                                .Pageable(pageable => pageable.PageSizes(new int[] { 5, 10, 20, 100 }))
                                .ClientDetailTemplateId("template")
)

<script>
    function forgeryToken() {
        return kendo.antiForgeryTokens();
    }
</script>

<script id="template" type="text/kendo-tmpl">
            @(Html.Kendo().Grid<CobbJudicialRecordsSrch.Models.CaseOffenses>()
                    .Name("grid_#=CaseId#") // template expression, to be evaluated in the master context
                    .Columns(columns =>
                    {
                        columns.Bound(o => o.OrderId).Width(110);
                        columns.Bound(o => o.OrderDescription).Width(150);
                        columns.Bound(o => o.OrderName).Width(150);

                        //columns.Bound(o => o.Dispositon).ClientTemplate("\\#= ShipAddress \\#"); // escaped template expression, to be evaluated in the child/detail context
                        //columns.Bound(o => o.ShipName).Width(300);
                    })
                    .DataSource(dataSource => dataSource
                        .Ajax()
                        .PageSize(10)
                         .Read(read => read.Action("HierarchyBinding_Orders", "Grid", new { employeeID = "#=empId#" }))
                    )
                    .Pageable()
                    .Sortable()
                    .ToClientTemplate()
            )
</script>
<script>
    function dataBound() {
        this.expandRow(this.tbody.find("tr.k-master-row").first());
    }
</script>

 

 

Alexander
Telerik team
 answered on 11 Apr 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?