Click here to Skip to main content
15,916,462 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionvb.net Pin
lopashree18-Feb-07 18:38
lopashree18-Feb-07 18:38 
AnswerRe: vb.net Pin
Christian Graus18-Feb-07 20:15
protectorChristian Graus18-Feb-07 20:15 
QuestionAccess C++ DLL from Visual BAsic .Net Pin
Lee Bottone18-Feb-07 13:45
Lee Bottone18-Feb-07 13:45 
AnswerRe: Access C++ DLL from Visual BAsic .Net Pin
Christian Graus18-Feb-07 14:09
protectorChristian Graus18-Feb-07 14:09 
QuestionRandom numbers from ascii Pin
harveyhanson18-Feb-07 11:45
harveyhanson18-Feb-07 11:45 
AnswerRe: Random numbers from ascii Pin
Christian Graus18-Feb-07 12:14
protectorChristian Graus18-Feb-07 12:14 
AnswerRe: Random numbers from ascii Pin
Guffa18-Feb-07 12:20
Guffa18-Feb-07 12:20 
GeneralRe: Random numbers from ascii Pin
Christian Graus18-Feb-07 12:28
protectorChristian Graus18-Feb-07 12:28 
GeneralRe: Random numbers from ascii Pin
harveyhanson18-Feb-07 13:53
harveyhanson18-Feb-07 13:53 
GeneralRe: Random numbers from ascii Pin
Christian Graus18-Feb-07 14:18
protectorChristian Graus18-Feb-07 14:18 
QuestionProgram to test my knowledge? Pin
Wolf9218-Feb-07 6:06
Wolf9218-Feb-07 6:06 
AnswerRe: Program to test my knowledge? Pin
Christian Graus18-Feb-07 9:27
protectorChristian Graus18-Feb-07 9:27 
AnswerRe: Program to test my knowledge? Pin
Thomas Stockwell19-Feb-07 6:58
professionalThomas Stockwell19-Feb-07 6:58 
Questionhow to create reports Pin
kendo1718-Feb-07 2:19
kendo1718-Feb-07 2:19 
AnswerRe: how to create reports Pin
Christian Graus18-Feb-07 11:42
protectorChristian Graus18-Feb-07 11:42 
Questionapplication.run Pin
amaneet18-Feb-07 1:00
amaneet18-Feb-07 1:00 
AnswerRe: application.run Pin
Colin Angus Mackay18-Feb-07 4:36
Colin Angus Mackay18-Feb-07 4:36 
Questionshared keyword in vb.net Pin
amaneet18-Feb-07 0:48
amaneet18-Feb-07 0:48 
AnswerRe: shared keyword in vb.net Pin
Colin Angus Mackay18-Feb-07 4:34
Colin Angus Mackay18-Feb-07 4:34 
GeneralRe: shared keyword in vb.net Pin
amaneet19-Feb-07 3:36
amaneet19-Feb-07 3:36 
GeneralRe: shared keyword in vb.net Pin
Hossein Narimani Rad20-Feb-07 19:13
Hossein Narimani Rad20-Feb-07 19:13 
Questiontransfer attribute from 1 datagrid to another Pin
kendo1718-Feb-07 0:17
kendo1718-Feb-07 0:17 
AnswerRe: transfer attribute from 1 datagrid to another Pin
Johan Hakkesteegt23-Feb-07 0:40
Johan Hakkesteegt23-Feb-07 0:40 
QuestionSelectedIndexChange of DDL inside Datagrid.. HELP!! Pin
Huvandhuma17-Feb-07 19:50
Huvandhuma17-Feb-07 19:50 
Hi..

I am having a huge problem with getting the selected index changed property of a drop down list when inside a datagrid..

I have two drop down lists inside the datagrid, toSectDDL and tosubSectDDL. What i want is when the user selects an item from the toSectDDL, the tosubSectDDL should be populated with the related subsections for that particular section only..

I have written the VB code as
Protected Sub toSectDDL_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
Dim row As DataGridItem
For Each row In SectionGrid.Items
Dim toSectDDL As DropDownList = CType(SectionGrid.FindControl("toSectDDL"), DropDownList)
Dim toSubSectDDL As DropDownList = CType(SectionGrid.FindControl("toSubSectDDL"), DropDownList)
If toSectDDL.SelectedValue = 0 Then
toSubSectDDL.Items.Insert(0, New ListItem("None", "0"))
Else

toSubSectDDL.DataSource = Office.GetSubSectionsForSection(toSectDDL.SelectedValue)
toSubSectDDL.DataTextField = "subsection"
toSubSectDDL.DataValueField = "subSecID"
toSubSectDDL.DataBind()
toSubSectDDL.Items.Insert(0, New ListItem("Select", "0"))
End If
Next
End Sub

and set the ASP code as
<asp:templatecolumn headertext="toSection">
<itemtemplate>
<asp:dropdownlist id="toSectDDL" runat="server" cssclass="standardDDL" width="402px" onselectedindexchanged="toSectDDL_SelectedIndexChanged" autopostback="True">


Now i am getting a server error saying
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
veyo.OfficeNameChange.toSectDDL_SelectedIndexChanged(Object sender, EventArgs e) in \\aion\intranetroot$\veyo\updateVEYO\OfficeNameChange.aspx.vb:430
System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e) +108
System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent() +26
System.Web.UI.Page.RaiseChangedEvents() +115
System.Web.UI.Page.ProcessRequestMain() +1099

Can anyone plz help!!!!!!
AnswerRe: SelectedIndexChange of DDL inside Datagrid.. HELP!! Pin
Marcus J. Smith19-Feb-07 3:39
professionalMarcus J. Smith19-Feb-07 3:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.