Hello,
I have a problem about bind the UltraGrid from Business Object layer.this my sample code
UltraGrid1.DataSource = TransactionCollection.GetLookUpData(sql) UltraGrid1.DataBind()
UltraGrid1.DataBind()
i don't want to show the property on red line.how to show CustAbbr and Address only?
You can create the columns in the designer and set the column as hidden. To do that:
1. Build the project.
2. Go to the grid properties and open "DataSource" drop down.
3. Click on "Add Project Data Source..."
4. Select "Object".
5. Find your data class, select it and click next.
6. Click Finish.
Open the designer and set column.Hidden to true. In run time, you don't need to use grid.DataSource but bindingSource.DataSource. You can see the bindingSource in the bottom of the designer.
If you don't want to create columns at design time, you can put the attribute [Browsable(false)] on each property (in the class code) you want to hide.
can i bind the data as manualy?not automatic in grid property.because i will create ultragrid for dynamic data.for example :
i have query : "select a,b,c,d ,e from tableA" and then in the coloumn ultragrid showing a,b,c,d.e
or if i have query : "select a,b from tableA" and then in the coloumn ultragrid showing a,b
and i have object property a,b,c,d,e.
my problem is : i have qurey "select a,b from tableA" and then in the coloumn ultragrid showing a,b,c,d,e.
you have solution for me?
Thanks
That's maybe because the columns stayed there from previous binding. Try to clear the columns before binding.
grid.DisplayLayout.Bands[0].Columns.ClearUnbound()
it also not working brother...
Try to do it after the binding. Can you upload a sample project?