当前位置: 首页>>代码示例>>C#>>正文


C# ASPxGridView.DataBind方法代码示例

本文整理汇总了C#中ASPxGridView.DataBind方法的典型用法代码示例。如果您正苦于以下问题:C# ASPxGridView.DataBind方法的具体用法?C# ASPxGridView.DataBind怎么用?C# ASPxGridView.DataBind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ASPxGridView的用法示例。


在下文中一共展示了ASPxGridView.DataBind方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RefreshGrid

        private void RefreshGrid(ASPxGridView gv)
        {
            GridViewDataComboBoxColumn c = (GridViewDataComboBoxColumn)gv.Columns["IdentifTecno"];

            c.PropertiesComboBox.TextField = "Name";
            c.PropertiesComboBox.ValueField = "IdentifTecno";
            c.PropertiesComboBox.DataSource = Business.TecnologiaSoporte.ReadAll("");

            gv.DataSource = Business.MediosPublicitarios.ReadAllTipo("");
            gv.DataBind();
        }
开发者ID:javierlov,项目名称:PautasElectronica,代码行数:11,代码来源:TiposMediosPublicitarios.aspx.cs

示例2: gridProductDetailsAddInCallback

    /// <summary>
    /// Xử lý khi Save Callback kết thúc
    /// </summary>
    /// <param name="result">kết quả trả về khi callback xong</param>
    /// <param name="param">tham số e.Parameter của Callback Event</param>
    /// <param name="tblTemp">Tên bảng cần xóa dữ liệu tạm sau khi callback xong. Chỉ dành cho trường hợp lưu thành công</param>
    /// <param name="sessionname">Tên session lưu giữ sessionkey của bảng temp</param>
    /// 
    public static void gridProductDetailsAddInCallback(string parameter, ASPxGridView gv)
    {
        object tempID = -1;
        if (parameter.StartsWith("reorderlevel"))
        {

            object typeReorder = parameter.Split(';')[1];
            tempID = parameter.Split(';')[2];

            if (tempID != null)
            {
                EU.SALE_temp_reorderLevel(tempID, typeReorder);
                //LogAction(4, tempID + ";ReorderLevel :" + parameter);
                //throw new Exception("gridProductDetailsAddInCallback;" + tempID + ";param:" + parameter);
            }

        }
        gv.DataBind();
    }
开发者ID:trantrung2608,项目名称:ilinkbay,代码行数:27,代码来源:BaseControl.cs

示例3: RefreshAbmGrid

        private void RefreshAbmGrid(ASPxGridView gv)
        {
            var lineas = Lineas;
            lineas = lineas.OrderBy(p => p.Dia).ThenBy(r => r.Hora).ThenBy(s => s.Salida).ToList();

            gv.DataSource = lineas;
            gv.DataBind();
        }
开发者ID:javierlov,项目名称:PautasElectronica,代码行数:8,代码来源:Ordenado.aspx.cs

示例4: RefreshAbmGrid

 private void RefreshAbmGrid(ASPxGridView gvABM)
 {
     gvABM.DataSource = Productos;
     gvABM.DataBind();
 }
开发者ID:javierlov,项目名称:PautasElectronica,代码行数:5,代码来源:PiezasArte.aspx.cs

示例5: RefreshGrid

 private void RefreshGrid(ASPxGridView gv)
 {
     gv.DataSource = CRUDHelper.ReadAll("", BusinessMapper.GetDaoByEntity(Entity));
     gv.DataBind();
 }
开发者ID:javierlov,项目名称:PautasElectronica,代码行数:5,代码来源:AbmGenerico.aspx.cs

示例6: EndEditing

 protected override void EndEditing(ASPxGridView gridView, System.ComponentModel.CancelEventArgs e)
 {
     e.Cancel = true;
     gridView.CancelEdit();
     gridView.DataBind(gridView.DataSource as XPCollection);
 }
开发者ID:a1exb1,项目名称:DX_Farlon_Data_Consolidator,代码行数:6,代码来源:Save.aspx.cs

示例7: RefreshHomeGrid

 private void RefreshHomeGrid(ASPxGridView gvHome)
 {
     //cargar con pautas
     gvHome.DataSource = mycert;
     gvHome.DataBind();
 }
开发者ID:javierlov,项目名称:PautasElectronica,代码行数:6,代码来源:Certificado.aspx.cs

示例8: RefreshAbmGrid

        private void RefreshAbmGrid(ASPxGridView gv)
        {
            var lineas = new List<CertificadoDetDTO>();

            if (mycert != null)
            {
                mycert = mycert.OrderBy(t => t.Dia).ThenBy(u => u.Hora).ThenBy(v => v.Salida).ToList();
            }

            lineas = mycert;

            lineas = lineas.OrderBy(t => t.Dia).ThenBy(u => u.Hora).ThenBy(v => v.Salida).ToList();

            gv.DataSource = lineas;
            gv.DataBind();
        }
开发者ID:javierlov,项目名称:PautasElectronica,代码行数:16,代码来源:Certificado.aspx.cs

示例9: LoadSearch

        private void LoadSearch(int _type, int _status, ASPxGridView grv)
        {
            try
            {

                if (idGroup != 1 && idGroup != 2 && idGroup != 4 && idGroup != 10 && idGroup != 14)
                {
                    var listPlus = (from a in db.PROFILE_NEWs where a.USER_ID == idUser select a)
                                .Union(from a in db.PROFILE_NEWs
                                       join b in db.WORKFLOW_USERs on a.ID equals b.PROF_ID
                                       where b.USER_ID == idUser
                                       select a).OrderByDescending(n => n.PROF_DATE);
                    if (listPlus.Count() > 0)
                    {
                        if (_status == 0)
                        {
                            var listNew = listPlus.Where(n => n.PROF_TYPE == _type && n.PROF_STATUS != 12 );
                            grv.DataSource = listNew;
                            grv.DataBind();
                            Session["DangTienHanh"] = Utils.CIntDef(Session["DangTienHanh"]) + listNew.Count(n => n.PROF_STATUS != 12);
                            Session["DaHoanThanh"] = Utils.CIntDef(Session["DaHoanThanh"]) + listNew.Count(n => n.PROF_STATUS == 12);
                        }
                        else
                        {
                            var listNew = listPlus.Where(n => n.PROF_TYPE == _type && n.PROF_STATUS == 12 );
                            grv.DataSource = listNew;
                            grv.DataBind();
                            Session["DangTienHanh"] = Utils.CIntDef(Session["DangTienHanh"]) + listNew.Count(n => n.PROF_STATUS != 12);
                            Session["DaHoanThanh"] = Utils.CIntDef(Session["DaHoanThanh"]) + listNew.Count(n => n.PROF_STATUS == 12);
                        }
                    }
                    else
                    {
                        if (_status == 0)
                        {
                            var listDom = db.PROFILE_NEWs.Where(n => n.USER_ID == idUser && n.PROF_TYPE == _type && n.PROF_STATUS != 12).OrderByDescending(n => n.PROF_DATE);
                            grv.DataSource = listDom;
                            grv.DataBind();
                            Session["DangTienHanh"] = Utils.CIntDef(Session["DangTienHanh"]) + listDom.Count(n => n.PROF_STATUS != 12);
                            Session["DaHoanThanh"] = Utils.CIntDef(Session["DaHoanThanh"]) + listDom.Count(n => n.PROF_STATUS == 12);
                        }
                        else
                        {
                            var listDom = db.PROFILE_NEWs.Where(n => n.USER_ID == idUser && n.PROF_TYPE == _type && n.PROF_STATUS == 12).OrderByDescending(n => n.PROF_DATE);
                            grv.DataSource = listDom;
                            grv.DataBind();
                            Session["DangTienHanh"] = Utils.CIntDef(Session["DangTienHanh"]) + listDom.Count(n => n.PROF_STATUS != 12);
                            Session["DaHoanThanh"] = Utils.CIntDef(Session["DaHoanThanh"]) + listDom.Count(n => n.PROF_STATUS == 12);
                        }
                    }
                }
                else
                {
                    if (_status == 0)
                    {
                        var list = db.PROFILE_NEWs.Where(n => n.PROF_TYPE == _type && n.PROF_STATUS != 12).OrderByDescending(n => n.PROF_DATE);
                        grv.DataSource = list;
                        grv.DataBind();
                        Session["DangTienHanh"] = Utils.CIntDef(Session["DangTienHanh"]) + list.Count(n => n.PROF_STATUS != 12);
                        Session["DaHoanThanh"] = Utils.CIntDef(Session["DaHoanThanh"]) + list.Count(n => n.PROF_STATUS == 12);
                    }
                    else
                    {
                        var list = db.PROFILE_NEWs.Where(n => n.PROF_TYPE == _type && n.PROF_STATUS == 12).OrderByDescending(n => n.PROF_DATE);
                        grv.DataSource = list;
                        grv.DataBind();
                        Session["DangTienHanh"] = Utils.CIntDef(Session["DangTienHanh"]) + list.Count(n => n.PROF_STATUS != 12);
                        Session["DaHoanThanh"] = Utils.CIntDef(Session["DaHoanThanh"]) + list.Count(n => n.PROF_STATUS == 12);
                    }
                }
            }
            catch //(Exception)
            {

                //throw;
            }
        }
