Grid Column and Toolbar Template methods are Obsolete in Kendo.MVC dll

1 Answer 114 Views
Grid
Seetharam
Top achievements
Rank 1
Seetharam asked on 28 Feb 2023, 11:29 AM | edited on 28 Feb 2023, 01:17 PM

I am upgrading a .NET application from .NET 4.5 to .NET 6.0. As part of the upgrade have upgraded the Kendo.MVC dll as well from Version 2018.3.911.545 to 2022.1.119.0

 

In existing application we use Telerik grid and we use their template methods to define custom templates for Grid, toolbar and footer as shown below

pCol.Template( pT => { } ).Title( "" )
                                                  .Width( "3%" )
                                                  .ClientTemplate(
                                                      " #if (ExcludeFromWorkbook == false && ExcludeBtnExcludeFromWorkbookOnRow == false) {#" +
                                                      "<a class='btn btn-success btn-xs' id='btnIncludeExcludeInd_\"#=Id#\"' title='Row Included in Workbook, Click to Exclude from Workbook' onclick='onIncludeExcludeClick(this)'> <i class='fa fa-plus-square'></i> </a> #}"
                                                      + "if (ExcludeFromWorkbook == true && ExcludeBtnExcludeFromWorkbookOnRow == false) {# " +
                                                      "<a class='btn btn-danger btn-xs' id='btnIncludeExcludeInd_\"#=Id#\"' title='Row Excluded from Workbook, Click to Include in Workbook' onclick='onIncludeExcludeClick(this)'> <i class='fa fa-minus-square'></i> </a> #}"
                                                      + "else{# #}#"
                                                  )
                                                  .HtmlAttributes( new {style = "text-align: center;"} )
                                                  .ClientFooterTemplate( "#=conditionalSum('ExcludeFromWbBtn')#" );

 

  .ToolBar(toolbar =>
                            {
                                if (userCanEdit) //if user has edit rights show save and rest of toolbar template
                                {
                                    toolbar.Template(@<text>
                                                <div class="toolbar" id="toobarid1">
                                                    <input type="type" onblur="checkCommentField(this);" onkeypress="checkCommentField(this);" name="name" value="" class="k-textbox" id="componentComment" maxlength="500" placeholder="Edit values and add comment to enable Save..." style="width: 480px" />
                                                    @item.SaveButton()
                                                </div>
                                    </text>);
                                }
                            }) //e

 

But in the upgraded dll am unable to find the below method definitions

  • public virtual GridTemplateColumnBuilder<TModel> Template(Action<TModel> templateAction) in GridColumnFactory
  • public void Template(Func<Grid<T>, object> template); in GridToolBarCommandFactory
  • public GridBuilder<T> TableHtmlAttributes(object attributes); in GridBuilder  

Kindly let me know whats the equivalent methods available in the new dll to substitute the old ones and the new way of implementing our existing logic.

 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 03 Mar 2023, 06:28 AM

Hi ,

 

Thank you for reaching out to us!

I will need to gather a bit more information about this inquiry and I will be able to connect you with the proper product specialist. Can you advise of the following information at your convenience:

- Email address

- First and Last Name

- Company

- Address

- Vat ID (if applicable)


Thank you for your help in providing this information!

 

Regards,
Eyup
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
Seetharam
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or