> private void OnDataGridViewCellFormat(object sender, DataGridViewCellFormattingEventArgs e) > { > if (this.dataGridView.Columns[e.ColumnIndex].Name == "imgType") > { > System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(cdsMessages)); > int iRow = e.RowIndex; > if (cdsMessageDataSet.Messages[iRow].msgtype == "E") > { > e.Value = ((System.Drawing.Bitmap)(resources.GetObject("Work.bmp"))); > } > else > { > e.Value = ((System.Drawing.Bitmap)(resources.GetObject("PhoneCall.bmp"))); > } > } > } > >>
//This might work: ResourceManager.GetObject("RESOURCE"); //while this one fail: ResourceManager.GetObject("Resource");Might not be silly OTOH thinking it creates internal static properties for them.
WORK c:\....\work.bmp PHONE c:\....\phone.bmpCetin