Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
75
Dynamic column header binding
posted


Hey, I have a quick question concerning UltraGrid.  Is there a way to bind a column of data pulled in from a sql select to a ultragrid as its column headers without putting the information into a seperate datatable?

 For example I'm pulling in a bunch of months in the month column from sql.  From there I want to make that the headers for each column in my grid and use the data from another column as the row below them.

 SQL:
MONTH    Info
12             300
1               245
2               338

 UltraGrid:
12         1           2
300      245       338

 Thanks for the help

Parents
  • 1803
    posted

    hi,

    yes you can add a column as an unbound one ..

    sample is like .

    UltraGrid1.DisplayLayout.Bands(0).Columns.Add("Newcol")

    UltraGrid1.DisplayLayout.Bands(0).Columns.Add("Newcol2")

    UltraGrid1.Rows(0).Cells("Newcol").Value = 120

    UltraGrid1.Rows(0).Cells("Newcol2").Value = 320

     hppy Koding,

    Arun

Reply Children