I am new to winforms and I want to create a datagridview user control. can we create datagridview user control in winforms ? I googled but didn’t find any resources.. any inputs would be greatly appreciated..
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can create a UserControl, put a DataGridView on it using drag and drop from ToolBox, Then customize your DataGridView, Build the project and you can select the UserControl from the ToolBox and use it where ever you want.
Here is a walkthrough in C# to start using UserControls.
Edit:
To bind data to your UserControl you can expose the DataGridView’s DataSource property. Suppose on your UserControl you have a DataGridView named dataGridView1 :
In your form you can bind data to the UserControl like this: