0

In form1:

Sub loadData()
    Line of code loading data in gridcontrol
End sub

In form2:
Button 1 Code

Dim form1 as new form1
    form1.loadData()

This code is not working. can anyone help me?

3
Contributors
6
Replies
19
Views
4 Years
Discussion Span
Last Post by GeekPlease
0

Thank you but my gridcontrol is not refreshing after inserting new data.

Sub loadData()
     ConnectionStringINI = String.Format("Data Source={0};User ID={1};ServerType=LOCAL;TrimTrailingSpaces=True", DataSources, DataUsername)
    Me.ContactsGridTableAdapter.Connection.ConnectionString = ConnectionStringINI

    GridControl1.DataSource = Nothing
    GridControl1.DataSource = ContactsGridBindingSource
    Me.ContactsGridTableAdapter.Fill(Me.DataSet5.ContactsGrid)
    GridView1.Columns(1).SortOrder = DevExpress.Data.ColumnSortOrder.Ascending
End sub

Help please...

0

insert a breakpoint in the first statement of the sub and go line by line and check the value of each object and variable in each statement to see if it's giving the results you want.

0

try to put this on your code:

   GridView1.Refresh()

another thing.. What is the true DataGrid? GridView1 or GridControl1?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.