Brockmann: "Creating Rich Web
Applications Gets a Ton Easier"

e-grou chooses Visual WebGui
over standard ASP.NET

Quick migration of VB 6.0
Applications to the Web

Fully functional software versions
for 30 days evaluation period

Download the free edition of the
Visual WebGui Studio
 

Code Snippets

ori.cohen posted on September 23, 2009 :: 574 views

This 3rd party control was wrapped following the exact steps detailed in this article here.

For now, this code snippet is in C# only.
The solution and project are MS Visual Sudio 2008, and using the "FarPoint Spread for ASP.NET" installation for VS 2008.
The required FarPoint assemblies are attached. Please make sure you have a valid license for using them if you decide to do so.
This requires the .NET 3.5 framework SP1 to be installed.

This snippet was created using VWG v6.4 Preview3 (of September 22nd), though it will also work with VWG v6.3.x versions.

Download Code

Note: Codes are submitted as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Terms of Agreement:
By using this code, you agree to the following terms...

  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame.
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

Post Rating

Comments

# mblank
It´s only wrapping the spread. The problem comes when you try to set some properties to use the control.

Put this line on Fom_Load: (setting 10 columns to control)

private void FarPointSpreadForm_Load(object sender, EventArgs e)
{
mobjFpSpreadWrapper.Columns.Count = 10;
}

It gives a message:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Request is not available in this context
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Request is not available in this context

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): Request is not available in this context]
System.Web.UI.Page.get_Request() +8696984
FarPoint.Web.Spread.FpSpread.r() +313
FarPoint.Web.Spread.FpSpread.get_EnableClientScript() +459
FarPoint.Web.Spread.SheetView.get_FpSpread() +81
FarPoint.Web.Spread.SheetView.a(ISheetAxisModel A_0, Int32 A_1) +41
FarPoint.Web.Spread.SheetView.GetRowVisible(Int32 row) +158
FarPoint.Web.Spread.SheetView.SaveViewState() +3113
FarPoint.Web.Spread.FpSpread.SaveViewState() +2678
System.Web.UI.Control.SaveViewStateRecursive() +187
System.Web.UI.Control.SaveViewStateRecursive() +106
System.Web.UI.Control.SaveViewStateRecursive() +106
System.Web.UI.Control.SaveViewStateRecursive() +106
System.Web.UI.Control.SaveViewStateRecursive() +106
System.Web.UI.Control.SaveViewStateRecursive() +106
System.Web.UI.Page.SaveAllState() +168

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +71
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +350
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
Gizmox.WebGUI.Forms.Hosts.AspPipeLinePage.SaveStateInternal() +125
Gizmox.WebGUI.Forms.Hosts.AspControlBoxBase.Render(IContext objContext, IResponseWriter objWriter, Int64 lngRequestID) +86
Gizmox.WebGUI.Forms.Control.RenderControl(IContext objContext, IResponseWriter objWriter, Int64 lngRequestID) +260
Gizmox.WebGUI.Forms.Control.RenderControl(IContext objContext, IResponseWriter objWriter, Int64 lngRequestID, Control objFillControl, Int32 intIndex) +107
Gizmox.WebGUI.Forms.Control.RenderControls(IContext objContext, IResponseWriter objWriter, Int64 lngRequestID) +238
Gizmox.WebGUI.Forms.Form.RenderControls(IContext objContext, IResponseWriter objWriter, Int64 lngRequestID) +255
Gizmox.WebGUI.Forms.Form.Render(IContext objContext, IResponseWriter objWriter, Int64 lngRequestID) +86
Gizmox.WebGUI.Forms.Form.RenderControl(IContext objContext, IResponseWriter objWriter, Int64 lngRequestID) +266
Gizmox.WebGUI.Forms.Form.Gizmox.WebGUI.Common.Interfaces.IForm.RenderForm(IContext objContext, IResponseWriter objWriter, Int64 lngRequestID) +48
Gizmox.WebGUI.Server.Content.ProcessRequest(HttpContext objHttpContext) +5297

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
Gizmox.WebGUI.Server.Content.ProcessRequest(HttpContext objHttpContext) +6310
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Posted by mblank on Sunday, October 18, 2009 6:48 AM
# palli
mblank,
Try setting mobjFpSpreadWrapper.EnableClientScript = False
Not sure what impact it has on the control though, but it prevents the error
Palli
Posted by palli on Sunday, October 18, 2009 6:57 PM

Post Comment

Only registered users may post comments.
Most promising startups
Top 3 most promising startups in 2009
   AJAX Framework | Web Development | Cloud applications | RIA Development | Silverlight Applications | Legacy Migration
The most popular open source Ajax applications framework for enterprises | Sitemap | Terms Of Use | Privacy Statement
Copyright © 2005-2009 Visual WebGui®    Design By: Template World
   
Visual Studio Partners