Monday, June 14, 2010

Unable to open outlook archive PST file


If you are unable to open your archive file from outlook, looks like it got corrupted; there is a tool that might help you fix the file.

Open up explorer and then browse down to the following folder for Outlook 2007, and run the file SCANPST.EXE:

C:\Program Files\Microsoft Office\Office12\

Once you open up the utility, you’ll have to find the location of your PST file by clicking the Browse button.

Click on the Start button to start the scan…



It will take a while to scan the file, and you’ll get a report at the end telling you whether you have errors in the file. See the image below:



Click on the Repair button, and after a while you’ll finally get the “Repair complete” message.

A log file was created, open it in order to know what was fixed on the file.

At this moment you can try to remap the file in outlook.


Source: http://www.howtogeek.com/howto/microsoft-office/fix-your-broken-outlook-personal-folders-pst-file/

Friday, June 4, 2010

ItemDataBound the last opportunity to access the data item

The ItemDataBound event is raised after an item is data bound to the DataGrid control. This event gives you with the last opportunity to access the data item before it appears on the client. After this event is raised, the data item is null and is no longer available.



For each item that is data bound, you must check the ItemType property. If ItemType is of type Item or AlternatingItem, you receive the value from the last cell of the item, which contains the SaleAmount value. In this sample, you add this value to the running summary variable. When the ItemType is Footer, you receive the total from all of the rows. Therefore, you assign the value of the summary variable to the text value of the last cell.




Code behind:



protected void dg_ItemDataBound(object sender, DataGridItemEventArgs e)
{
// Use the ItemDataBound event to customize the DataGrid control.
// The ItemDataBound event allows you to access the data before
// the item is displayed in the control. In this example, the
// ItemDataBound event is used to format the items in the
// CurrencyColumn in currency format.
if((e.Item.ItemType == ListItemType.Item) ||
(e.Item.ItemType == ListItemType.AlternatingItem))
{

// Retrieve the text of the CurrencyColumn from the DataGridItem
// and convert the value to a Double.
Double Price = Convert.ToDouble(e.Item.Cells[2].Text);

// Format the value as currency and redisplay it in the DataGrid.
e.Item.Cells[2].Text = Price.ToString("c");

DropDownList dd = (DropDownList)e.Item.FindControl("dd_control");
Label lb = (Label)e.Item.FindControl("lb_control");

// Do somenting here...
}
else
{
// It is a header or footer
// Do something here......
}

}



Source: http://support.microsoft.com/kb/313154