Question

Using devexpress, I placed an xtragridcontrol on the form, added some columns, then filled it with data:

gcCegek.DataSource = Nothing
ConnectToDb(fbconn, "public")
fbcommand.Connection = fbconn
fbcommand.CommandText = "select cegazon, rovidnev, varos, adoszam, konyvpnem, osszktg_forg from cegek order by cegazon"
fbadapter.SelectCommand = fbcommand
fbadapter.Fill(fbdataset)
gcCegek.DataSource = fbdataset
fbconn.Close()

I receive gridcontrol, but within the master-detail view; this means I have to click on the plus icon to see the data I wanted to show.

How do I remove the master-detail view so I can present a simple table with columns and rows?

Was it helpful?

Solution

Set the GridControl.ShowOnlyPredefinedDetails property to true. This will prevent the grid from creating additional levels.

Update

Here are two solutions:

1) set the GridControl's DataMember property to the "cegazon" value

OR 2) set the gridControl's DataSource to the required DataTable

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top