- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
public static void loadDataToDataGridView(DataGridView objDataGridView, List<object> objResultSet, IList objects)
{
if (objDataGridView == null || objResultSet == null) return;
objDataGridView.Rows.Clear();
for (int i = 0; i < objResultSet.Count; i++)
{
for (int columnIndex = 0; columnIndex < ((List<object>)objResultSet[i]).Count; columnIndex++)
{
if (columnIndex == 0)
{
objDataGridView.Rows.Add();
}
objDataGridView.Rows[i].Cells[columnIndex].Value = ((List<object>)objResultSet[i])[columnIndex];
}
if (objects != null)
{
objDataGridView.Rows[i].Tag = objects[i];
}
}
}
public static void loadDataToDataGridView(DataGridView objDataGridView, List<object> objResultSet)
{
loadDataToDataGridView(objDataGridView, objResultSet, null);
}
...
use of this code:
...
List<object> values = new List<object>();
List<object> value = new List<object>();
if (_objPriceFormationFormula.RateVsEuro == 0)
{
value.Add(UtilHelper.Number2String(1.00,2));// String.Format(UtilHelper.getCultureInfo(),UtilHelper.NUMBERIC_FORMAT_2,1.00));//1.00
}
else
{
value.Add(UtilHelper.Number2String(_objPriceFormationFormula.RateVsEuro,2));// String.Format(UtilHelper.getCultureInfo(),UtilHelper.NUMBERIC_FORMAT_2,_objPriceFormationFormula.RateVsEuro));
}
values.Add(value);
UtilHelper.loadDataToDataGridView(this.dgridPFF2, values);
пъянь 16.08.2009 17:59 # 0
Kuros 16.08.2009 18:41 # 0
bugotrep 16.08.2009 22:32 # 0