Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. C1FlexGrid column ordering

C1FlexGrid column ordering

Scheduled Pinned Locked Moved C#
helpcsswpfwcfcom
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gvanto
    wrote on last edited by
    #1

    I have a C1FlexGrid component, to which I am binding a datasource, the following: A collection of 'View' type objects (code below) which expose their properties for viewing by the grid. The problem is the ordering of the columns of the C1FlexGrid component. I manually set them to be Number, Attach, Detach, but as soon as a DataSource is set, the column order for some reason changes to Attach, Number, Detach. Is there a way to forcefully set the columns to appear in a certain order once a datasource has been set? I was thinking perhaps there's an attribute (component model) to specify with each property but hours of googling and searching MS help has produced nothing! Any help would be much appreciated! g class TrancheView { private uint number; //... other private vars public TrancheView(BespokeTranche _tranche, uint _number) { this.tranche = _tranche; tranche.TrancheNumber = _number; this.number = _number; } public uint Number { //get { return this.number; } get { return tranche.TrancheNumber; } } public decimal Attach { get { return tranche.Attach; } set { log.Info("setting Attach value"); tranche.Attach = value; } } public decimal Detach { get { return tranche.Detach; } set { log.Info("setting Detach value"); tranche.Detach = value; } } }

    Find Your Dream Job in Australia, Free! http://www.WebCV.com.au

    J 1 Reply Last reply
    0
    • G gvanto

      I have a C1FlexGrid component, to which I am binding a datasource, the following: A collection of 'View' type objects (code below) which expose their properties for viewing by the grid. The problem is the ordering of the columns of the C1FlexGrid component. I manually set them to be Number, Attach, Detach, but as soon as a DataSource is set, the column order for some reason changes to Attach, Number, Detach. Is there a way to forcefully set the columns to appear in a certain order once a datasource has been set? I was thinking perhaps there's an attribute (component model) to specify with each property but hours of googling and searching MS help has produced nothing! Any help would be much appreciated! g class TrancheView { private uint number; //... other private vars public TrancheView(BespokeTranche _tranche, uint _number) { this.tranche = _tranche; tranche.TrancheNumber = _number; this.number = _number; } public uint Number { //get { return this.number; } get { return tranche.TrancheNumber; } } public decimal Attach { get { return tranche.Attach; } set { log.Info("setting Attach value"); tranche.Attach = value; } } public decimal Detach { get { return tranche.Detach; } set { log.Info("setting Detach value"); tranche.Detach = value; } } }

      Find Your Dream Job in Australia, Free! http://www.WebCV.com.au

      J Offline
      J Offline
      Jimmanuel
      wrote on last edited by
      #2

      Stuff like that is why I don't use data binding! You might get more help if you ask this in the Component One Forums[^]

      :Badger:

      G 1 Reply Last reply
      0
      • J Jimmanuel

        Stuff like that is why I don't use data binding! You might get more help if you ask this in the Component One Forums[^]

        :Badger:

        G Offline
        G Offline
        gvanto
        wrote on last edited by
        #3

        cheers yeah i dont have issue with databinding generally and think its quite a cool concept (saving time and ensuring robustness). what i do have a problem with is when the order of columns are randomly shuffled for no reason!!!!!! :-)

        Find Your Dream Job in Australia, Free! http://www.WebCV.com.au

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups