Jump to content
Software FX Community

Click Event On Map in WebForms


User (Legacy)

Recommended Posts

Hi,

I cant get the OnClick event running in webforms.

private void InitializeComponent()

{

this.Map1.Click += new

SoftwareFX.ChartFX.Internet.Server.MouseEventHandlerX(this.Map1_Click);

this.Load += new System.EventHandler(this.Page_Load);

}

private void Map1_Click(object sender,

SoftwareFX.ChartFX.Internet.Server.MouseEventArgsX e)

{

// Event Never gets here....No postback is done..

}

Anybody knows what im doing wrong?

thanks

Jan

Link to comment
Share on other sites

Jan,

The behaviour you are experiencing is normal.

To illustrate this change the gallery back to Bar, assuming you are using

the .NET client in the browser, and you will see that you can click on the

bars.

And will get the call.

With Maps, things work a little differently.

What you need to do is attach a Url to each PointAttributes object using the

Link Property.

// As Sample using the ConditionalAttributes

Map1.ConditionalAttributes[0].Link.Url =

"http://localhost/WebTest65/WebForm1.aspx?Name=$Name&Values=$Values&Value=$V

alue";

Here I provide several helper strings to aid you with knowing which point

was clicked!

$Name will be replaced with the DisplayName of the MapRegion

$Value will be replaced with the Value based on the Winning Series

$Values will be replaced with a comma delimited string of all the values for

that point.

The idea here is to use a URL to generate the Postback not using the

javaScript:__doPostBack() function!

Map derives from Chart and that is where it gets the Click event from.

But we found that the Click event is far too simple so we designed it that

way.

If they way we designed it is not good for your case please provide a real

case that doesn't fit and I will try to work with you.

Hope this helps.

-CJS

"Jan" <jan.frandegard@dspanel.com> wrote in message

news:f$Qwi5CjEHA.3152@webserver3.softwarefx.com...

> Hi,

>

> I cant get the OnClick event running in webforms.

>

> private void InitializeComponent()

> {

> this.Map1.Click += new

> SoftwareFX.ChartFX.Internet.Server.MouseEventHandlerX(this.Map1_Click);

> this.Load += new System.EventHandler(this.Page_Load);

> }

>

> private void Map1_Click(object sender,

> SoftwareFX.ChartFX.Internet.Server.MouseEventArgsX e)

> {

> // Event Never gets here....No postback is done..

> }

>

>

>

> Anybody knows what im doing wrong?

>

> thanks

>

> Jan

>

>

Link to comment
Share on other sites

Thanks alot for you answer, i will try it right away.

Are there any samples on how to use Maps in webforms? The only samples i can

find are Maps in winforms.

thanks agan

/Jan

"Software FX Support" <support@softwarefx.com> wrote in message

news:wR3hjMFjEHA.3152@webserver3.softwarefx.com...

> Jan,

> The behaviour you are experiencing is normal.

> To illustrate this change the gallery back to Bar, assuming you are using

> the .NET client in the browser, and you will see that you can click on the

> bars.

> And will get the call.

>

> With Maps, things work a little differently.

> What you need to do is attach a Url to each PointAttributes object using

the

> Link Property.

> // As Sample using the ConditionalAttributes

> Map1.ConditionalAttributes[0].Link.Url =

>

"http://localhost/WebTest65/WebForm1.aspx?Name=$Name&Values=$Values&Value=$V

> alue";

>

> Here I provide several helper strings to aid you with knowing which point

> was clicked!

> $Name will be replaced with the DisplayName of the MapRegion

> $Value will be replaced with the Value based on the Winning Series

> $Values will be replaced with a comma delimited string of all the values

for

> that point.

>

> The idea here is to use a URL to generate the Postback not using the

> javaScript:__doPostBack() function!

> Map derives from Chart and that is where it gets the Click event from.

> But we found that the Click event is far too simple so we designed it that

> way.

>

> If they way we designed it is not good for your case please provide a real

> case that doesn't fit and I will try to work with you.

>

> Hope this helps.

> -CJS

>

> "Jan" <jan.frandegard@dspanel.com> wrote in message

> news:f$Qwi5CjEHA.3152@webserver3.softwarefx.com...

> > Hi,

> >

> > I cant get the OnClick event running in webforms.

> >

> > private void InitializeComponent()

> > {

> > this.Map1.Click += new

> > SoftwareFX.ChartFX.Internet.Server.MouseEventHandlerX(this.Map1_Click);

> > this.Load += new System.EventHandler(this.Page_Load);

> > }

> >

> > private void Map1_Click(object sender,

> > SoftwareFX.ChartFX.Internet.Server.MouseEventArgsX e)

> > {

> > // Event Never gets here....No postback is done..

> > }

> >

> >

> >

> > Anybody knows what im doing wrong?

> >

> > thanks

> >

> > Jan

> >

> >

>

>

Link to comment
Share on other sites

Thanks alot for you answer, i will try it right away.

Are there any samples on how to use Maps in webforms? The only samples i can

find are Maps in winforms.

thanks agan

/Jan

"Software FX Support" <support@softwarefx.com> wrote in message

