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
284
Having multiple column headers in an UltraWebGrid
posted

Dear all,

I'm attempting to build an UltraWebGrid and I've noticed that it seems to want to be databound to a dataset. Since Datasets are not as performant as DataReaders and I'm planning to show read-only summary data, I have to build the grid manually.

What I'm stuck trying to understand is the method for creating multiple column headers. Some of the columns need to be grouped together, for example I have some columns relating to firstname and surname and I wish to have a "master" column header called "customer". I then wish to have a header called "Address" and under that the various address columns.

I note that columns have their own header text but no obvious means of adding extra columns. It's probably just me working late, but I can't see it. I glanced a screenshot which did this but I can't see the properties exposed clearly that I need to amend.

 I hope this is an easy question for somebody and that a helpful someone can point me in the right direction.

Best,

Mike

Parents
No Data
Reply
  • 21382
    posted

    This needs to be done programmatically.  There is a sample that can be installed that shows the code to do this, if you are using the latest version you need to install the SDK, earlier versions of the product had the samples install automatically. 

     

    Anyway the sample can be seen online here: 

    http://samples.infragistics.com/2008.2/webfeaturebrowser/contents.aspx?showCode=True&t=WebGrid/MultiHeaders/MultiHeaders.aspx~srcview.aspx?path=../webfeaturebrowservb/WebGrid/MultiHeaders/MultiHeaders.src~srcview.aspx?path=WebGrid/MultiHeaders/MultiHeaders.src

     

    there are tabs at the top which will show the ASPX and the code behind on how to code the multiheaders

     

    The short of it is that each  Header has a RowLayoutColumInfo object, which can be used to move the headers around.   You can then add more headers  (unbound headers we would call them) and then position them.  

     

    take a look at the code pages from the samples, its pretty self explanatory and the sample code is commented on what is going on.

     

     

     

Children