hai all.
i have loaded a dropdownlist box using code.
[HTML] cboUserGroup.Da taSource = loadGroupCombos ("").Tables[0];
cboUserGroup.Da taTextField = "name";
cboUserGroup.Da taValueField = "id";
cboUserGroup.Da taBind();[/HTML]
now the dropdownlist box have the values such as
name---------------id
--------------------------
A ------------------- 1
B-------------------- 2
C-------------------- 3
D-------------------- 4
for eg selected text is 'A'
now i want to change the selected text as 'B'
i have tried a many ways such as
[HTML]cboUserGroup.It ems.FindByValue ("B").Select ed = true;
cboUserGroup.Se lectedItem.Sele cted = "B";
cboUserGroup.Da taValueField.In dexOf("B");
cboUserGroup.It ems.FindByValue ("B").Select ed = true;
cboUserGroup.Da taBind();[/HTML]
but it is not working,
but
[HTML]cboUserGroup.Se lectedIndex = 1;[/HTML] is working.
and another major issue is when i used this the above method, selected index is
changing but cboUserGroup_Se lectedIndexChan ged is not firing.
Note: i used autopostback=tr ue for dropdown list.
plz help me to solve this.
thanx in advance.
i have loaded a dropdownlist box using code.
[HTML] cboUserGroup.Da taSource = loadGroupCombos ("").Tables[0];
cboUserGroup.Da taTextField = "name";
cboUserGroup.Da taValueField = "id";
cboUserGroup.Da taBind();[/HTML]
now the dropdownlist box have the values such as
name---------------id
--------------------------
A ------------------- 1
B-------------------- 2
C-------------------- 3
D-------------------- 4
for eg selected text is 'A'
now i want to change the selected text as 'B'
i have tried a many ways such as
[HTML]cboUserGroup.It ems.FindByValue ("B").Select ed = true;
cboUserGroup.Se lectedItem.Sele cted = "B";
cboUserGroup.Da taValueField.In dexOf("B");
cboUserGroup.It ems.FindByValue ("B").Select ed = true;
cboUserGroup.Da taBind();[/HTML]
but it is not working,
but
[HTML]cboUserGroup.Se lectedIndex = 1;[/HTML] is working.
and another major issue is when i used this the above method, selected index is
changing but cboUserGroup_Se lectedIndexChan ged is not firing.
Note: i used autopostback=tr ue for dropdown list.
plz help me to solve this.
thanx in advance.
Comment