This is a migrated thread and some comments may be shown as answers.

[Solved] Redisplaying a tabstrip area after ModelState.IsValid

1 Answer 64 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
IQworks
Top achievements
Rank 1
IQworks asked on 13 Feb 2010, 07:22 PM
Hi,
   I have  a tabstrip app where on tab loads a form form for editing. Of course, the tab has parameters and calls  an actionresult method that gets the record from a table before displaying it for update. 
   If i want to redisplay this form, i have to call the selectedindex for this tab. But if I do, the tab parameters are resent and the page is repopulated with the data.  
   My issue is that when I send the form to its post method and there is a "ModelState" error,  how do i redisplay the tab area, with the current data (wether the data is right or wrong) still in the form ?
  Are there any samples that do this ?
thanks for your time

   

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 17 Feb 2010, 03:21 PM
Hi IQworks,

I have answered in the support thread opened on the same matter. Here is a quote of the answer:

Hello David,

Thank you for contacting us.

If I understand you correctly you need to redisplay the edit form with the values which were entered by the user before post to the server. If this is the case, there is no build-in way to achieve this. ASP.NET MVC does not have state, which means you need to handle it by yourself.

The CompanyForm action method (httpPost), companyRecord object should contains user changes. You can save it in session. Thus when Index.aspx is re-rendered you can get the companyRecord object and use it to populate the CompanyEdit tab.


All the best,
Georgi Krustev
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.
Tags
TabStrip
Asked by
IQworks
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or