private void dgFileAttachments_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            // get the selected item Id
            string mId = dgFileAttachments.Rows[e.RowIndex].Cells[5].Value.ToString();

            if (e.ColumnIndex == 9)
            {
                List <string> tempAdditionalData = new List <string>();
                foreach (KeyValuePair <string, object> pair in dAdditionalFileData)
                {
                    if (pair.Value != null)
                    {
                        tempAdditionalData.Add(pair.Key + " : " + pair.Value.ToString());
                    }
                    else
                    {
                        tempAdditionalData.Add(pair.Key);
                    }
                }

                CategoriesForm mCategories = new CategoriesForm(tempAdditionalData);
                mCategories.Owner = this;
                mCategories.ShowDialog(this);
            }

            if (e.ColumnIndex == 0)
            {
                byte[] tempByteArray = null;
                foreach (KeyValuePair <string, byte[]> pair in dContentBytes)
                {
                    if (pair.Key == mId)
                    {
                        tempByteArray = pair.Value;
                    }
                }

                ContentBytesForm cBytes = new ContentBytesForm(tempByteArray);
                cBytes.Owner = this;
                cBytes.ShowDialog(this);
            }
        }
        private void dgFileAttachments_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            // get the selected item Id
            string mId = dgFileAttachments.Rows[e.RowIndex].Cells[5].Value.ToString();

            if (e.ColumnIndex == 9)
            {
                List<string> tempAdditionalData = new List<string>();
                foreach (KeyValuePair<string, object> pair in dAdditionalFileData)
                {
                    if (pair.Value != null)
                    {
                        tempAdditionalData.Add(pair.Key + " : " + pair.Value.ToString());
                    }
                    else
                    {
                        tempAdditionalData.Add(pair.Key);
                    }
                }

                CategoriesForm mCategories = new CategoriesForm(tempAdditionalData);
                mCategories.Owner = this;
                mCategories.ShowDialog(this);
            }

            if (e.ColumnIndex == 0)
            {
                byte[] tempByteArray = null;
                foreach (KeyValuePair<string, byte[]> pair in dContentBytes)
                {
                    if (pair.Key == mId)
                    {
                        tempByteArray = pair.Value;
                    }
                }

                ContentBytesForm cBytes = new ContentBytesForm(tempByteArray);
                cBytes.Owner = this;
                cBytes.ShowDialog(this);
            }
        }