Problem with Metabuilders combo

C

Craig G

i've emailed metabuilders themselves but was just wondering has anybody else ever had this problem?

I am populating the combobox using a SQL2000 table. The combobox populates successfully with the required values but for some reason the SelectedIndexChanged will not fire, and it always has the SelectedIndex as -1 no matter what value I select within the combobox! Autopostback is also set to True
The data going into the combo is as follows

Value = is of datatype int, with values ranging from '-2101632658' to '2147433125'

Text = is of datatype varchar(50), with just text strings


Code used to populate the combobox

Dim itmBlank As ListItem
itmBlank = New ListItem(" ", "0")
With ddlTutor
.Items.Clear()
.DataSource = dsResults.Tables(0)
.DataValueField = "TutorCode"
.DataTextField = "TutorName"
.DataBind()
.Items.Insert(0, itmBlank)
End With



I was wondering is it there any limits to the value field that may be causing the problem, or any other suggestions you may have?

If I use a standard WebForms Combobox it will perform normally as expected

Cheers,
Craig
 
K

Karl Seguin

Craig:
How is the SelectedindexChanged hooked up?

I tried Handler.ddlTutor.SelectedIndexChanged, onSelectedIndexChanged in the aspx and Addhandler all three worked.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/index.aspx - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to come!)


i've emailed metabuilders themselves but was just wondering has anybody else ever had this problem?

I am populating the combobox using a SQL2000 table. The combobox populates successfully with the required values but for some reason the SelectedIndexChanged will not fire, and it always has the SelectedIndex as -1 no matter what value I select within the combobox! Autopostback is also set to True
The data going into the combo is as follows

Value = is of datatype int, with values ranging from '-2101632658' to '2147433125'

Text = is of datatype varchar(50), with just text strings


Code used to populate the combobox

Dim itmBlank As ListItem
itmBlank = New ListItem(" ", "0")
With ddlTutor
.Items.Clear()
.DataSource = dsResults.Tables(0)
.DataValueField = "TutorCode"
.DataTextField = "TutorName"
.DataBind()
.Items.Insert(0, itmBlank)
End With



I was wondering is it there any limits to the value field that may be causing the problem, or any other suggestions you may have?

If I use a standard WebForms Combobox it will perform normally as expected

Cheers,
Craig
 
C

Craig G

ive been using the combo before in other projects - all beit using Oracle and never had any problems with the selectedindex change event. it never fires the event. if i fire the textchanged event after i select a row in the combo then check the selectedindex it always says -1 even though ive just selected one

its got me well 'n' truely stumped!

its just hooked up as follows in the aspx.vb
Private Sub ddlTutor_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlTutor.SelectedIndexChanged

Try

subFillCourseCombo()

Catch ex As Exception

ASPNET_MsgBox(Me.Page, "Unable to process the tutor selection: " & ex.Message)

End Try





Craig:
How is the SelectedindexChanged hooked up?

I tried Handler.ddlTutor.SelectedIndexChanged, onSelectedIndexChanged in the aspx and Addhandler all three worked.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/index.aspx - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to come!)


i've emailed metabuilders themselves but was just wondering has anybody else ever had this problem?

I am populating the combobox using a SQL2000 table. The combobox populates successfully with the required values but for some reason the SelectedIndexChanged will not fire, and it always has the SelectedIndex as -1 no matter what value I select within the combobox! Autopostback is also set to True
The data going into the combo is as follows

Value = is of datatype int, with values ranging from '-2101632658' to '2147433125'

Text = is of datatype varchar(50), with just text strings


Code used to populate the combobox

Dim itmBlank As ListItem
itmBlank = New ListItem(" ", "0")
With ddlTutor
.Items.Clear()
.DataSource = dsResults.Tables(0)
.DataValueField = "TutorCode"
.DataTextField = "TutorName"
.DataBind()
.Items.Insert(0, itmBlank)
End With



I was wondering is it there any limits to the value field that may be causing the problem, or any other suggestions you may have?

If I use a standard WebForms Combobox it will perform normally as expected

Cheers,
Craig
 
C

Craig G

turns out the problem is having SET CONCAT_NULL_YIELDS_NULL OFF in the stored procedure. if i remove this it behaves normally

annoying or what!!
Craig:
How is the SelectedindexChanged hooked up?

I tried Handler.ddlTutor.SelectedIndexChanged, onSelectedIndexChanged in the aspx and Addhandler all three worked.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/index.aspx - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to come!)


i've emailed metabuilders themselves but was just wondering has anybody else ever had this problem?

I am populating the combobox using a SQL2000 table. The combobox populates successfully with the required values but for some reason the SelectedIndexChanged will not fire, and it always has the SelectedIndex as -1 no matter what value I select within the combobox! Autopostback is also set to True
The data going into the combo is as follows

Value = is of datatype int, with values ranging from '-2101632658' to '2147433125'

Text = is of datatype varchar(50), with just text strings


Code used to populate the combobox

Dim itmBlank As ListItem
itmBlank = New ListItem(" ", "0")
With ddlTutor
.Items.Clear()
.DataSource = dsResults.Tables(0)
.DataValueField = "TutorCode"
.DataTextField = "TutorName"
.DataBind()
.Items.Insert(0, itmBlank)
End With



I was wondering is it there any limits to the value field that may be causing the problem, or any other suggestions you may have?

If I use a standard WebForms Combobox it will perform normally as expected

Cheers,
Craig
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top