开发者ID:thanhphung901,项目名称:quanly.ketoanvn.com.vn,代码行数:77,代码来源:homeMain.ascx.cs

示例10: RefreshGrid

 private void RefreshGrid(ASPxGridView gv)
 {
     gv.DataSource = CRUDHelper.ReadAll("", DAO);
     gv.DataBind();
 }
开发者ID:javierlov,项目名称:PautasElectronica,代码行数:5,代码来源:Avisos.aspx.cs

示例11: RefreshAbmGrid

 private void RefreshAbmGrid(ASPxGridView gvABM)
 {
     gvABM.DataSource = Atencion;
     gvABM.DataBind();
 }
开发者ID:javierlov,项目名称:PautasElectronica,代码行数:5,代码来源:Avisos.aspx.cs

示例12: RefreshGrid

        private void RefreshGrid(ASPxGridView gridView)
        {
            if (gridView.ID == "gv")
                gridView.DataSource = Business.Costos.ReadAll("");
            else
                if (pnlVersiones.Attributes["RecId"] != null)
                    gvVersiones.DataSource = Business.Costos.ReadAllVersiones(Business.Costos.Read(Convert.ToInt32(pnlVersiones.Attributes["RecId"])));

            gridView.DataBind();
        }
开发者ID:javierlov,项目名称:PautasElectronica,代码行数:10,代码来源:Costos.aspx.cs

示例13: RefreshAbmGrid

        private void RefreshAbmGrid(ASPxGridView gvABM)
        {
            if (gvABM.ID == "gvABMFrecuencia")
                gvABM.DataSource = CostosFrecuencia;
            else
                gvABM.DataSource = CostosProveedor;

            gvABM.DataBind();
        }
开发者ID:javierlov,项目名称:PautasElectronica,代码行数:9,代码来源:Costos.aspx.cs

示例14: RefreshGrid

 private void RefreshGrid(ASPxGridView gv)
 {
     gv.DataSource = Business.TecnologiaSoporte.ReadAll("");
     gv.DataBind();
 }
开发者ID:javierlov,项目名称:PautasElectronica,代码行数:5,代码来源:TecnologiaSoporte.aspx.cs

示例15: gridCallBackOption


