Telerik Forums
UI for ASP.NET MVC Forum
1 answer
731 views

Hi All,

I have the kendo grid with group as below:

There are 2 groups

(1) Grant Name (want to count how many projects under the grant)

(2) Project Name (want to count how many items under the project)

I cannot get the count to show in each group header by using ClientGroupHeaderTemplate. My code below:

@(Html.Kendo().Grid<Grants.Models.ProjectView>()
    .Name("InProgress")
    .Columns(column =>
    {
        column.Bound(c => c.InvoiceDate).Title("Invoice Date").Width(130)
            .ClientTemplate("#if (MultipleCategory == 0)"
            + "{#<a onclick=\"windowSingleProcess(#=ProjectReimbursementId#)\"><span style='color:blue; cursor:pointer;'>#= kendo.toString(InvoiceDate,'MM/dd/yyyy') #</span></a>"
            + "#}else"
            + "{#<a onclick=\"windowMultipleProcess(#=ProjectReimbursementId#)\"><span style='color:blue; cursor:pointer;'>#= kendo.toString(InvoiceDate,'MM/dd/yyyy') #</span></a>"
            + "#}#")
            .ClientGroupHeaderTemplate("Count: #=count#");
        column.Bound(c => c.VendorName).Title("Vendor name");
        column.Bound(c => c.InvoiceNumber).Title("Invoice #");
        column.Bound(c => c.GrantFundedTotal).Title("Grant Funds Requested").Width(150).Format("{0:c2}").HtmlAttributes(new { style = "text-align:right!important" });
        column.Bound(c => c.ContributionFundedTotal).Title("Match").Width(150).Format("{0:c2}").HtmlAttributes(new { style = "text-align:right!important" });
        column.Bound(c => c.BudgetCategory).Title("Budget Category");                        
        column.Bound(c => c.ProcessedDate).Title("Process Date").Format("{0:d}").Width(130);
    })
    .Pageable()
    .Sortable()
    .Scrollable(s => s.Height("auto"))
    .ColumnMenu()
    .Mobile()                            
    .DataSource(ds => ds
        .Ajax()
        .Batch(true)
        .GroupPaging(true)
        .Model(m => m.Field(x => x.ProjectReimbursementId))
        .Group(g =>
        {
            g.Add(x => x.GrantName);
            g.Add(x => x.ProjectName);                                
        }) 
        .Aggregates(ag =>
        {
            ag.Add(x => x.GrantProjectId).Count();
            ag.Add(x => x.ProjectReimbursementId).Count();
            ag.Add(x => x.InvoiceDate).Count();
        })
        .Read(read => read.Action("MyReimbursementInProgress", "ProjectReimbursement"))
)

Thank you for your help.

Ivan Danchev
Telerik team
 answered on 06 Apr 2023
1 answer
1.3K+ views

I have a multistep wizard.  I need to validate some data inside one of the steps.  If the validation fails I need to prevent the wizard from moving on to the next step. 

Right now I'm doing this in the Next button click event of the step I'm validating: 


var validator = $("#myForm").kendoValidator().data("kendoValidator");
var valState = validator.validate();
var wizard = $("#wizard").data("kendoWizard");

if(valState == true) {
   //do some stuff
}

//valState was not true, so do this -- this is where I want to stop the step from moving on
wizard.select(4) //4 is the index of the current step

But this doesn't seem to work.  The stepper always moves on to the next step, regardless of what step I tell the wizard to select.  The validations all fire and if you go back to this step, all the error messages show.  But I want the error messages to show and the Next button not to go to next, and that doesn't seem to be working.  How do I make this work?

Anton Mironov
Telerik team
 answered on 06 Apr 2023
0 answers
235 views

Hi,

I have a Html.Kendo().Upload()

I am open new popup window using following code

 var objWin = $("#addWindowPopup"),
            undo = $("#undo");
        undo.click(function () {
            objWin.data("kendoWindow").top().open();
            undo.fadeOut();
        });

 objWin.kendoWindow({
                width: "94%",
                content: rootPath + "Workord/Popup?ispopup=1&eqinvid=" + eqinvid + "&wotype=" + wotype + "&controlno=" + controlno + "&mproc_id=" + mproc_id + "&mprocname=" + mprocname + "&procnum=" + procnum+"&freq=" + freq+"&occurs=" + occurs+"&freqname=" + freqname+"&nextdate=" + nextdate,
                height: "710px",
                visible: false,
                close: onClose,
                iframe: true,
                model: true,
            }).data("kendoWindow").open();

 

In popup I used Kendo().Upload() to save uploaded file in database but if I am upload file first time it save twice in database.

How to resolve this issue


Navneet
Top achievements
Rank 1
 updated question on 05 Apr 2023
0 answers
100 views

Focus order is inappropriate after Edit column settings popup is collapsed as focus moves from top of the page

observation:
When Edit column settings popup is collapsed, focus is expected to observed on the triggered respective ‘Edit column settings’ control and on next ‘Tab’ navigation, focus should move to the next control present after ‘Edit column settings’ control

viji
Top achievements
Rank 1
 asked on 04 Apr 2023
0 answers
195 views

1.Filter buttons present in the table are accessible through keyboard when we press ALT+down arrow but when we try to open filter, respective column header filter is not opening

2.Focus is not retaining back on the filter button after closing the Filter dialog using Esc key.

 

viji
Top achievements
Rank 1
 asked on 04 Apr 2023
0 answers
206 views

NVDA Screen reader is not announcing the sorting information for the table headers.

Observations

Screen reader is not announcing the sorting information for the table headers.
1. After giving the table shortcut key 'T' key NVDA should announce as column 1 User alias data, column headers with buttons are sorted (or)
2. When we land on the table header and pressing enter to sort, Screen reader should announce as 'User alias data column header column 1 with buttons are sortable.

3. After invoking the table column headers, screen reader should announce the sorting ascending or descending information.

 

 

viji
Top achievements
Rank 1
 asked on 04 Apr 2023
0 answers
196 views

NVDA is identifying single table as two tables, while navigating using table shortcut key (T).

Observation:
1. Row data cells are not associated with the table column headers. 

2.While navigating using table shortcut key ‘T’ in browse mode, NVDA is announcing as ‘clickable table with 1 rows and 15 columns row 1 column 1 Actions’, and using T key again, Screen reader announces ‘table clickable with 20 rows and 15 columns row 1 column 1 info button’  

3. Implementation of table is inappropriate where the tab focus is moving to all the controls in the table.

When using the kendo grid, it is considering the header as one table and data part as another table.

Hence need Resolution for considering the whole grid as one table

viji
Top achievements
Rank 1
 updated question on 04 Apr 2023
1 answer
302 views
getting on mvc grid 
Anton Mironov
Telerik team
 answered on 03 Apr 2023
0 answers
129 views

hi,

i use refresh token and access token is updating every time

i need call function before call read method to get new token and set in read function

like grid  , dropdownlist , ... read functions.

i use 'beforeSend' but it get one time token and in other call method dont update token.

 

 

 dataSource = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: "https://localhost:44337/api/GetUserInstance",
                        type: 'Get',
                        beforeSend: async function (req) {
                        
                            var token2 = await GetToken2();
  
                            req.setRequestHeader('Authorization', 'Bearer ' + token2.data);
                        }
                    }
                },
                change: function () {

                }
            });
hamed
Top achievements
Rank 1
 asked on 29 Mar 2023
1 answer
225 views

I have a grid using the bootstrap Nordic theme. The users have asked that the grid lines be made more prominent, rather than the light grey .

I have had a look at the new theme builder, but not only does it seem overkill for a small change, but also doesn't seem to allow the line colour and weight to be changed.

 

How can I make the grid lines black and increase the width slightly?

I'm using version 2022.3.1109

Anton Mironov
Telerik team
 answered on 28 Mar 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
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
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?