This question is locked. New answers and comments are not allowed.
Hi,
We are using customized Editor template for grid. In that editor template .ascx page, there is one checkbox and on that checkboxclick we need to fetch data from database & show/bind that data to existing controls. For this we want to render partial view in editor template. But it is not getting rendered. Please guide me whether we can do this in editor template.
We are using customized Editor template for grid. In that editor template .ascx page, there is one checkbox and on that checkboxclick we need to fetch data from database & show/bind that data to existing controls. For this we want to render partial view in editor template. But it is not getting rendered. Please guide me whether we can do this in editor template.
8 Answers, 1 is accepted
0
Hello Nilambari,
Atanas Korchev
the Telerik team
We cannot tell what what is happening unless we somehow reproduce the problem. Proving a sample project would be of help.
Regards,Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Guilherme
Top achievements
Rank 1
answered on 15 Mar 2012, 06:48 PM
Hello!
I have the same issue with a Grid.
On my view I have:
After, I have a Grid:
The Grid does not render, but if I put the @RenderPage after the Grid it works and if I remove the Toolbar.Template (and the Render() method) also it works.
What can I do to have this solution working?
The content of the partial view doesnt metter, could be an empty content.
Regards
Guilherme Moschen
I have the same issue with a Grid.
On my view I have:
@RenderPage("~/Views/Shared/_qUnit.cshtml")After, I have a Grid:
@{Html.Telerik().Grid<MVCWebUIComponent.Test.Models.Entities.User>() .Name("UserGrid") .DataKeys(conf => conf.Add(exp => exp.UserId)) .ToolBar(toolbar => toolbar.Template( @<text> <input id='toolbarEditRow' type='button' class='icon edit<%= (Model.Editable)?string.Empty:" disabled" %>' title='Edit the selected row' value='Edit' /> <input id='toolbarSabeRow' type='button' class='icon save<%= (Model.Editable)?string.Empty:" disabled" %>' title='Save the current row' value='Save' /> <span class='toolbarDelimiter'> </span> <input id='toolbarAddRow' type='button' class='icon add<%= (Model.Editable)?string.Empty:" disabled" %>' title='Add a new row' value='Add' /> <input id='toolbarDeleteRow' type='button' class='icon delete<%= (Model.Editable)?string.Empty:" disabled" %>' title='Delete the selected row' value='Delete' /> </text> )) .DataBinding(bind => bind.Ajax() .Select("GetUsers", "Scripts") .Update("GetUsers", "Scripts") .Insert("GetUsers", "Scripts") .Delete("GetUsers", "Scripts") ) .Columns(columns => { columns.Bound(o => o.UserId).Width(30); columns.Bound(o => o.FirstName).Width(150); columns.Bound(o => o.LastName).Width(150); columns.Bound(o => o.FavouriteColor).Width(150); columns.Bound(o => o.BirthDay).Width(150); columns.Bound(o => o.Salary).Width(100); columns.Command(c => c.Delete()).Width(180).Visible(false); }) //set features .Editable(editing => editing.Mode(GridEditMode.InLine).Enabled(true)) .Selectable(selection => selection.Enabled(true)) .Scrollable() .Render(); }The Grid does not render, but if I put the @RenderPage after the Grid it works and if I remove the Toolbar.Template (and the Render() method) also it works.
What can I do to have this solution working?
The content of the partial view doesnt metter, could be an empty content.
Regards
Guilherme Moschen
0
Hi,
Atanas Korchev
the Telerik team
Did you check the generated HTML? Is the grid HTML present there? The problem could be related to invalid HTML markup (unclosed or improperly nested tags).
Regards,Atanas Korchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Guilherme
Top achievements
Rank 1
answered on 16 Mar 2012, 03:04 PM
None HTML is generated by @Html.Telerik().Grid and that's is the problem and I isolated the code, I mean:
<body>
@RenderPage
@Html.Telerik().Grid()
</body>
<body>
@RenderPage
@Html.Telerik().Grid()
</body>
0
Hello Guilherme,
We are not aware of such issue. If you send us a sample project which replicates the problem then we can check it and do our best to provide you with the most appropriate solution.
Regards,
Petur Subev
the Telerik team
We are not aware of such issue. If you send us a sample project which replicates the problem then we can check it and do our best to provide you with the most appropriate solution.
Regards,
Petur Subev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Guilherme
Top achievements
Rank 1
answered on 19 Mar 2012, 08:04 PM
Hello!
I could create a small and isolated project, take a look on the /Views/Home/Index.cshtml.
There you can find a scenario which the issue happens.
Regards
Guilherme
I could create a small and isolated project, take a look on the /Views/Home/Index.cshtml.
There you can find a scenario which the issue happens.
Regards
Guilherme
0
Hi again Nilambari,
Thank you for sending us the sample project. The issue is caused by the @RenderPage method. You can try the following scenario without using our extensions.
You will notice that the forms is not rendered to the Output.
Fortunately you have several solutions here:
All the best,
Petur Subev
the Telerik team
Thank you for sending us the sample project. The issue is caused by the @RenderPage method. You can try the following scenario without using our extensions.
@RenderPage("~/Views/Shared/_Test.cshtml")@using (Html.BeginForm()){ <div>The Form surrounding this div is not rendered to the output</div>}You will notice that the forms is not rendered to the Output.
Fortunately you have several solutions here:
- Use the @() syntax to render your Grid.
e.g.
@(Html.Telerik().Grid<MvcApplication.Models.Entities.User>().Name("UserGrid")//...) - Use RenderPartial helper method instead of RenderPage.
All the best,
Petur Subev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Guilherme
Top achievements
Rank 1
answered on 20 Mar 2012, 05:00 PM
With @{Html.RenderPartial("~/Views/Shared/_qUnit.cshtml");} it works!!
Thanks a lot!
Guilherme
Thanks a lot!
Guilherme