Jump to content
Software FX Community

custom web parts


looksharp123

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...