| | |
| | | grd2.RowCount = 1; |
| | | grd2.ColumnCount = 0; |
| | | int iCol = 0; |
| | | |
| | | |
| | | //è®°å½grdä¸çéç©ºè¡æ°ï¼å¹¶ç¨äºè®¾ç½®grd2çè¡æ° |
| | | int grd2RowCount = 0; |
| | | int grd2RowIndex = 0; //ä½ä¸ºxiang |
| | | for (int j = 0; j < grd.RowCount; j++) //循ç¯ç½æ ¼1, |
| | | { |
| | | if (DBUtility.ClsPub.isStrNull(grd.Rows[j].Cells[FindCol].Value) != "")//æ¯å¦ç©ºè¡ |
| | | { |
| | | grd2RowCount = grd2RowCount + 1; |
| | | } |
| | | } |
| | | grd2.RowCount = grd2RowCount; |
| | | |
| | | for (int j = 0; j < grd.RowCount; j++) //循ç¯ç½æ ¼1, |
| | | { |
| | | iCol = 0; |
| | | if (DBUtility.ClsPub.isStrNull(grd.Rows[j].Cells[FindCol].Value) != "")//æ¯å¦ç©ºè¡ |
| | | { |
| | | grd2.RowCount = grd2.RowCount + 1; |
| | | for (int i = FixCols; i < grd.Columns.Count; ++i) |
| | | { |
| | | foreach (IGRField fld in Report.DetailGrid.Recordset.Fields) //ä»è®°å½é䏿¾å° ç¸ååæ®µå |
| | |
| | | grd2.Columns[grd2.Columns.Count - 1].HeaderText = fld.Name; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(grd.Rows[j].Cells[i + FixCols].Value) != "") |
| | | grd2.Rows[j].Cells[iCol - 1].Value = DBUtility.ClsPub.isStrNull(grd.Rows[j].Cells[i + FixCols].Value); |
| | | { |
| | | grd2.Rows[grd2RowIndex].Cells[iCol - 1].Value = DBUtility.ClsPub.isStrNull(grd.Rows[j].Cells[i + FixCols].Value); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | grd2RowIndex = grd2RowIndex + 1; |
| | | } |
| | | } |
| | | //å°grd2çæ°æ®åå
¥ è®°å½é |
| | | for (int i = FixCols; i < grd2.Columns.Count; ++i) |