Jump to content
Software FX Community
User (Legacy)

Click Event On Map in WebForms

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

Share this post


Link to post
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

>

>

Share this post


Link to post
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

> >

> >

>

>

Share this post


Link to post
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

> >

> >

>

>

Share this post


Link to post
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

> > >

> > >

> >

> >

>

>

>

Share this post


Link to post
Share on other sites

I am using the Maps Extentions using the client control, and need to capture the click event while passing assoicated map region.  Is there any way to do this with the client control?  We really need to zoom functionality.

Share this post


Link to post
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.

Loading...

×
×
  • Create New...