-
Aug 25th, 2014, 06:07 AM
#1
Thread Starter
Junior Member
datasource of dropdownliist in a DataList
hi,
i want to "populate" a dropdownlist in vb code inside a Datalist_ItemDataBound but i get this error: adding a value to a 'datetime' column caused overflow vb.net
maybe a have done something wrong. i need some help. thanx
here is the code inside Datalist_ItemDataBound
Dim loMarcaDL As String = hfMarca.Value 'CType(e.Item.FindControl("hfMarcaDL"), HiddenField).Value
Dim loAnulDL As Integer = hfAnul.Value 'CType(e.Item.FindControl("hfAnulDL"), HiddenField).Value
Dim loLunaDl As Integer = hfLuna.Value 'CType(e.Item.FindControl("hfLunaDL"), HiddenField).Value
Dim loActivity As String = CType(e.Item.FindControl("hfActivityID"), HiddenField).Value
'Find the DropDownList in the Row
Dim ddlDescriptionEGD As DropDownList = CType(e.Item.FindControl("ddlDescriptionEGD"), DropDownList)
Dim ta As New DataSet_SLA_ImportTableAdapters.sp_SLA_DictionarForLunar_GetTableAdapter
Dim tb As New DataSet_SLA_Import.sp_SLA_DictionarForLunar_GetDataTable
ddlDescriptionEGD.DataSource = ta.ta_SLA_DictionarForLunar_Get(loMarcaDL, loAnulDL, loLunaDl, loActivity) --> HERE I GET THE ERROR
ddlDescriptionEGD.DataTextField = "Descriere"
ddlDescriptionEGD.DataValueField = "Id"
ddlDescriptionEGD.DataBind()
'Add Default Item in the DropDownList
ddlDescriptionEGD.Items.Insert(0, New ListItem("Please select"))
-
Aug 25th, 2014, 08:46 PM
#2
Re: datasource of dropdownliist in a DataList
What's the corresponding query in this method?
Code:
ta.ta_SLA_DictionarForLunar_Get(loMarcaDL, loAnulDL, loLunaDl, loActivity)
-
Aug 26th, 2014, 10:19 AM
#3
Re: datasource of dropdownliist in a DataList
Moderator Action: Moved to ASP.Net forum.
-
Aug 27th, 2014, 12:24 AM
#4
Thread Starter
Junior Member
Re: datasource of dropdownliist in a DataList
hi, thank you.
i solved the error i used another method.
-
Aug 27th, 2014, 04:00 AM
#5
Re: datasource of dropdownliist in a DataList
Great! Don't forget to mark this thread as 'Resolved'..
KGC
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|