Jump to content
Software FX Community

Sharepoint 2007 WebPart click event


User (Legacy)

Recommended Posts

Hi

I built ChartFX chart 2005 in sharepoint 2007 webpart. My problem is

following

I have a multiple Chart webparts (same code) on the same page. When I click

on the one of the chart webpart (say MyWebPart1) to get drill-down (use same

chart control and populate data based on what user clicked), another chart

webpart (say MyWebPart2) shows the detail but not the webpart I clicked on .

What I noticed for the all chart webparts, I see SFX_PostBack("Chart1",

"C:P, series, Yvalue) when I mouseover for all webpart charts.

I am specificying

Chart1.ID = "Chart1"

if i take it out Chart1.ID ="Chart1" my click event for all my webparts does

not fire.

If I put random number

e.g.

Chart1.ID = System.Guid.NewGuid.Substring(1,5) , my click event does not

fire either.

looks like i have to do something about SFX_PostBack but i donot know what

to do with it.

Your help is appreciated

Thanks

Dharmesh Trivedi.

Link to comment
Share on other sites

1) How are you hooking-up the event to the chart ? Is in code or in the 

markup (Design-time) ?

2) If the chart is contain within a Web Part, does that Web Par has an ID ?

3) Make sure you are using the latest Chart FX Service Pack, there was a bug

fixed some time ago that made incorrect Callbacks/Postbacks to charts that

were inside other controls (like in your case).

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

I am doing thru

(1) Chart1.Click += new HitTestEventHandler(ChartClick);

(2) its a sharepoint webpart , i am not setting id for the webpart at design

time.

(3) when I download latest patch, my update always says older version but

not new version .

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:593OFXT0GHA.3312@webserver3.softwarefx.com...

> 1) How are you hooking-up the event to the chart ? Is in code or in the

> markup (Design-time) ?

>

> 2) If the chart is contain within a Web Part, does that Web Par has an ID

?

>

> 3) Make sure you are using the latest Chart FX Service Pack, there was a

bug

> fixed some time ago that made incorrect Callbacks/Postbacks to charts that

> were inside other controls (like in your case).

>

> --

> Francisco Padron

> www.chartfx.com

>

>

Link to comment
Share on other sites

i just did the view source and found following

<area shape="poly" coords="227,133,230,133,230,137,227,137"

href="javascript:SFX_PostBack(´Chart182576´,´C:P,0,61´)"

onmousedown="SFX_setRightClickMenu(event,´Chart691176´,´29473´,´P,0,61´)"

oncontextmenu="return false;" title=" Value: 2" />

now i created Chart1.Id = "Chart" + Rnd.Next(999999).ToString(); why

*SFX_PostBack* has different id than *onmousedown*

btw i downloaded latest patch from your site.

as long as i hardcoded the chart id i am fine but in my case i will have

more than one chart (same code) in sharepoint page and to differentiate i

have to create diffrent id. ( or please tell me if there is a workaround)

"Dharmesh Trivedi" <Dharmesh.Trivedi@sanofi-aventis.com> wrote in message

news:q5$4pdU0GHA.1096@webserver3.softwarefx.com...

> I am doing thru

> (1) Chart1.Click += new HitTestEventHandler(ChartClick);

> (2) its a sharepoint webpart , i am not setting id for the webpart at

design

> time.

> (3) when I download latest patch, my update always says older version but

> not new version .

>

>

>

> "SoftwareFX Support" <noreply@softwarefx.com> wrote in message

> news:593OFXT0GHA.3312@webserver3.softwarefx.com...

> > 1) How are you hooking-up the event to the chart ? Is in code or in the

> > markup (Design-time) ?

> >

> > 2) If the chart is contain within a Web Part, does that Web Par has an

ID

> ?

> >

> > 3) Make sure you are using the latest Chart FX Service Pack, there was a

> bug

> > fixed some time ago that made incorrect Callbacks/Postbacks to charts

that

> > were inside other controls (like in your case).

> >

> > --

> > Francisco Padron

> > www.chartfx.com

> >

> >

>

>

Link to comment
Share on other sites

one more thing i noticed when i do view source is that there is only one

SFX_Postback function ( which is fine) but it hard codes the control name

is there code

function SFX_PostBack (chartId, clickId) {

__doPostBack(´ctl00$m$g_1b4015ce_2f03_46b1_9a8c_d771c5066e23$Chart_1b4´,clic

kId);

}

don´t you think it should user ChartID variable when calling postback

instead of hardcoding the control name

thanks

Dharmesh Trivedi

"Dharmesh Trivedi" <Dharmesh.Trivedi@sanofi-aventis.com> wrote in message

news:reVNj4U0GHA.3312@webserver3.softwarefx.com...

> i just did the view source and found following

>

> <area shape="poly" coords="227,133,230,133,230,137,227,137"

> href="javascript:SFX_PostBack(´Chart182576´,´C:P,0,61´)"