news:wR3hjMFjEHA.3152@webserver3.softwarefx.com...

> Jan,

> The behaviour you are experiencing is normal.

> To illustrate this change the gallery back to Bar, assuming you are using

> the .NET client in the browser, and you will see that you can click on the

> bars.

> And will get the call.

>

> With Maps, things work a little differently.

> What you need to do is attach a Url to each PointAttributes object using

the

> Link Property.

> // As Sample using the ConditionalAttributes

> Map1.ConditionalAttributes[0].Link.Url =

>

"http://localhost/WebTest65/WebForm1.aspx?Name=$Name&Values=$Values&Value=$V

> alue";

>

> Here I provide several helper strings to aid you with knowing which point

> was clicked!

> $Name will be replaced with the DisplayName of the MapRegion

> $Value will be replaced with the Value based on the Winning Series

> $Values will be replaced with a comma delimited string of all the values

for

> that point.

>

> The idea here is to use a URL to generate the Postback not using the

> javaScript:__doPostBack() function!

> Map derives from Chart and that is where it gets the Click event from.

> But we found that the Click event is far too simple so we designed it that

> way.

>

> If they way we designed it is not good for your case please provide a real

> case that doesn't fit and I will try to work with you.

>

> Hope this helps.

> -CJS

>

> "Jan" <jan.frandegard@dspanel.com> wrote in message

> news:f$Qwi5CjEHA.3152@webserver3.softwarefx.com...

> > Hi,

> >

> > I cant get the OnClick event running in webforms.

> >

> > private void InitializeComponent()

> > {

> > this.Map1.Click += new

> > SoftwareFX.ChartFX.Internet.Server.MouseEventHandlerX(this.Map1_Click);

> > this.Load += new System.EventHandler(this.Page_Load);

> > }

> >

> > private void Map1_Click(object sender,

> > SoftwareFX.ChartFX.Internet.Server.MouseEventArgsX e)

> > {

> > // Event Never gets here....No postback is done..

> > }

> >

> >

> >

> > Anybody knows what im doing wrong?

> >

> > thanks

> >

> > Jan

> >

> >

>

>

Link to comment
Share on other sites

Yes!

We have created these samples and are currently migrating them into our new

installer.

If you wish to get these samples please contact support.

-cjs

"Jan" <jan.frandegard@dspanel.com> wrote in message

news:inC01BfjEHA.3080@webserver3.softwarefx.com...

> Thanks alot for you answer, i will try it right away.

> Are there any samples on how to use Maps in webforms? The only samples i

can

> find are Maps in winforms.

>

> thanks agan

>

> /Jan

>

>

> "Software FX Support" <support@softwarefx.com> wrote in message

> news:wR3hjMFjEHA.3152@webserver3.softwarefx.com...

> > Jan,

> > The behaviour you are experiencing is normal.

> > To illustrate this change the gallery back to Bar, assuming you are

using

> > the .NET client in the browser, and you will see that you can click on

the

> > bars.

> > And will get the call.

> >

> > With Maps, things work a little differently.

> > What you need to do is attach a Url to each PointAttributes object using

> the

> > Link Property.

> > // As Sample using the ConditionalAttributes

> > Map1.ConditionalAttributes[0].Link.Url =

> >

>

"http://localhost/WebTest65/WebForm1.aspx?Name=$Name&Values=$Values&Value=$V

> > alue";

> >

> > Here I provide several helper strings to aid you with knowing which

point

> > was clicked!

> > $Name will be replaced with the DisplayName of the MapRegion

> > $Value will be replaced with the Value based on the Winning Series

> > $Values will be replaced with a comma delimited string of all the values

> for

> > that point.

> >

> > The idea here is to use a URL to generate the Postback not using the

> > javaScript:__doPostBack() function!

> > Map derives from Chart and that is where it gets the Click event from.

> > But we found that the Click event is far too simple so we designed it

that

> > way.

> >

> > If they way we designed it is not good for your case please provide a

real

> > case that doesn't fit and I will try to work with you.

> >

> > Hope this helps.

> > -CJS

> >

> > "Jan" <jan.frandegard@dspanel.com> wrote in message

> > news:f$Qwi5CjEHA.3152@webserver3.softwarefx.com...

> > > Hi,

> > >

> > > I cant get the OnClick event running in webforms.

> > >

> > > private void InitializeComponent()

> > > {

> > > this.Map1.Click += new

> > >

SoftwareFX.ChartFX.Internet.Server.MouseEventHandlerX(this.Map1_Click);

> > > this.Load += new System.EventHandler(this.Page_Load);

> > > }

> > >

> > > private void Map1_Click(object sender,

> > > SoftwareFX.ChartFX.Internet.Server.MouseEventArgsX e)

> > > {

> > > // Event Never gets here....No postback is done..

> > > }

> > >

> > >

> > >

> > > Anybody knows what im doing wrong?

> > >

> > > thanks

> > >

> > > Jan

> > >

> > >

> >

> >

>

>

>

Link to comment
Share on other sites

  • 5 years later...

Archived

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

×
×
  • Create New...