- Home
- Forum
- ASP.NET MVC (Classic)
- invisible grid on partialrender
invisible grid on partialrender
Guys,
I am doing something stupid, I am sure, but maybe someone can give me a pointer. I am using MVC 3 and latest Syncfusion 3.0
I have a view comprising:
- a partial view displaying a server-mode grid,
- an Ajax async form.
The idea is to submit the form to update the grid, adding a new row, without refreshing the whole page.
The whole page displays OK from the URL, but when I do the Ajax submit, the grid 'disappears'. The source of the page contains the updated HTML, with the newly added row, but is doesn't display - like the grid is hidden. The Browser debug tools show the grid rows to have a height and width, but nothing shows. It is the same on both Chrome and IE 9.
Any ideas?
Thanks
mark
Main View
+++++++++
@Using (Ajax.BeginForm("MeetingsAddItem", New AjaxOptions With {.UpdateTargetId = "divMeetingsList"}))
@Html.ValidationSummary(True)
@
End Using
@Code
Html.RenderPartial("MeetingListPartialView", Model.Meetings)
End code
Controller extract:
+++++++++++++++++++
_
Public Function MeetingsAddItem(oViewModel As ManageMeetingsViewModel) As ActionResult
m_oManageMeetings.AddNewItem("Yes!!!!")
Return PartialView("MeetingListPartialView", m_oManageMeetings.Meetings)
End Function
I am doing something stupid, I am sure, but maybe someone can give me a pointer. I am using MVC 3 and latest Syncfusion 3.0
I have a view comprising:
- a partial view displaying a server-mode grid,
- an Ajax async form.
The idea is to submit the form to update the grid, adding a new row, without refreshing the whole page.
The whole page displays OK from the URL, but when I do the Ajax submit, the grid 'disappears'. The source of the page contains the updated HTML, with the newly added row, but is doesn't display - like the grid is hidden. The Browser debug tools show the grid rows to have a height and width, but nothing shows. It is the same on both Chrome and IE 9.
Any ideas?
Thanks
mark
Main View
+++++++++
@Using (Ajax.BeginForm("MeetingsAddItem", New AjaxOptions With {.UpdateTargetId = "divMeetingsList"}))
@Html.ValidationSummary(True)
@
End Using
@Code
Html.RenderPartial("MeetingListPartialView", Model.Meetings)
End code
Controller extract:
+++++++++++++++++++
Public Function MeetingsAddItem(oViewModel As ManageMeetingsViewModel) As ActionResult
m_oManageMeetings.AddNewItem("Yes!!!!")
Return PartialView("MeetingListPartialView", m_oManageMeetings.Meetings)
End Function
SIGN IN To post a reply.
7 Replies
MT
Mark Treveil
August 18, 2011 03:08 PM UTC
A bit more info, the grid is invisible because of a dynamic style:
Mark
Mark
SN
Sridhar N
Syncfusion Team
August 19, 2011 12:29 PM UTC
Hi Mark,
Thanks for your interest in Syncfusion products.
Query #1 "the grid is invisible"
We have analyzed your code snippet and found that you have used Ajax.BeginForm, We suggest you to use Ajax.BeginFormExt. If the issue is reproduced still. Could you please check the conditions available in the document which can be downloaded from the below link.
Steps to avoid Grid Invisiblity in MVC-565716953.zip
Please get back to us with a sample reproducing the issue,if the issue retains after checking the conditions.So that we could sort out the issue and provide you with solution.The information provided would be of great help in resolving the issue.
Please let us know your concerns.
Regards,
Sridhar N
Thanks for your interest in Syncfusion products.
Query #1 "the grid is invisible"
We have analyzed your code snippet and found that you have used Ajax.BeginForm, We suggest you to use Ajax.BeginFormExt. If the issue is reproduced still. Could you please check the conditions available in the document which can be downloaded from the below link.
Steps to avoid Grid Invisiblity in MVC-565716953.zip
Please get back to us with a sample reproducing the issue,if the issue retains after checking the conditions.So that we could sort out the issue and provide you with solution.The information provided would be of great help in resolving the issue.
Please let us know your concerns.
Regards,
Sridhar N
MT
Mark Treveil
August 19, 2011 05:09 PM UTC
Yes, the BeginFormExt fixes it!
Thanks
mark
Thanks
mark
MT
Mark Treveil
August 21, 2011 08:55 PM UTC
Sorry, but there are still problems after a partial render.
If you run my sample attached (VS2010 MVC 3) and immediately start sorting the Title column up and down by clicking the header, all is fine.
If you press Partial Render, to do a PartialRender of the grid, then start sorting the Title again, it hangs the second time you clikc the title column header. I have stripped down the example - there is not much to it now, and used the mysterious BeginFormExt.
If you debug the client-side script, you can see it throwing errors such as:
"Unable to set value of the property 'id': object is null or undefined"
Thoughts?
Thanks
Mark
GridHangOnSorting_475b8f2d.zip
If you run my sample attached (VS2010 MVC 3) and immediately start sorting the Title column up and down by clicking the header, all is fine.
If you press Partial Render, to do a PartialRender of the grid, then start sorting the Title again, it hangs the second time you clikc the title column header. I have stripped down the example - there is not much to it now, and used the mysterious BeginFormExt.
If you debug the client-side script, you can see it throwing errors such as:
"Unable to set value of the property 'id': object is null or undefined"
Thoughts?
Thanks
Mark
GridHangOnSorting_475b8f2d.zip
SN
Sridhar N
Syncfusion Team
August 24, 2011 06:43 AM UTC
Hi Mark,
Thanks for your update.
Query #1 "If you press Partial Render, to do a PartialRender of the grid, then start sorting the Title again, it hangs the second time you clikc the title column header"
We have analysed your sample and found that you have returned the partial view in grid sorting action. We suggest you to return the grid action to avoid this issue.Please refer the below code snippet.
[Controller]
For your convenience, we have created sample and the same can be downloaded from the following link.
GridHangOnSorting-1116247719.zip
Please let me know if you have any other questions or concerns.
Regards,
Sridhar.N
Thanks for your update.
Query #1 "If you press Partial Render, to do a PartialRender of the grid, then start sorting the Title again, it hangs the second time you clikc the title column header"
We have analysed your sample and found that you have returned the partial view in grid sorting action. We suggest you to return the grid action to avoid this issue.Please refer the below code snippet.
[Controller]
_
Public Function MeetingsAddItem(ByVal args As PagingParams, ByVal oViewModel As ManageMeetingsViewModel) As ActionResult
Dim data As IEnumerable
If (args.RequestType > 0) Then
m_oManageMeetings.AddNewItem("This is a new row")
data = CType(m_oManageMeetings.Meetings, IEnumerable)
Return data.GridActions(Of Object)()
Else
m_oManageMeetings.AddNewItem("This is a new row")
Return PartialView("MeetingListPartialView", m_oManageMeetings.Meetings)
End If
End Function
For your convenience, we have created sample and the same can be downloaded from the following link.
GridHangOnSorting-1116247719.zip
Please let me know if you have any other questions or concerns.
Regards,
Sridhar.N
MT
Mark Treveil
August 25, 2011 06:23 PM UTC
Sridhar.N
Thanks. Fascinating. Is what I was doing 'wrong' in MVC terms, or this a current limitation of the grid logic? My approach matches that in the general blogs on MVC async partial rendering. I was using your approach for the sorting callback, but only because I blindly copied your example code.
I don't really understand the difference between
PartialView(mgObjList) and mgObjList.GridActions()
Indeed, what is ienumerable.GridActions()? The class reference says "Used to Generate Grid in Callbacks.", which is not giving much away.
I have to say that your grid deserves some much more comprehensive documentation and better online samples. MVC 3, async partial rendering, resizing, and interaction is pretty important to people like myself, the this stuff really isn't really covered. The current client-side example is of no use all. None of the examples even select a row on main render.
The class reference is pretty much a useless, auto-generated interface listing. While I appreciate all the help I am getting, some proper explanations and samples would save most of this.
I also don't understand why you guys persist with MVC 2 / APSX examples. The big take up this environment going to be from now onwards and in Razor. It is VB2 versus VB3 all over again.
You've got some good controls, but even I was starting to look around an wonder if it might be easier to make progress with another toolkit, like Telerik, with some better documentation.
Thanks
Mark
Thanks. Fascinating. Is what I was doing 'wrong' in MVC terms, or this a current limitation of the grid logic? My approach matches that in the general blogs on MVC async partial rendering. I was using your approach for the sorting callback, but only because I blindly copied your example code.
I don't really understand the difference between
PartialView(mgObjList) and mgObjList.GridActions()
Indeed, what is ienumerable.GridActions()? The class reference says "Used to Generate Grid in Callbacks.", which is not giving much away.
I have to say that your grid deserves some much more comprehensive documentation and better online samples. MVC 3, async partial rendering, resizing, and interaction is pretty important to people like myself, the this stuff really isn't really covered. The current client-side example is of no use all. None of the examples even select a row on main render.
The class reference is pretty much a useless, auto-generated interface listing. While I appreciate all the help I am getting, some proper explanations and samples would save most of this.
I also don't understand why you guys persist with MVC 2 / APSX examples. The big take up this environment going to be from now onwards and in Razor. It is VB2 versus VB3 all over again.
You've got some good controls, but even I was starting to look around an wonder if it might be easier to make progress with another toolkit, like Telerik, with some better documentation.
Thanks
Mark
SN
Sridhar N
Syncfusion Team
September 1, 2011 04:25 PM UTC
Hi Mark,
Thanks for your update.
Query #1 "The class reference says "Used to Generate Grid in Callbacks.", which is not giving much away."
The class reference for GridAction is correct. Since we use asynchronous partial rendering we need GridAction to return the actionresult.
Query #2 "Don't understand why you guys persist with MVC 2 / APSX examples."
We have samples in ASPX and razor having support for both MVC2 and MVC3. We have switching support for MVC2 and MVC3 for our samples.
Please refer the document in below link.
How to Switch between MVC2 to MVC3
Query #3 "I have to say that your grid deserves some much more comprehensive documentation and better online samples"
We are improving our UG documentation for each version and we will improve it in our upcoming release.
Please let us know your concerns.
Regards,
Sridhar N
Thanks for your update.
Query #1 "The class reference says "Used to Generate Grid in Callbacks.", which is not giving much away."
The class reference for GridAction is correct. Since we use asynchronous partial rendering we need GridAction to return the actionresult.
Query #2 "Don't understand why you guys persist with MVC 2 / APSX examples."
We have samples in ASPX and razor having support for both MVC2 and MVC3. We have switching support for MVC2 and MVC3 for our samples.
Please refer the document in below link.
How to Switch between MVC2 to MVC3
Query #3 "I have to say that your grid deserves some much more comprehensive documentation and better online samples"
We are improving our UG documentation for each version and we will improve it in our upcoming release.
Please let us know your concerns.
Regards,
Sridhar N
SIGN IN To post a reply.
- 7 Replies
- 2 Participants
-
MT Mark Treveil
- Aug 18, 2011 02:28 PM UTC
- Sep 1, 2011 04:25 PM UTC
6/11/2026 10:16:54 AM
Sun, 15 December 2024 03:30:00 UTC
Sun, 15 December 2024 03:30:00 AM
Wed, 16 Feb 2022 04:59:00 UTC