Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Bind a GridView to a Tree View node selection (http://www.velocityreviews.com/forums/t117516-bind-a-gridview-to-a-tree-view-node-selection.html)

JN 01-17-2006 03:42 AM

Bind a GridView to a Tree View node selection
 
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






Patrick.O.Ige 01-17-2006 03:45 AM

Re: Bind a GridView to a Tree View node selection
 
JN maybe try posting some snippet code.
Patrick

"JN" <jnsimex@rogers.com> wrote in message news:u0os$fxGGHA.3936@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







All times are GMT. The time now is 01:33 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.