Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Posted 29 March 2012 - 11:15 AM
Posted 29 March 2012 - 11:24 AM
Posted 29 March 2012 - 11:32 AM
Posted 29 March 2012 - 11:33 AM
Posted 29 March 2012 - 11:44 AM
Posted 29 March 2012 - 12:59 PM
Posted 29 March 2012 - 03:00 PM
The DataGridView class supports the standard Windows Forms data-binding model. This means the data source can be of any type that implements one of the following interfaces:
- The IList interface, including one-dimensional arrays.
- The IListSource interface, such as the DataTable and DataSet classes.
- The IBindingList interface, such as the BindingList(Of T) class.
- The IBindingListView interface, such as the BindingSource class.
Edited by Billy O'Neal, 29 March 2012 - 03:01 PM.
Posted 29 March 2012 - 03:10 PM
Posted 29 March 2012 - 03:20 PM
Edited by Billy O'Neal, 29 March 2012 - 03:21 PM.
Posted 29 March 2012 - 03:23 PM
Posted 29 March 2012 - 03:26 PM
Posted 29 March 2012 - 03:37 PM
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void ShowSecondForm()
{
// Pass a reference to the current form to the second form
var form2 = new Form2(this);
form2.Show();
}
public void UpdateDataGrid()
{
//Code that calls DataGridView.ResetBindings
}
}
public partial class Form2 : Form
{
/// <summary>
/// A reference to the form with the datagrid we want to update.
/// </summary>
Form1 parentDataViewForm;
// Note that we changed the constructor to require a "Form1"
public Form2(Form1 dataViewForm)
{
parentDataViewForm = dataViewForm;
InitializeComponent();
}
private void ForceDatagirdUpdateOnForm1()
{
parentDataViewForm.UpdateDataGrid();
}
}
Posted 01 April 2012 - 07:44 AM
0 members, 0 guests, 0 anonymous users