private void grdSlipSttlLst_InitializeLayout(object sender, InitializeLayoutEventArgs e)
{
//e.Layout.Override.MergedCellStyle = MergedCellStyle.Always;
e.Layout.Bands[0].Columns["ArOrAp"].MergedCellStyle = MergedCellStyle.Always;
e.Layout.Bands[0].Columns["CashCurrCd"].MergedCellStyle = MergedCellStyle.Always;
e.Layout.Bands[0].Columns["DueDate"].MergedCellStyle = MergedCellStyle.Always;
e.Layout.Bands[0].Columns["CashCurrCd"].MergedCellStyle = MergedCellStyle.Always;
CustomMergedCellEvaluator customMergedCellEvaluator = new CustomMergedCellEvaluator();
e.Layout.Bands[0].Columns["ArOrAp"].MergedCellEvaluator = customMergedCellEvaluator;
e.Layout.Bands[0].Columns["CashCurrCd"].MergedCellEvaluator = customMergedCellEvaluator;
e.Layout.Bands[0].Columns["DueDate"].MergedCellEvaluator = customMergedCellEvaluator;
e.Layout.Bands[0].Columns["CashCurrCd"].MergedCellEvaluator = customMergedCellEvaluator;
}
public class CustomMergedCellEvaluator : Infragistics.Win.UltraWinGrid.IMergedCellEvaluator
{
public CustomMergedCellEvaluator()
{
}
public bool ShouldCellsBeMerged(UltraGridRow row1, UltraGridRow row2, UltraGridColumn column)
{
if (row1.GetCellValue("CashPayNo").GetType().ToString() != "System.DBNull"
&& row2.GetCellValue("CashPayNo").GetType().ToString() != "System.DBNull"
&& row1.GetCellValue("CashPaySeq").GetType().ToString() != "System.DBNull"
&& row2.GetCellValue("CashPaySeq").GetType().ToString() != "System.DBNull")
{
string value1 = (string)row1.GetCellValue("CashPayNo");
string value2 = (string)row2.GetCellValue("CashPayNo");
string value3 = (string)row1.GetCellValue("CashPaySeq");
string value4 = (string)row2.GetCellValue("CashPaySeq");
return (value1+value3) == (value2+value4);
}
else return false;
}
}
삼삼한 유틸리티 (0) | 2011.12.12 |
---|---|
.Net 으로 Android 개발하기 (0) | 2011.08.23 |
MS WORD 에서 블로그에 글 올리기 (0) | 2011.08.17 |
대용량 파일 고속 전송: Rapidant (0) | 2011.03.13 |
MSU 설치 (0) | 2011.01.11 |