hi,
i am creating a project in C#.NET 2008 standard edition. how can i make the datagrid view read only, but when a cell is clicked which has data another from should open.
how can i do this
thanks
krishnisilva 0 Junior Poster
Recommended Answers
Jump to PostSet "AllowUserToAddRows" and "AllowUserToDeleteRows" to "False" and "EditMode" to "EditProgrammatically" to make it read only.
Add "CellClick" event and use this code:
private void DGV_CellClick(object sender, DataGridViewCellEventArgs e) { if (dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() != string.Empty) form2.Show(); }
Thanks
All 3 Replies
farooqaaa 48 Enthusiast
manoj kumar1446 -1 Newbie Poster
manoj kumar1446 -1 Newbie Poster
jonsca commented: By starting your own thread -1
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.