//.........这里部分代码省略.........
                {
                    for (int i = 0; i < listid.Count; i++)
                    {
                        SiAuto.Main.LogColored(System.Drawing.Color.Purple, "key so :" + i.ToString() + "----" + listid[i]);
                        string currentCode = "isDeleted=1 AND " + grid.KeyFieldName + "=" + listid[i];
                        bool check = EU.CheckByModuleD(globalModuleID, currentCode);
                        if (check == true)
                        {
                            string rowDeleted = EU.deleteMultiTblScript(globalModuleID, grid.KeyFieldName, string.Join(",", listid));
                            listKeyValueOK.Add(listid[i]);
                        }
                    }
                    if (listKeyValueOK.Count > 0)
                    {
                        WorkFlowManager.BuildTaskByWhenExecute(globalModuleID, "DELETED", string.Join(";", listKeyValueOK));
                        listKeyValueOK.Clear();
                    }
                }
                else
                {
                    object currentFocused = grid.GetRowValues(grid.FocusedRowIndex, grid.KeyFieldName);
                    if (currentFocused != null)
                    {
                        string currentCode = "isDeleted=1 AND " + grid.KeyFieldName + "=" + currentFocused.ToString();
                        bool check = EU.CheckByModuleD(globalModuleID, currentCode);
                        if (check == true)
                        {
                            string rowDeleted = EU.deleteMultiTblScript(globalModuleID, grid.KeyFieldName, string.Join(",", currentFocused.ToString()));
                            if (int.Parse(rowDeleted) > 0)
                            {
                                SiAuto.Main.LogColored(Color.Green, "Chuan bi workflow DELETED");
                                WorkFlowManager.BuildTaskByWhenExecute(globalModuleID, "DELETED", currentFocused.ToString());
                                SiAuto.Main.LogColored(Color.Green, "End workflow DELETED");

                                SiAuto.Main.LogColored(Color.Green, "ghi vao tray - bảng SY_audit_trail DELETED");
                                UserUtils.Log(CU.getLoginID(), globalModuleID, -1, int.Parse(currentFocused.ToString()), "", "Xóa thành công !", "DELETED");
                                SiAuto.Main.LogColored(Color.Green, "end tray DELETED");
                            }

                        }
                    }
                }

            }
            else if (param.IndexOf("RestoreSelect") >= 0)
            {

                List<object> listid = grid.GetSelectedFieldValues(new string[] { grid.KeyFieldName });
                if (listid.Count > 0)
                {
                    for (int i = 0; i < listid.Count; i++)
                    {
                        SiAuto.Main.LogColored(System.Drawing.Color.Purple, "key so :" + i.ToString() + "----" + listid[i]);
                        string currentCode = "isDeleted=0 AND " + grid.KeyFieldName + "=" + listid[i];
                        bool check = EU.CheckByModuleD(globalModuleID, currentCode);
                        if (check == true)
                        {
                            string rowDeleted = EU.restoreMultiTblScript(globalModuleID, grid.KeyFieldName, string.Join(",", listid));
                            listKeyValueOK.Add(listid[i]);
                        }
                    }
                    if (listKeyValueOK.Count > 0)
                    {
                        WorkFlowManager.BuildTaskByWhenExecute(globalModuleID, "RESTORED", string.Join(";", listKeyValueOK));
                        listKeyValueOK.Clear();
                    }
                }
                else
                {
                    object currentFocused = grid.GetRowValues(grid.FocusedRowIndex, grid.KeyFieldName);
                    if (currentFocused != null)
                    {
                        string currentCode = "isDeleted=0 AND " + grid.KeyFieldName + "=" + currentFocused.ToString();
                        bool check = EU.CheckByModuleD(globalModuleID, currentCode);
                        if (check == true)
                        {
                            string rowDeleted = EU.restoreMultiTblScript(globalModuleID, grid.KeyFieldName, string.Join(",", currentFocused.ToString()));
                            if (int.Parse(rowDeleted) > 0)
                            {
                                SiAuto.Main.LogColored(Color.Green, "Chuan bi workflow RESTORED");
                                WorkFlowManager.BuildTaskByWhenExecute(globalModuleID, "RESTORED", currentFocused.ToString());
                                SiAuto.Main.LogColored(Color.Green, "End workflow RESTORED");

                                SiAuto.Main.LogColored(Color.Green, "ghi vao tray - bảng SY_audit_trail RESTORED");
                                UserUtils.Log(CU.getLoginID(), globalModuleID, -1, int.Parse(currentFocused.ToString()), "", "Phục hồi thành công !", "RESTORED");
                                SiAuto.Main.LogColored(Color.Green, "end tray RESTORED");
                            }
                        }
                    }
                }
            }
            grid.DataBind();
            if (myCookie != null) Response.Cookies.Set(myCookie);
        }
        catch (Exception ex)
        {

            throw new Exception(ex.Message);
        }
    }
开发者ID:trantrung2608,项目名称:ilinkbay,代码行数:101,代码来源:BasePage.cs


注:本文中的ASPxGridView.DataBind方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。