cancel
Showing results for 
Search instead for 
Did you mean: 

DropDownByKey.Select Event problem

Former Member
0 Kudos

Hi,

i have got again a phenomenal behavior of a control.

It is concerning the DropDownByKey Control.

I have implemented a method which adds a selected item of the DropDownByKey Control into a ListBox, when the Select Event of the Control is fired.

During the process of the first PostBack the DropDownByKey.Select Event is fired with no reason.

This does not happen at the next roundTrips.

Any Ideas?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Maybe you actually set the selected item in code which causes this event to fire?

Maybe you can post some of your PageLoad code here? (the relevant stuff anyway).

Regards,

Ofer

-


Have you filled the PDK survey yet? You can win an MP3 player!!!

http://feedback.sap.com/efs/vote?campaign=39c7899ecca40a6709a638bd0388ac8b&org=332

Former Member
0 Kudos

Hi Ofer,

here is the relevant stuff:

if (!IsPostBack)

{

....

....

initials();

....

}

else

{

....

....

initalizeSAPControls();

....

....

}

private void initalizeSAPControls()

{

....

UIProcessComponents.MainCl.DataBindingsForSAPControls(ref ddlZielbahnhof,Session["ddlZielbahnhof"]);

.....

}

In UIProcessComponents.MainCl there is a function:

public static void DataBindingsForSAPControls(ref SAP.Web.UI.Controls.DropDownByKey ddbk , Object dataSource)

{

ddbk.DataSource=(DataView)dataSource;

ddbk.DataBind();

}

Thats all, there is no code firing the .select event automatically

Regards

Erhan

Former Member
0 Kudos

Hi,

I am awfully sorry, I didnt get an anwser to my problem.

Is anyone out there who can help?

Erhan

Former Member
0 Kudos

Hi Erhan,

Can u please check which version of the PDK u r using?

In case it is ver. 1 patch 2 or lower, upgrading to patch 3 should solve this problem.

Regards, Reshef

Former Member
0 Kudos

Hi Reshef,

I do already use patch 3

Former Member
0 Kudos

Hi Erhan,

I rechecked this issue and indeed it is a bug.

A workaround would be to add protection code in the DropDownByKey.Select handler:

private void DropDownByKey1_Select(object sender, SAP.Web.UI.Controls.AbstractDropDownByKey.SelectEventArgs e)

{

if(Page.Request.Form["__EVENTTARGET"] == ((Control)sender).UniqueID)

{

.

.

.

}

}

Regards, Reshef

Former Member
0 Kudos

Hi Reshef,

thank you for rechecking. How should we report this Bug to SAP ?

Former Member
0 Kudos

Hi Erhan,

I already reported this bug inside SAP.

Regards, Reshef

Answers (0)