> onmousedown="SFX_setRightClickMenu(event,´Chart691176´,´29473´,´P,0,61´)"

> oncontextmenu="return false;" title=" Value: 2" />

>

> now i created Chart1.Id = "Chart" + Rnd.Next(999999).ToString(); why

> *SFX_PostBack* has different id than *onmousedown*

>

> btw i downloaded latest patch from your site.

>

> as long as i hardcoded the chart id i am fine but in my case i will have

> more than one chart (same code) in sharepoint page and to differentiate i

> have to create diffrent id. ( or please tell me if there is a workaround)

>

>

>

>

>

> "Dharmesh Trivedi" <Dharmesh.Trivedi@sanofi-aventis.com> wrote in message

> news:q5$4pdU0GHA.1096@webserver3.softwarefx.com...

> > I am doing thru

> > (1) Chart1.Click += new HitTestEventHandler(ChartClick);

> > (2) its a sharepoint webpart , i am not setting id for the webpart at

> design

> > time.

> > (3) when I download latest patch, my update always says older version

but

> > not new version .

> >

> >

> >

> > "SoftwareFX Support" <noreply@softwarefx.com> wrote in message

> > news:593OFXT0GHA.3312@webserver3.softwarefx.com...

> > > 1) How are you hooking-up the event to the chart ? Is in code or in

the

> > > markup (Design-time) ?

> > >

> > > 2) If the chart is contain within a Web Part, does that Web Par has an

> ID

> > ?

> > >

> > > 3) Make sure you are using the latest Chart FX Service Pack, there was

a

> > bug

> > > fixed some time ago that made incorrect Callbacks/Postbacks to charts

> that

> > > were inside other controls (like in your case).

> > >

> > > --

> > > Francisco Padron

> > > www.chartfx.com

> > >

> > >

> >

> >

>

>

Link to comment
Share on other sites

You have an old version that has this bug.

You need to download and install the Service Pack. What do you mean by "when

I download latest patch, my update always says older version but not new

version ", where are you checking ? The service pack will update the files

in Chart FX Folders, it will NOT update any copies that you have like for

example the copies in your project's bin folder.

You need be running the latest SP in order for this to work. Make sure the

versions of ChartFX.WebForms.dll in your BIN folder is up to date.

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

Francisco

i applied patch from softwareFX that did not work I also uninstall and

install the ChartFX that also did not work either

i have 7.0.2424.18088 of the chartfx.webforms in my bin directory ( i assume

thats your latest patch)

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:N1z9Eec0GHA.3604@webserver3.softwarefx.com...

> You have an old version that has this bug.

>

> You need to download and install the Service Pack. What do you mean by

"when

> I download latest patch, my update always says older version but not new

> version ", where are you checking ? The service pack will update the files

> in Chart FX Folders, it will NOT update any copies that you have like for

> example the copies in your project´s bin folder.

>

> You need be running the latest SP in order for this to work. Make sure the

> versions of ChartFX.WebForms.dll in your BIN folder is up to date.

>

> --

> Francisco Padron

> www.chartfx.com

>

>

Link to comment
Share on other sites

What you described before:

function SFX_PostBack (chartId, clickId) {

__doPostBack('ctl00$m$g_1b4015ce_2f03_46b1_9a8c_d771c5066e23$Chart_1b4',clic

kId);

}

Is changed in 7.0.2424, you should get:

function SFX_PostBack (chartId, clickId) {

__doPostBack(chartId,clickId);

}

Did you check the version of ChartFX.WebForms.dll in your application's bin

folder ?

If you continue to have problems please contact Software FX Support.

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

Problem solved.

In sharepoint 2007 there is a app_bin directory and I have to overwrite with

new dll that did the trick and solved the problem

Thanks for all your help Fracisco

"Dharmesh Trivedi" <Dharmesh.Trivedi@sanofi-aventis.com> wrote in message

news:#R7rhLe0GHA.3604@webserver3.softwarefx.com...

> Francisco

> i applied patch from softwareFX that did not work I also uninstall

and

> install the ChartFX that also did not work either

> i have 7.0.2424.18088 of the chartfx.webforms in my bin directory ( i

assume

> thats your latest patch)

>

>

>

>

> "SoftwareFX Support" <noreply@softwarefx.com> wrote in message

> news:N1z9Eec0GHA.3604@webserver3.softwarefx.com...

> > You have an old version that has this bug.

> >

> > You need to download and install the Service Pack. What do you mean by

> "when

> > I download latest patch, my update always says older version but not new

> > version ", where are you checking ? The service pack will update the

files

> > in Chart FX Folders, it will NOT update any copies that you have like

for

> > example the copies in your project´s bin folder.

> >

> > You need be running the latest SP in order for this to work. Make sure

the

> > versions of ChartFX.WebForms.dll in your BIN folder is up to date.

> >

> > --

> > Francisco Padron

> > www.chartfx.com

> >

> >

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...