Links not underlining

1 Answer 85 Views
Grid
GORAN
Top achievements
Rank 1
Iron
GORAN asked on 09 Sep 2022, 07:16 PM

Hello,

Simple issue I think. 

 

Here is the grid:

 


@(Html.Kendo().Grid<myHinkleyWebApp.Models.PhoneNumberSearch>() .Name("include_grid") .Columns(columns => { columns.Bound(p => p.CustomerNumber).ClientTemplate( "<a style='text - decoration:underline' target='_blank' href='" + "#= LinkToAccountCard #'" + " >#= CustomerNumber #" + "</a>" ); columns.Bound(p => p.OpenOrdersLink).ClientTemplate( "<a style='text - decoration:underline' target='_blank' href='" + "#= OpenOrdersLink #'" + " > Open Orders</a>" ); //columns.Bound(p => p.CustomerNumber); columns.Bound(p => p.CompanyName); columns.Bound(p => p.CompanyType); columns.Bound(p => p.ContactName); columns.Bound(p => p.ActiveAccount); columns.Bound(p => p.ActiveContact); //columns.Bound(p => p.status_override); //columns.Bound(p => p.inventory_id).Title("").ClientTemplate("<a href='" + Url.Action("Delete", new { id = "#=inventory_id#", m_id = "#=customer_id#" }) + "'>Delete</a>"); //columns.Command(command => command.Destroy()).Width(150); }) //.ToolBar(toolbar => { // //toolbar.Create(); // toolbar.Save(); //}) //.Editable(editable => editable.Mode(GridEditMode.InCell)) .Pageable() .Navigatable() .Sortable() //.Scrollable() .DataSource(dataSource => dataSource .Ajax() .PageSize(10) .Batch(true) .ServerOperation(false) .Events(events => events.Error("error_handler")) //.Model(model => { model.Id(p => p.inventory_id); model.Field(p => p.inventory_id).DefaultValue(Guid.Empty); model.Field(p => p.customer_id).DefaultValue(Guid.Empty); }) //.Create("Item_Create_Update", "HLI_Customer_Specific_Inventory", new { CusNo = Model.CusNo }) .Read("GetPhoneNumbers", "PhoneNumberSearch", new {id = Model.ProneNumberBeingSearched }) //.Update("Item_Create_Update", "HLI_Customer_Specific_Inventory", new { CusNo = Model.CusNo }) //.Destroy("Item_Destroy", "HLI_Customer_Specific_Inventory", new { CusNo = Model.CusNo }) ) )


Notice the first 2 columns are links. 

I cannot get it to underline! Says that its over ruled by 

 

Any help in the code greatly appreciated!

Yanislav
Telerik team
commented on 14 Sep 2022, 08:56 AM

Hello,

The style rules should not contain blank spaces. Removing the spaces in the anchor tag declaration seems to fix the problem, and the links are rendered correctly.

"<a style='text - decoration:underline;' target='_blank' href='" +

Here is an example: https://netcorerepl.telerik.com/mmaXbyOs48MuqRMU22

I hope this helps.

1 Answer, 1 is accepted

Sort by
0
GORAN
Top achievements
Rank 1
Iron
answered on 14 Sep 2022, 01:02 PM

Issue was with style and spaces in text - decoration:underline 

 

Should be text-decoration:underline

Tags
Grid
Asked by
GORAN
Top achievements
Rank 1
Iron
Answers by
GORAN
Top achievements
Rank 1
Iron
Share this question
or