StrataFrame Forum

Trying to requery a child listview

http://forum.strataframe.net/Topic30516.aspx

By Marcia G Akins - 10/31/2011

Hi All.

Here is my code:

private void boProject_Navigated(MicroFour.StrataFrame.Business.NavigatedEventArgs e)

{

object[] oParms = new object[1];

oParms[0] =
Convert.ToInt32(boProject.project_id.ToString());

if (!boProject.IsEmpty)

  lv_Savings_Details.Requery(oParms);

}

This is the error I am getting:

FormatException
  Input string was not in a correct format.

Source     : mscorlib

Stack Trace:
   at System.Text.StringBuilder.FormatError()
   at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
   at System.String.Format(IFormatProvider provider, String format, Object[] args)
   at System.String.Format(String format, Object[] args)
   at MicroFour.StrataFrame.UI.Windows.Forms.ListView.CreateListViewItem(BusinessLayer BusinessObject)
   at MicroFour.StrataFrame.UI.Windows.Forms.ListView.PopulateListView(Object[] Parameters)
   at MicroFour.StrataFrame.UI.Windows.Forms.ListView.Requery(Object[] Parameters)
   at StlCI_new_winforms.Projects.boProject_Navigated(NavigatedEventArgs e) in C:\StlCI_new_winforms\StlCI_new_winforms\Projects.cs:line 24
   at MicroFour.StrataFrame.Business.BusinessLayer.NavigatedEventHandler.Invoke(NavigatedEventArgs e)
   at MicroFour.StrataFrame.Business.BusinessLayer.raise_Navigated(NavigatedEventArgs e)
   at MicroFour.StrataFrame.Business.BusinessLayer.OnNavigated(NavigatedEventArgs e)
   at MicroFour.StrataFrame.Business.BusinessLayer.ForceNavigatedAndBoundRefresh(Boolean dataTableRefilled)
   at MicroFour.StrataFrame.Business.BusinessLayer.OnCurrentDataTableRefilled()
   at MicroFour.StrataFrame.Business.BusinessLayer.ChangeCurrentDataTable(DataTable NewTable, Boolean AcceptChanges, Boolean IsSharedTable)
   at MicroFour.StrataFrame.Business.BusinessLayer.ChangeCurrentDataTable(DataTable NewTable, Boolean AcceptChanges)
   at MicroFour.StrataFrame.Business.BusinessLayer.ChangeCurrentDataTable(DataTable NewTable)
   at MicroFour.StrataFrame.Business.BusinessLayer.OverwriteCurrentDataTable(DataTable TableToUse)
   at MicroFour.StrataFrame.Business.BusinessLayer.CopyDataFrom(BusinessLayerBase BusinessObject, BusinessCloneDataType CopyType)
   at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogwindow.CopyDataAndCloseForm()
   at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogwindow.cmdOK_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
   at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


So what stupid thing am I doing wrong?

TIA.

-- Marcia

By Marcia G Akins - 10/31/2011

Well, here I am talking to myself again.

Problem solved - it was a typo in the listview columns - I had type a [ instead of a { and this was the error that I got.

My code to requery the listview was fine Smile