DevExpress Control - Can't Get ASPxGridView to work

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.
3/14/2011 9:36:47 PM
Gravatar
Total Posts 7

DevExpress Control - Can't Get ASPxGridView to work

Hello Everyone,

I'm having a little trouble getting the DevExpress ASPxDataGridView to work within a Mojoportal webpart.

I have copied the DevExpress DLLs into the bin directory, I have also added the references and assembly information into the web.config.

The main thing that happens is, when I run the page that contains this webpart it comes back with "Microsoft JScript runtime error: 'ASPxClientGridView' is undefined".

This is how the component is defined, there are no calls within the C# code of the ascx file at this point:

--- Start Here ----

<%@ Control Language="C#" AutoEventWireup="false" CodeBehind="DataDisplay.ascx.cs" Inherits="Hazard.Web.UI.DataDisplayModule" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v10.1, Version=10.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v10.1, Version=10.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<portal:mojopanel id="mp1" runat="server" ArtisteerCssClass="art-Post" RenderArtisteerBlockContentDivs="true">
<mp:cornerroundertop id="ctop1" runat="server" />
<asp:Panel ID="pnlWrapper" runat="server" CssClass="art-Post-inner panelwrapper MBDataDisplay">

<portal:moduletitlecontrol EditText="Edit" EditUrl="~/HazDataDisplay/HazDataDisplayEdit.aspx" runat="server" id="TitleControl" />

<portal:mojopanel id="MojoPanel1" runat="server"
        ArtisteerCssClass="art-PostContent">
<asp:Panel ID="pnlHazDataDisplay" runat="server" CssClass="modulecontent">
<div class="settingrow">
        This will soon be the entry point to the HazDataDisplay.<br />
        <br />
        <dx:ASPxGridView id="gridContract" runat="server">
        </dx:ASPxGridView>
</div>

</asp:Panel>
</portal:mojoPanel>
<div class="cleared"></div>
</asp:Panel>
<mp:cornerrounderbottom id="cbottom1" runat="server" />
</portal:mojopanel>

--- End Here ---

Does anyone have any suggestions on how I should proceed?

Thanks

 

 

3/14/2011 10:33:02 PM
Gravatar
Total Posts 245
mojoPortal Community Expert

Re: DevExpress Control - Can't Get ASPxGridView to work

DevExpress ASPxGridView works fine in mojoPortal

In your web project make sure you have added references to these:
For the version you are using...

DevExpress.Web.v10.2
DevExpress.Web.ASPxGridView.v10.2
DevExpress.Web.ASPxEditors.v10.2
DevExpress.Data.v10.2

Also this should all be in your Web.config for the version you are using:

<configSections>
   <sectionGroup name="devExpress">
   <section name="settings" type="DevExpress.Web.ASPxClasses.SettingsConfigurationSection, DevExpress.Web.v10.2, Version=10.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
   <section name="compression" type="DevExpress.Web.ASPxClasses.CompressionConfigurationSection, DevExpress.Web.v10.2, Version=10.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
   <section name="themes" type="DevExpress.Web.ASPxClasses.ThemesConfigurationSection, DevExpress.Web.v10.2, Version=10.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
   <section name="errors" type="DevExpress.Web.ASPxClasses.ErrorsConfigurationSection, DevExpress.Web.v10.2, Version=10.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
   </sectionGroup>
</configSections>

<httpModules>
  <add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v10.2, Version=10.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />
</httpModules>

<compilation debug="true" defaultLanguage="C#" targetFramework="4.0">
   <assemblies>
  <add assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.5.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A" />
  <add assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.5.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A" />
  <add assembly="DevExpress.Web.v10.2, Version=10.2.5.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A" />
  <add assembly="DevExpress.Data.v10.2, Version=10.2.5.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A" />
   </assemblies>
</compilation>

</modules>
<add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v10.2, Version=10.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />
</modules>

 <devExpress>
<settings rightToLeft="false" />
<compression enableHtmlCompression="false" enableCallbackCompression="true" enableResourceCompression="true" enableResourceMerging="false" />
<themes enableThemesAssembly="true" />
<errors callbackErrorRedirectUrl="" />
  </devExpress>
</configuration>

 

Hope this helps

Rick

3/15/2011 7:43:03 AM
Gravatar
Total Posts 7

Re: DevExpress Control - Can't Get ASPxGridView to work

Hello Rick,

That worked perfectly,

It looks like I missed some sections within the web.config to make it work.

Thank you

12/19/2011 4:27:29 PM
Gravatar
Total Posts 63
Jerry McCreary
SureFire Studios, Inc.

Re: DevExpress Control - Can't Get ASPxGridView to work

I'm using DevExpress with mojoPortal also. I find it very helpful in developing data admins.

Question:  Can the config settings for Devexpress be put in a separate config file?  It is tedious to have them in the main web.config file when it comes to upgrading mojoPortal.

12/20/2011 2:15:37 PM
Gravatar
Total Posts 7

Re: DevExpress Control - Can't Get ASPxGridView to work

I think it is possible to do, the main thing is you will still have to make some minor changes to the web.config file to make it happen.

According to the MSDN article "appSettings Element (General Settings Schema)" it's seems like you can put the attribute "file=" in any of the main web.config sections. This won't overwrite all of the settings, just the ones you specify in the external file (like how the user.config file works)

I haven't tested this myself yet, but it seems like a solid theory to me, and this would save me alot of hassle in many of my web applications as well.

Thanks for the good idea.

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