473,401 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Bind a GridView to a Tree View node selection

JN
Hi All,

I have a tree view which has parent nodes of each letter of the alphabet. The root node will be the customers name that relate to the parent node letter.

I also have a gridview which is binded to the treeview control to display all customer records of the selected alphabetical letter.

When I click expand the tree view and click on the customer's name, I get this error.:

Please bear in mind that I have only been using ASP.net for a week.

Thanks for your help.
JN

Input string was not in a correct format.
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.FormatException: Input string was not in a correct format.

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:

[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2753507
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +102
System.String.System.IConvertible.ToInt32(IFormatP rovider provider) +43
System.Convert.ChangeType(Object value, TypeCode typeCode, IFormatProvider provider) +293
System.Web.UI.WebControls.Parameter.GetValue(Objec t value, String defaultValue, TypeCode type, Boolean convertEmptyStringToNull, Boolean ignoreNullableTypeChanges) +257
System.Web.UI.WebControls.Parameter.get_ParameterV alue() +92
System.Web.UI.WebControls.ParameterCollection.GetV alues(HttpContext context, Control control) +282
System.Web.UI.WebControls.SqlDataSourceView.Initia lizeParameters(DbCommand command, ParameterCollection parameters, IDictionary exclusionList) +344
System.Web.UI.WebControls.SqlDataSourceView.Execut eSelect(DataSourceSelectArguments arguments) +1250
System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments, DataSourceViewSelectCallback callback) +84
System.Web.UI.WebControls.DataBoundControl.Perform Select() +154
System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +99
System.Web.UI.WebControls.GridView.DataBind() +24
System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +92
System.Web.UI.WebControls.BaseDataBoundControl.OnP reRender(EventArgs e) +33
System.Web.UI.WebControls.GridView.OnPreRender(Eve ntArgs e) +74
System.Web.UI.Control.PreRenderRecursiveInternal() +148
System.Web.UI.Control.PreRenderRecursiveInternal() +233
System.Web.UI.Control.PreRenderRecursiveInternal() +233
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4435



Jan 17 '06 #1
1 3049
JN maybe try posting some snippet code.
Patrick

"JN" <jn*****@rogers.com> wrote in message news:u0**************@TK2MSFTNGP12.phx.gbl...
Hi All,

I have a tree view which has parent nodes of each letter of the alphabet. The root node will be the customers name that relate to the parent node letter.

I also have a gridview which is binded to the treeview control to display all customer records of the selected alphabetical letter.

When I click expand the tree view and click on the customer's name, I get this error.:

Please bear in mind that I have only been using ASP.net for a week.

Thanks for your help.
JN

Input string was not in a correct format.
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.FormatException: Input string was not in a correct format.

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:

[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2753507
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +102
System.String.System.IConvertible.ToInt32(IFormatP rovider provider) +43
System.Convert.ChangeType(Object value, TypeCode typeCode, IFormatProvider provider) +293
System.Web.UI.WebControls.Parameter.GetValue(Objec t value, String defaultValue, TypeCode type, Boolean convertEmptyStringToNull, Boolean ignoreNullableTypeChanges) +257
System.Web.UI.WebControls.Parameter.get_ParameterV alue() +92
System.Web.UI.WebControls.ParameterCollection.GetV alues(HttpContext context, Control control) +282
System.Web.UI.WebControls.SqlDataSourceView.Initia lizeParameters(DbCommand command, ParameterCollection parameters, IDictionary exclusionList) +344
System.Web.UI.WebControls.SqlDataSourceView.Execut eSelect(DataSourceSelectArguments arguments) +1250
System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments, DataSourceViewSelectCallback callback) +84
System.Web.UI.WebControls.DataBoundControl.Perform Select() +154
System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +99
System.Web.UI.WebControls.GridView.DataBind() +24
System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +92
System.Web.UI.WebControls.BaseDataBoundControl.OnP reRender(EventArgs e) +33
System.Web.UI.WebControls.GridView.OnPreRender(Eve ntArgs e) +74
System.Web.UI.Control.PreRenderRecursiveInternal() +148
System.Web.UI.Control.PreRenderRecursiveInternal() +233
System.Web.UI.Control.PreRenderRecursiveInternal() +233
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4435



Jan 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Steve Johnson | last post by:
Been banging my head on this for two days now. Hope someone can help! My test program below is in the form of a single JSP, with a Node class build in. (All the coded needed to run is below.) ...
0
by: Tree menu using XML | last post by:
I have one XML file that has nodes and sub node and each and every node has the attribute call visible if its value is true then diplay this node else don't display thid node, but this condition i...
3
by: Saradhi | last post by:
Hi All, Here I am facing a performance problem with the TreeView Node renaming. I am displaying a hierarchy Data in a treeview in my Windows C# Application. My tree view represents an...
0
by: Shafia | last post by:
Hi, I have a TreeView and a GridView in my UI. On a "CheckChanged" event of tree, I do the following GridView1.Rows.Cells.Text = e.Node.Text; or rather ...
2
by: Jerry Langley | last post by:
Once a treeview node is selected how can I programmatically unselect it so that it might be selected again following the first selection if the user desires? The after selection event only fires...
2
by: dave.dolan | last post by:
I have generated a nice tree view that displays some otherwise cyptic XML in an easy to follow manner. The trouble is that the TreeView assumes that I'm wanting a link in each of the nodes, and I...
3
by: Adam Honek | last post by:
Hi, I have the code below that I'm using in a tree view to detect what node the user has clicked on. It compiles but on runtime I get a type cast error. I've used this method for both the...
7
by: Adam Honek | last post by:
Hi all, How do we select a tree view's node outside of a tree view event? Looking through the lists there's no select function, the nearest I can find is GetNodeAt but this seems to want the...
1
by: renuami | last post by:
Hello Please advise .... I do not know in which section i should be posting Winforms Questions. There is not Option. So i am posting it here... apologize for any inconvinence..... This is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.