Unable to load Task Status grid after adding an additional column into the Grid View. "An Error Occurred While Refreshing" pops up instead.

Article:TECH141582  |  Created: 2010-10-11  |  Updated: 2012-03-26  |  Article URL http://www.symantec.com/docs/TECH141582
Article Type
Technical Solution


Issue



The Task Status grid fails to load if an additional column has been added into the Grid View.  As soon as you highlight a task, you receive a pop-up message stating that "An Error Occurred While Refreshing."  After you clear this error, the Task Status simply says "loading" and never completes.

This affects any task that has a "Run Instance" in it - that is, any task you have actually used.  Tasks that have not been used are not affected.

 

 


Error



In the logs, you will find a corresponding error:

<event date="Oct 07 12:29:52 +00:00" severity="1" hostName="NotificationServer" source="Altiris.TaskManagement.ClientTask.*" module="w3wp.exe" process="w3wp" pid="3672" thread="25" tickCount="530870703"><![CDATA[BaseXmlHttpCallback Exception: System.Exception: Error formatting row - this usually means the DataTable doesn't have a column specified by the grid column definitions ---> System.FormatException: Input string was not in a correct format.
   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.IO.TextWriter.Write(String format, Object[] arg)
   at System.Web.UI.HtmlTextWriter.Write(String format, Object[] arg)
   at Altiris.TaskManagement.UI.Controls.Grid.AltirisGridCallbackHandler.RenderRow(AltirisGridControlOptions options, DataRow nextRow, Int32 row, Int32 groupIndex, Boolean altRow, List`1 columnTemplates, HtmlTextWriter wr)
   --- End of inner exception stack trace ---
   at Altiris.TaskManagement.UI.Controls.Grid.AltirisGridCallbackHandler.RenderRow(AltirisGridControlOptions options, DataRow nextRow, Int32 row, Int32 groupIndex, Boolean altRow, List`1 columnTemplates, HtmlTextWriter wr)
   at Altiris.TaskManagement.UI.Controls.Grid.AltirisGridCallbackHandler.RenderGroupContents(AltirisGridControlOptions options, Boolean expanded, Int32 nGroup, List`1 rows, List`1 columnTemplates, HtmlTextWriter wr)
   at Altiris.TaskManagement.UI.Controls.Grid.AltirisGridCallbackHandler.RenderGroups(AltirisGridControlOptions options, Boolean expandFirst, Boolean sortKeys, Boolean hideHeaders, Dictionary`2 groups, List`1 columnTemplates, HtmlTextWriter wr)
   at Altiris.TaskManagement.UI.Controls.Grid.AltirisGridCallbackHandler.RenderRowsNormal(AltirisGridControlOptions options, List`1 rows, List`1 templates, HtmlTextWriter wr)
   at Altiris.TaskManagement.UI.Controls.Grid.AltirisGridCallbackHandler.RenderGridContents(AltirisGridControlOptions options, DataTable data, List`1 columnTemplates, HtmlTextWriter wr)
   at Altiris.TaskManagement.UI.Controls.Grid.AltirisGridCallbackHandler.RenderHtml(AltirisGridControlOptions options, DataTable data, List`1 templates, HtmlTextWriter wr)
   at Altiris.TaskManagement.UI.Controls.Grid.AltirisGridCallbackHandler.WriteHtmlResponse(HtmlTextWriter wr)
   at Altiris.TaskManagement.Common.XmlHttp.BaseHttpXmlHttpCallback.WriteResponseRaw(XmlTextWriter xwr)
   at Altiris.TaskManagement.Common.XmlHttp.BaseXmlHttpCallback.ProcessRequest(HttpContext context)]]></event>


Environment



Symantec Management Platform 7.0 SP 5


Cause



The DataTable for the Task Status doesn't have a column specified by the grid column definitions and is therefore unable to populate the requested fields. The UI allows to select additional columns which may not exist in the database, in this case the . The selection is then saved to the user SID and affects all Task Management based tasks.  Because this column is not available, the error shows up on all tasks you attempt to view that have been run once before.

There is an additional problem in that once you receive the error, the grid selection window will not accurately reflect what has been selected and thus you can not de-select the column you added.  This is caused by the first error and the consequent failure to load the appropriate data to that table.


Solution



There are two possible work-arounds.  We recommend the first, but the second is presented here in case the first fails for some reason.

Solution 1: clear the settings through the UI

It turns out that the new settings will in fact work for any task that has not ever been run.  Therefore, the following should clear the error:

  1. Create a new task of any type.  Do not run it
  2. Once saved, the new task should also display the new column.
  3. Select the column selector button.  This should now show the new columns you selected to create this problem.
  4. De-select any added columns.  The default columns (and the only ones that should remain) are:
    1. Description
    2. Start Time
    3. Started By
    4. Computers
    5. Status
  5. Click OK and verify that only these columns are showing in your new task.
  6. Go to another task that you have run, and verify that all is now being presented as it should be.

Solution 2: clear the settings through the DB (not recommended as we don't recommend making modifications to the DB via SQL directly)

The problematic entry is being stored in the dbo.UserSettings table in the Symantec_CMDB database.
The following SQL Query can be used to list all User Settings saved for the Task Status Grid;

SELECT * FROM [Symantec_CMDB].[dbo].[UserSettings]  --Please change the name of the database as applicable.
WHERE Id LIKE '%m_bottomSection$m_taskStatusControl$g_Altiris.TaskManagement.UI.TaskControls.SP3.ClientTaskStatusControl_%'
GO

After a full backup of the Symantec_CMDB database the following SQL Query can be used as an example to delete all user settings for the Task Status Grid:

DELETE FROM [Symantec_CMDB].[dbo].[UserSettings]  --Please change the name of the database as applicable.
WHERE Id LIKE '%m_bottomSection$m_taskStatusControl$g_Altiris.TaskManagement.UI.TaskControls.SP3.ClientTaskStatusControl_%'
GO

Reload the Symantec Management Console and the Task  Status grid should not load with the default columns.


Supplemental Materials

SourceETrack
Value2175449


Article URL http://www.symantec.com/docs/TECH141582


Terms of use for this information are found in Legal Notices