I need help

  • Thread starter Thread starter fbouabcha
  • Start date Start date
F

fbouabcha

Hi everyone
I have the problem with my event function "selecteIndexChanged" :
when I selected an item in the combobox, this function(selecteIndexChanged)
is executed several times, then it take long time.

Please answer me fastly

Thanks so much

Nass
 
Hard to tell without the code written in teh event handler.

You might be re-selecting some combo item Again in this event Handler.

Remeber, If you select some item in the coombobox programatically from its
SelectedIndexChanged handler, this handler will get called again causing
un-intended recursion.

HTH
rawCoder
 
In addition to rawcoder.

The selectedindexchange fires when there is a change in a datasource. that
means that it fires more times at load time of that datasource.

Mostly is that protected with a "switchLoaded" which is set to true when
that is done, and evaluated in the indexedchange event.

I hope this helps?

Cor
 
Hi Sir
I have the problem with my event function "SelecteIndexChanged" when i selected combobox item in this item database fetch then fill the no.of textbox in match submited values.

i m code also write but ,one value match to every combo selected item

Private Sub cmbCtime_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbCtime.SelectedIndexChanged
Dim qry As String
Dim con As New connection
Dim ds As DataSet

qry = "Select * from COMPLOTT where Time_id='"& cmbTime.SelectedValue& "'"
ds = con.selectQuery(qry)
If ds.Tables(0).Rows.Count> 0 Then
txtc1.Text = ds.Tables(0).Rows(0).Item("CL_1")
txtc2.Text = ds.Tables(0).Rows(0).Item("CL_2")
txtc3.Text = ds.Tables(0).Rows(0).Item("CL_3")
txtc4.Text = ds.Tables(0).Rows(0).Item("CL_4")
txtc5.Text = ds.Tables(0).Rows(0).Item("CL_5")
txtc6.Text = ds.Tables(0).Rows(0).Item("CL_6")
txtc7.Text = ds.Tables(0).Rows(0).Item("CL_7")
txtc8.Text = ds.Tables(0).Rows(0).Item("CL_8")
txtc9.Text = ds.Tables(0).Rows(0).Item("CL_9")
txtc10.Text = ds.Tables(0).Rows(0).Item("CL_10")
End If
End Sub
pls anser me fastly

Thanks so mach


From http://www.google.co.in/url?sa=t&so...7v38Cw&usg=AFQjCNFGt8Zck345guPRjC-bRWzHMgbyNw

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/

1. You need to tell us what is not behaving as you expect. Your text is
very hard to understand. In particular: "i m code also write but ,one
value match to every combo selected item".
2. Your code seems to be missing a creation of a connection object.
3. Your routine looks like it handles cmbCtime (a combobox) selected
index changed event. You reference cmbTime in our SQL statement. Those
are two different variables.
4. Put Option Strict On at the top of your code.
 
Back
Top