[Solved] Double Controller in my URL Path Nested Partial Views and Grids

0 Answers 5 Views
Grid TabStrip
Cynthia
Top achievements
Rank 1
Iron
Cynthia asked on 23 Feb 2026, 09:40 PM

This really has got me stumped. I have a grid that has a tabstrip in it's custom editor template. This tabstrip calls a partial view with a grid in it. I'm getting to the partial view just fine.  But when I call my read action method it can't find it because it has my controller name twice in the url.  When I had this before it was because something was not defined in my grid correctly.  I don't think that is the case here since it is so simple.  I am using areas.

I'm going to show the code from the EditorTemplate onwards.  Please let me know if you need the initial view.

EditorTemplate

@using Compass.Areas.HookupCharges.Models
@using Compass.Areas.Lookup.Models
@model HookupChargeViewModel

<div class="container-fluid">
    <form>
        <div class="form-group">
            <div class="row">
                <kendo-tabstrip tab-position="left" name="tabstrip-left">
                    <items>
                        <tabstrip-item selected="true" 
                                       text="Property Information" 
                                       content-url="@Url.Action("PropertyInformation", "HookupCharges", new { hookupId = "#=Id#" })"
                                       type="POST">

                        </tabstrip-item>

 

Controller

namespace Compass.Areas.HookupCharges.Controllers
{
    [Area("HookupCharges")]
    public class HookupChargesController(HookupChargeServices hookupChargeServices, LookupService lookupService) : BaseController

{...

public IActionResult PropertyInformation(int hookupId)
 {
     ViewData["HookupId"]= hookupId;
     // You can pass a model to your partial view here if needed
     return PartialView("_PropertyInformation");
 }

...}

Partial View

@using Compass.Models;
@{
    var _hookupId = (int)ViewData["HookupId"];
}

@(
Html.Kendo().Grid<PropertyInfoViewModel>()
    .Name("HookupChargePropertyGrid")
    .Columns(columns =>
    {
        columns.Bound(p => p.Id);
        columns.Bound(p => p.Address);
        columns.Bound(p => p.AddressDirection);
        columns.Bound(p => p.StreetUnit);
        columns.Bound(p => p.TaxAccount);
    })
    .Pageable()
    .Sortable()
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(20)
        .Read(read => read.Action("HookupPropertyInfo_Read", "HookupCharge", new { hookupId = _hookupId }))
    )
)

Controller

It Never Gets Here

[HttpPost]
public async Task<IActionResult> HookupPropertyInfo_Read([DataSourceRequest] DataSourceRequest request)
{
    var model = await _hookupService.GetAllHookupChargePropertiesAsync(1279);
    var result = model.ToDataSourceResult(request);

    return Json(result);
}

Output

 https://localhost:44358/HookupCharges/HookupCharge/HookupPropertyInfo_Read

I have no idea about the aria message.  I'll work on that while I wait for an answer.

 

Cynthia
Top achievements
Rank 1
Iron
commented on 23 Feb 2026, 09:43 PM

Apologies the whole path is :https://localhost:44358/HookupCharges/HookupCharge/HookupPropertyInfo_Read?hookupId=1279

No answers yet. Maybe you can help?

Tags
Grid TabStrip
Asked by
Cynthia
Top achievements
Rank 1
Iron
Share this question
or