Using Multiple Webcombos in ListView and their LinkSettings

5 replies. Last post: January 8, 2013 1:09 AM by fahim anwar
Tags :
  • New Discussion
  • New Question
  • New Product Feedback
fahim anwarMember

Hi,

Scnario:

I have a listview and i am using 3 web combos combo1 , combo2 and combo3

combo2 is having link settings with combo 1

combo3 is having link settings with combo 2

combo4 is having link settings with combo 2

When i am bounding data with these combos in ItemDataBound of Listview item,

 

 Problem:

Combos are loading properly and filters are running properly for first row. but for second row combo2,combo3 and combo4 are taking values of first row parent combos which is why its behaing differently than it should behave

 

Please provide your help for the same  here is inner sample code for the bindings i am doing for in ItemDatabound Event of ListViewItem

 

 

WebCombo combo1 = new WebCombo();

                WebCombo combo2 = new WebCombo();

                WebCombo combo3 = new WebCombo();

                WebCombo combo4 = new WebCombo();

 

 

                rdPersonType = (RadioButtonList)e.Item.FindControl("uiRVRevieweTypeRD");

                combo1 = (WebCombo)e.Item.FindControl("uiRVResponsibilityDDL");

                combo2 = (WebCombo)e.Item.FindControl("uiRVDisciplineDDL");

                combo3 = (WebCombo)e.Item.FindControl("uiRVPrimaryPersonDDL");

                combo4 = (WebCombo)e.Item.FindControl("uiRVSecondaryPersonDDL");

 

                combo1.DataSource = combo1datasource;

                combo1.DataTextField = "tr_desc";

                combo1.DataValueField = "tr_id";

                combo1.DataBind();

 

                combo2.DataSource = combo2datasource

                combo2.DataTextField = "disc_desc";

                combo2.DataValueField = "disc_id";

                combo2.LinkSettings.Enabled = true;

                combo2.LinkSettings.ParentWebComboID = combo1.ID.ToString();

                combo2.LinkSettings.FilterDataMember = "tr_id";

                combo2.LinkSettings.ParentEmptyAction = EmptyAction.ShowEmptyResult;

                combo2.DataBind();

 

                combo3.DataSource = combo3datasource;

                combo3.DataTextField = "tech_person_primary_userid";

                combo3.DataValueField = "tech_person_primary_userid";

               

                combo3.LinkSettings.Enabled = true;

                combo3.LinkSettings.ParentWebComboID = combo2.ID.ToString();

                

                combo3.LinkSettings.FilterDataMember = "disc_id";

                combo3.LinkSettings.ParentEmptyAction = EmptyAction.ShowEmptyResult;

                combo3.DataBind();

 

                combo4.DataSource = combo4datasource;

                combo4.DataTextField = "tech_person_secondary_userid";

                combo4.DataValueField = "tech_person_secondary_userid";

                combo4.LinkSettings.Enabled = true;

                combo4.LinkSettings.ParentWebComboID = combo2.ID.ToString();

                combo4.LinkSettings.FilterDataMember = "disc_id";

                combo4.LinkSettings.ParentEmptyAction = EmptyAction.ShowEmptyResult;

                combo4.DataBind();

All times are GMT -5. The time now is 3:31 AM.
Previous Next