Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
0
Reply
DataGridView .bmp not showing
Mohamed Ahmed
Dec 6 2017 7:53 AM
252
Reply
Hi all,
I'm trying to create AutoCAD add-in to preview .bmp files
I have snippet code to do the following
- Tow ListBoxis binded together. the first one show directory and the second show subfolder.
- DataGridView to show the .bmp files.
private
void
Form1_Load(
object
sender, EventArgs e)
{
listBox1.DataSource = Directory.GetDirectories(rootDirectory).Select(Path.GetFileName).ToList();
listBox1.SelectedIndexChanged += ListBox1_SelectedIndexChanged;
listBox2.SelectedIndexChanged += ListBox2_SelectedIndexChanged;
DataGridViewImageColumn dgvimgcol =
new
DataGridViewImageColumn();
dgvimgcol.ImageLayout = DataGridViewImageCellLayout.Stretch;
dgvimgcol.Width = 250;
dgvimgcol.HeaderText =
"Blocks"
;
dataViewImages.RowTemplate.Height = 300;
dataViewImages.Columns.Add(dgvimgcol);
dataViewImages.AllowUserToAddRows =
false
;
dataViewImages.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
}
and i got this
- I need to Set only one colomn (Blocks).
- add double click event to insert the dwg file.
Attachment:
Form1.zip
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
How to read API value in string variable.
CRUD Operation in MVC by using Entity Framework and WebAPI