protected void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        Infragistics.WebUI.UltraWebGrid.TemplatedColumn col = (Infragistics.WebUI.UltraWebGrid.TemplatedColumn)e.Row.Cells.FromKey("Select").Column;
        CheckBox cb = (CheckBox)((Infragistics.WebUI.UltraWebGrid.CellItem)col.CellItems[e.Row.Index]).FindControl("g_sd");

        cb.Checked = Convert.ToBoolean(e.Row.Cells.FromKey("IsLinked").Value);
    }
Example #2
0
    protected void ugrdKpiList_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        Infragistics.WebUI.UltraWebGrid.TemplatedColumn cCol = (Infragistics.WebUI.UltraWebGrid.TemplatedColumn)e.Row.Band.Columns.FromKey("USE_YN");
        System.Web.UI.WebControls.Image objImg = (System.Web.UI.WebControls.Image)((Infragistics.WebUI.UltraWebGrid.CellItem)cCol.CellItems[e.Row.BandIndex]).FindControl("imgUseYn");
        objImg.ImageUrl = (e.Row.Cells.FromKey("USE_YN").Value.ToString() == "Y") ?
                          "../images/icon_o.gif" : "../images/icon_x.gif";

        //cCol   = (TemplatedColumn)e.Row.Band.Columns.FromKey("APPROVAL_STATUS");
        //objImg = (Image)((CellItem)cCol.CellItems[e.Row.BandIndex]).FindControl("imgUseYn");
        //objImg.ImageUrl = (e.Row.Cells.FromKey("APPROVAL_STATUS").Value.ToString() == "Y") ?
        //                  "../images/icon_o.gif" : "../images/icon_x.gif";

        cCol   = (Infragistics.WebUI.UltraWebGrid.TemplatedColumn)e.Row.Band.Columns.FromKey("APP_STATUS");
        objImg = (System.Web.UI.WebControls.Image)((Infragistics.WebUI.UltraWebGrid.CellItem)cCol.CellItems[e.Row.BandIndex]).FindControl("imgApp");
        string strImg = (e.Row.Cells.FromKey("APP_STATUS").Value == null) ? "" : e.Row.Cells.FromKey("APP_STATUS").Value.ToString();

        MicroBSC.Biz.Common.Biz.Biz_Com_Approval_Info.GetAppImageUrl(strImg);
        objImg.AlternateText = MicroBSC.Biz.Common.Biz.Biz_Com_Approval_Info.GetAppImageText(strImg);

        tRow += 1;
        if (strImg == Biz_Type.app_status_complete)
        {
            tCol += 1;
        }

        //lblRowCount.Text = tCol.ToString() + " / " + tRow.ToString();
    }
    private void Save()
    {
        lbError.Visible = false;

        HyperCatalog.Business.LinkType linkType = HyperCatalog.Business.LinkType.GetByKey(linkTypeId);
        if (linkType != null)
        {
            if (dg != null)
            {
                System.Text.StringBuilder sItemTypes = new System.Text.StringBuilder(String.Empty);
                foreach (Infragistics.WebUI.UltraWebGrid.UltraGridRow r in dg.Rows)
                {
                    Infragistics.WebUI.UltraWebGrid.TemplatedColumn col = (Infragistics.WebUI.UltraWebGrid.TemplatedColumn)r.Cells.FromKey("Select").Column;
                    CheckBox cb = (CheckBox)((Infragistics.WebUI.UltraWebGrid.CellItem)col.CellItems[r.Index]).FindControl("g_sd");
                    if (cb.Checked)
                    {
                        string itemTypeId = r.Cells.FromKey("ItemTypeId").Value.ToString();
                        if (sItemTypes.Length > 0)
                        {
                            sItemTypes.Append("|");
                        }

                        sItemTypes.Append(itemTypeId);
                    }
                }

                if (!linkType.SaveItemTypes(sItemTypes.ToString()))
                {
                    lbError.CssClass = "hc_error";
                    lbError.Text     = HyperCatalog.Business.LinkType.LastError;
                    lbError.Visible  = true;
                }
                else
                {
                    // Refresh title tab
                    UITools.RefreshTab(Page, "ItemTypes", linkType.GetItemTypeCount());

                    lbError.CssClass = "hc_success";
                    lbError.Text     = "Data saved!";
                    lbError.Visible  = true;
                }
            }
        }
        else
        {
            lbError.CssClass = "hc_error";
            lbError.Text     = "Link type (" + linkTypeId + ") doesn't exist";
            lbError.Visible  = true;
        }
    }
Example #4
0
    private void CreateDataGrid()
    {
        TemplateColumn templeatCol = null;

        DeptInfos deptInfo = new DeptInfos();

        dsDept = deptInfo.GetEstDeptListByLevel(int.Parse(DeptID));

        foreach (DataRow dr in dsDept.Tables[0].Rows)
        {
            /* 2011-08-29 수정 : DataGrid에서 UltraDataGrid로 변환으로 변경 필요
             * templeatCol                             = new TemplateColumn();
             * templeatCol.HeaderTemplate              = new DGridTemplete(ListItemType.Header, dr["DEPT_NAME"].ToString(), "");
             * templeatCol.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
             * templeatCol.ItemTemplate                = new DGridTemplete(ListItemType.Item, "C_" + dr["EST_DEPT_REF_ID"].ToString());
             * templeatCol.ItemStyle.HorizontalAlign   = HorizontalAlign.Center;
             * DataGrid1.Columns.Add(templeatCol);
             */
            Infragistics.WebUI.UltraWebGrid.TemplatedColumn tempCol = new Infragistics.WebUI.UltraWebGrid.TemplatedColumn();
            DataGrid1.Bands[0].Columns.Add(tempCol);
        }
    }