Hi,
i am using WebDataGrid.
i have a form(child.aspx) which is inherit from a master form.
in my child form has a grid.
i have a selected row in the grid. i have a edit button in my master form.
and edit button event i am handling at my child form
when i click on edit button to edit the selected row. then my
grid.behaviour.selection.SelectedRows.count is showing me
the 1 row is selected, but when i am trying to access
grid.behaviour.selection.SelectedRows[0]
then it gives me input string was not in correct format error, but when i
expand SelectedRows then GridIDpairCollection has some value .
my grid EnableViewState and EnableDataVieState is true, but still same problem.
i have a this question from long time please reply soon.
why is this coming, how to resolve this problem?
I have the exact same problem. Any solution to this. It occurs on my webdatagrid, activation is on and the grid is in batch mode. I insert a row and then try to edit it and like this user clicking on any cell causes the problem.
After so many time R&D
i have found that if we set the <ig:Activation enable="true">
and clicked on any column( to activate cell) then do any operation
which is responsible to post back the page below problem come.
Note : keep it in mind, if page is being post back first time then only this problem comes.
Can you tell me the reason, why does this problem come?
[FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +9594283 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119 System.String.System.IConvertible.ToInt32(IFormatProvider provider) +46 System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) +385 System.Convert.ChangeType(Object value, Type conversionType) +32 Infragistics.Web.UI.Framework.Data.DataBot.ChangeType(Object
i am binding the grid on postback also, but when i do edit operation to edit the row
then page postback and error comes
FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +9594283 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119 System.String.System.IConvertible.ToInt32(IFormatProvider provider) +46 System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) +385 System.Convert.ChangeType(Object value, Type conversionType) +32 Infragistics.Web.UI.Framework.Data.DataBot.ChangeType(Object value, Type toType) +664 Infragistics.Web.UI.Framework.Data.DataBot.Compare(Object value1, Object value2) +445 Infragistics.Web.UI.GridControls.GridRecordCollection.FromKey(Object[] dataKey) +227 Infragistics.Web.UI.GridControls.GridRecordCollection.FromIDPair(IDPair idPair) +77 Infragistics.Web.UI.GridControls.GridRecordCollection.GetCellFromIDPair(ItemIDPair idPair) +78 Infragistics.Web.UI.GridControls.Activation.get_ActiveCell() +82 Infragistics.Web.UI.GridControls.Activation.LoadPositionalProperty(Int32 index, Object value) +170 Infragistics.Web.UI.Framework.ObjectBase.LoadClientPropsTransactionList(Dictionary`2 list) +368 Infragistics.Web.UI.GridControls.Activation.LoadClientPropsTransactionList(Dictionary`2 list) +185 Infragistics.Web.UI.Framework.ObjectBase.LoadTransactionList(Boolean deferLoadPostDataProcessing) +88 Infragistics.Web.UI.Framework.ObjectBase.Infragistics.Web.UI.IClientState.LoadTransationList(Boolean deferLoadPostDataProcessing) +40 Infragistics.Web.UI.GridControls.GridBot.LoadClientObjectsTransactionList() +91 Infragistics.Web.UI.Framework.RunBot.HandleRaisePostDataChangedEvent() +96 Infragistics.Web.UI.GridControls.GridBot.HandleRaisePostDataChangedEvent() +73 Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.RaisePostDataChangedEvent() +33 System.Web.UI.Page.RaiseChangedEvents() +134 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesee this post alsohttp://forums.infragistics.com/forums/t/49450.aspx
If you are binding in the code-behind you should assign the DataSource on PostBack (when paging, sorting, etc.)
My grid has Checkbox template column,
and paging is enable, if i do not bind it on page post back and
clicked on second page then it give the fallowing javascript Exeception
Actully in my grid only template column is fixed and every thing(columns) creating dynamically.
Object reference not set to an instance of an objectat Infragistic.web.UI.GridControls.WebDataGrid.InstatiateTempaltes()at Infragistic.web.UI.GridControls.WebDataGrid.BaseGrid.EnsureTemplates()at Infragistic.web.UI.Framework.Data.FlatDataBoundControl.CreateChldControls()at Infragistic.web.UI.GridControls.EnsureChildCOntrols()at System.web.UI.Controls.PreRenderRecursiveInternal()