dear all ,
i am trying to develop custom datagridview with custom column , now i has amountDatagrid
ViewColumn to deal with amount formatted with currency my problem is, i have a CurrencyId property which i want to get its value from the datagrid view datasource , as all of us know when you set DataPropertyName = "Column Name in dataset" the value of each set are bonded to the mapped datasource cell , i want to do the same i want the currencyId to get its value from the datasource
any idea to do that ?
this is my trying code :
this in control
[Description("Gets or set the Currency value the cell can accept"), DefaultValue(null), Category("Data")]
[BrowsableAttribute(true)]
[TypeConverterAttribute("System.Windows.Forms.Design.DataMemberFieldConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public string CurrencyPropertyData { get; set; }
public int CurrencyID{get;set;}
using of the control :
this.Column1.AllowNegative = false;
this.Column1.CurrencyID = 0;
this.Column1.DataPropertyName = "Amount";
Column1.CurrencyPropertyData = "CurrencyId";
this.Column1.HeaderText = "Column1";
this.Column1.Mask = IBS.IBSControls.Enums.InputMask.None;
this.Column1.MaxLength = 1000;
this.Column1.MaxValue = new decimal(new int[] {
0,
0,
0,
0});
this.Column1.MinValue = new decimal(new int[] {
0,
0,
0,
0});
this.Column1.Name = "Column1";
this.Column1.UseItemCurrency = false;
thanks in advanced