Editor Control doesn't maintain its viewstate in mojogridview

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
2/22/2012 12:17:53 AM
Gravatar
Total Posts 7

Editor Control doesn't maintain its viewstate in mojogridview

I am using Editor Control in mojogridview as follow:

<mp:mojoGridView ID="grdDates" runat="server"
AllowPaging="false"
AllowSorting="false"
AutoGenerateColumns="false"
EnableViewState="true"
DataKeyNames="Date_ref"
GridLines="None"
ShowHeader="true">
<Columns>

<asp:TemplateField>
<HeaderTemplate>
<mp:SiteLabel id="lbldate3" runat="server" ConfigKey="DailySatsangPPDesc" UseLabelTag="false"></mp:SiteLabel>
</HeaderTemplate>
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "pp_desc").ToString()%>
</ItemTemplate>
<EditItemTemplate>
<mpe:EditorControl runat="server" ID="txtPPDesc" Text='<%#  Server.HtmlDecode(DataBinder.Eval(Container.DataItem, "pp_desc").ToString())%>'></mpe:EditorControl>
</EditItemTemplate>
</asp:TemplateField>  

</Columns>
</mp:mojoGridView>

Code Behind:

 void grdDates_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
EditorControl txtPPDesc = (EditorControl)grid.Rows[e.RowIndex].Cells[1].FindControl("txtPPDesc");

}

While retreiving value of txtPPDesc Editor Control it shows the earlier value but not changed one. I think it is not able to maintain viewstate in while using in mojogridview. I am not sure.

Can anyone help?

Thanks in Advance.Smile

 

 

2/23/2012 11:59:46 AM
Gravatar
Total Posts 18439

Re: Editor Control doesn't maintain its viewstate in mojogridview

It wasn't really designed for use in a Grid. For that you may have better luck using the editor from the AjaxControlToolkit

<AjaxControlToolkit:HTMLEditor ID="ed1" runat="server" />

Hope that helps,

Joe

2/24/2012 7:12:59 AM
Gravatar
Total Posts 7

Re: Editor Control doesn't maintain its viewstate in mojogridview

Thanks, Joe

What you have mentioned, it works..

You must sign in to post in the forums. This thread is closed to new posts.