Jump to content
Software FX Community

custom web parts


looksharp123
 Share

Recommended Posts

Hi there
Is it a difficult or straightforward thing to integrate Chart FX components into custom web parts (i.e. web parts created using the WebPartManager control in VS 2005 for a straightforward ASP.NET application, not one based on the Sharepoint platform)?
I can only find information related to Sharepoint, but we don't develop this way.
I'd appreciate any comments.
Best regards
Loane
Link to comment
Share on other sites

We're using .NET.  Actually some tidbits I picked up in other threads helped me get autosave and autoload working.  UseCallbacksForEvents seemed to be key. 

BTW We're saving the personalize bytes in a web part personalizable property rather than the profile as the example docs show.  This is all done in the server control wrapper I mentioned.

[Personalizable(), WebBrowsable]

public Byte[] ChartPersonalization

{

  get { return btChartPersonalization; }

  set { try { btChartPersonalization = value; } catch (Exception) { } }

}

 

... 

// Save

if (e.Stream != null)

{

  Byte[] btChart = new Byte[e.Stream.Length];

  e.Stream.Read(btChart, 0, btChart.Length);

  e.Stream.Close();

 

  // The web part property will be saved in personalization

  ChartPersonalization = btChart;

}

 

 

// Read it back...

if (btChartPersonalization != null && btChartPersonalization.Length > 0)

{

  e.Stream = new System.IO.MemoryStream(btChartPersonalization);

}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...