المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : C1FlexGrid column ordering



C# Programming
05-21-2009, 08:28 AM
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