• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ASPxGridView类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



ASPxGridView类属于命名空间,在下文中一共展示了ASPxGridView类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: InitDetailsAndPageHeader

        void InitDetailsAndPageHeader(ASPxGridView aspxGridView1)
        {
            ReadOnlyCollection<GridViewDataColumn> groupedColumns = aspxGridView1.GetGroupedColumns();

            int pagewidth = (report.PageWidth - (report.Margins.Left + report.Margins.Right)) - groupedColumns.Count * subGroupOffset;
            List<ColumnInfo> columns = GetColumnsInfo(aspxGridView1, pagewidth);
            CustomizeColumnsCollection(report, new ColumnsCreationEventArgs(pagewidth) { ColumnsInfo = columns });

            report.Bands.Add(new DetailBand() { HeightF = bandHeight });
            report.Bands.Add(new PageHeaderBand() { HeightF = bandHeight });

            XRTable headerTable = new XRTable();
            XRTableRow row = new XRTableRow();
            XRTable detailTable = new XRTable();
            XRTableRow row2 = new XRTableRow();

            for (int i = 0; i < columns.Count; i++)
            {
                if (columns[i].IsVisible)
                {
                    XRTableCell cell = new XRTableCell();
                    cell.Width = columns[i].ColumnWidth;
                    cell.Text = columns[i].FieldName;
                    row.Cells.Add(cell);

                    XRTableCell cell2 = new XRTableCell();
                    cell2.Width = columns[i].ColumnWidth;
                    ControlCustomizationEventArgs cc = new ControlCustomizationEventArgs() { FieldName = columns[i].FieldName, IsModified = false, Owner = cell2 };
                    CustomizeColumn(report, cc);
                    if (cc.IsModified == false)
                        cell2.DataBindings.Add("Text", null, columns[i].FieldName);
                    detailsInfo.Add(columns[i].GridViewColumn, cell2);
                    row2.Cells.Add(cell2);
                }
            }
            headerTable.Rows.Add(row);
            headerTable.Width = pagewidth;
            headerTable.LocationF = new PointF(groupedColumns.Count * subGroupOffset, 0);
            headerTable.Borders = BorderSide.Bottom;

            detailTable.Rows.Add(row2);
            detailTable.LocationF = new PointF(groupedColumns.Count * subGroupOffset, 0);
            detailTable.Width = pagewidth;

            report.Bands[BandKind.PageHeader].Controls.Add(headerTable);
            report.Bands[BandKind.Detail].Controls.Add(detailTable);
        }
开发者ID:EmersonBessa,项目名称:FluxusWeb,代码行数:47,代码来源:ReportHelper.cs


示例3: MostrarResultadoOperacionBd

 public static void MostrarResultadoOperacionBd(ref ASPxGridView grilla, string texto, bool resultado)
 {
     var color = COLOR_RESULTADO_MAL;
     if ((resultado))
         color = COLOR_RESULTADO_BIEN;
     grilla.Controls.Add(new LiteralControl(string.Format("<span style='color:{0}; font-weight:bold; width:100%; text-align:center;'>{1}</span>", color, texto)));
 }
开发者ID:kenchic,项目名称:SAF,代码行数:7,代码来源:Utilidad.cs


示例4: GridApplyTheme

 public static void GridApplyTheme(ASPxGridView Grid, string theTheme)
 {
     Grid.CssFilePath = "~/App_Themes/Glass/{0}/styles.css";
     Grid.CssPostfix = "Glass";
     Grid.Styles.CssFilePath = "~/App_Themes/Glass/{0}/styles.css";
     Grid.Styles.CssPostfix = "Glass";
     Grid.Styles.Header.SortingImageSpacing = 5;
 }
开发者ID:nicofari,项目名称:emma,代码行数:8,代码来源:DevExUtility.cs


示例5: LayoutMasterDetail

        ASPxSplitter LayoutMasterDetail(Control detailControl, ASPxGridView gridView, IModelSplitLayout splitLayout) {
            ASPxSplitter splitter = CreateSplitter(splitLayout, PaneResized(gridView));
            var listPane = CreateSplitterListPane(splitter);
            listPane.Controls.Add(gridView);

            var callbackPanel = CreateSplitterDetailPane(splitter);
            callbackPanel.Controls.Add(detailControl);
            return splitter;
        }
开发者ID:paulute,项目名称:eXpand,代码行数:9,代码来源:XpandLayoutManager.cs


示例6: GridColDesign

 public void GridColDesign(ASPxGridView gridView, string fieldName, string Caption, int Width , int Index, bool isVisible)
 {
     GenerateGridParams GridSetup;
        GridSetup = new GenerateGridParams(fieldName);
        GridSetup.Caption = Caption;
        GridSetup.Width = Width;
        GridSetup.Visible = isVisible;
        GridSetup.Index = Index;
        gridView.cxGenerateGrid(GridSetup);
 }
开发者ID:Thulasizwe,项目名称:Dynamic-Trio,代码行数:10,代码来源:Generater.cs


示例7: DeleteFile

 public void DeleteFile(ASPxGridView gv, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
 {
     try{
         string path = gv.GetRowValuesByKeyValue(e.Keys[0], "Path").ToString();
         File.Delete(Server.MapPath(path));
     }
     catch (Exception)
     {
     }
 }
开发者ID:Java20150,项目名称:AssessmentSystem,代码行数:10,代码来源:Q_Others.aspx.cs


示例8: GetEditFormComboValue

 /// <summary>
 /// Searchs for combo by FindEditFormTemplateControl and returns selected value
 /// </summary>
 /// <param name="grid"></param>
 /// <param name="controlName"></param>
 /// <returns></returns>
 public static object GetEditFormComboValue(ASPxGridView grid, string controlName)
 {
     ASPxComboBox cbo = (ASPxComboBox)grid.FindEditFormTemplateControl(controlName);
     if (cbo != null)
         if (cbo.SelectedItem == null)
             return null;
         else
             return cbo.SelectedItem.Value;
     return null;
 }
开发者ID:ddksaku,项目名称:canon,代码行数:16,代码来源:Utilities.cs


示例9: GenerateGrid

    public void GenerateGrid(ASPxGridView grid, GenerateGridParams generateGridParams)
    {
        //if (sender == null) return;

        //var grid = sender as ASPxGridView;
        //if (grid == null) return;

        //var grid = ((ASPxGridView)sender);
        var fieldname = grid.Columns[generateGridParams.FieldName];
        fieldname.Visible = generateGridParams.Visible;
        fieldname.Width = generateGridParams.Width;
        fieldname.Caption = generateGridParams.Caption;
        fieldname.Index = generateGridParams.Index;
    }
开发者ID:Thulasizwe,项目名称:Dynamic-Trio,代码行数:14,代码来源:Generater.cs


示例10: SetupGridView

        public void SetupGridView(ASPxGridView gridView, Action OnFocusedObjectChanged) {
            _gridView = gridView;
            gridView.SettingsBehavior.AllowFocusedRow = true;
            gridView.Load += (s, e) => OnFocusedObjectChanged();

            gridView.ClientSideEvents.Init = "function (s,e) { s.firstRowChangedAfterInit = true;}";
            gridView.ClientSideEvents.FocusedRowChanged =
                @"function(s,e) { 
                    var up = window.DetailUpdatePanelControl;
                    if (s.firstRowChangedAfterInit!==true && up && up.GetMainElement()) { 
                        up.PerformCallback(s.GetFocusedRowIndex());} 
                    s.firstRowChangedAfterInit = false; }";

            gridView.Settings.VerticalScrollBarMode = ScrollBarMode.Visible;
        }
开发者ID:Raoulwe,项目名称:eXpand,代码行数:15,代码来源:XpandASPxGridListEditor.cs


示例11: SetupGridView

        public void SetupGridView(ASPxGridView gridView, Action OnFocusedObjectChanged) {
            _gridView = gridView;
            gridView.SettingsBehavior.AllowFocusedRow = true;
            gridView.Load += (s, e) => OnFocusedObjectChanged();

            gridView.ClientSideEvents.Init = "function (s,e) { s.firstRowChangedAfterInit = true;}";
            gridView.ClientSideEvents.FocusedRowChanged =
                @"function(s,e) { 
                    var up = document.getElementById('DetailUpdatePanel');
                    if (s.firstRowChangedAfterInit!==true && up && up.ClientControl) { 
                        up.ClientControl.PerformCallback(s.GetFocusedRowIndex());} 
                    s.firstRowChangedAfterInit = false; }";

            gridView.Settings.ShowVerticalScrollBar = true;
        }
开发者ID:kevin3274,项目名称:eXpand,代码行数:15,代码来源:XpandASPxGridListEditor.cs


示例12: SetupGridView

        public void SetupGridView(ASPxGridView gridView, Action OnFocusedObjectChanged) {
            _gridView = gridView;
            gridView.SettingsBehavior.AllowFocusedRow = true;
            gridView.Load += (s, e) => OnFocusedObjectChanged();

            gridView.ClientSideEvents.Init = "function (s,e) { s.firstRowChangedAfterInit = true;}";
            gridView.ClientSideEvents.FocusedRowChanged =
                @"function(s,e) { 
                    var parentSplitter = XpandHelper.GetParentControl(s);
                    var up = XpandHelper.GetFirstChildControl(parentSplitter.GetPane(1).GetElement().childNodes[0]);
                    if ((s.firstRowChangedAfterInit!==true || !XpandHelper.IsRootSplitter(parentSplitter)) && up && up.GetMainElement()) { 
                        up.PerformCallback(s.GetFocusedRowIndex());} 
                    s.firstRowChangedAfterInit = false; }";

            gridView.Settings.VerticalScrollBarMode = ScrollBarMode.Visible;
        }
开发者ID:dimajanzen,项目名称:eXpand,代码行数:16,代码来源:XpandASPxGridListEditor.cs


示例13: ExibirBotao

 public bool ExibirBotao(ASPxGridView grid, int visibleIndex)
 {
     object row = grid.GetRow(visibleIndex);
     string arquivo = "";
     if (visibleIndex != 0)
     {
         arquivo = grid.GetRowValues(visibleIndex, "ARQUIVO").ToString();
     }
     if (string.IsNullOrEmpty(arquivo))
     {
         return false;
     }
     else
     {
         return true;
     }
 }
开发者ID:EmersonBessa,项目名称:FluxusWeb,代码行数:17,代码来源:EncaminharProcessos.ascx.cs


示例14: 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


示例15: CreateControlCheckBoxes

        private void CreateControlCheckBoxes()
        {
            if (string.IsNullOrEmpty(this.GridID))
                throw new NullReferenceException("GridID property is null.");
            grid = NamingContainer.FindControl(GridID) as ASPxGridView;
            if (grid == null)
                throw new InvalidOperationException("ASPxGridView control was not found in NamingContainer.");
            foreach (GridViewDataColumn column in this.grid.Columns)
            {
                ASPxCheckBox columnCheckBox = new ASPxCheckBox();
                columnCheckBox.ID = "chb" + column.VisibleIndex.ToString();
                ASPxPopupControlDemo.Controls.Add(columnCheckBox);

                columnCheckBox.AutoPostBack = true;
                columnCheckBox.Text = column.Caption;//FieldName;
                columnCheckBox.Checked = column.Visible;
                columnCheckBox.CheckedChanged += new EventHandler(columnCheckBox_CheckedChanged);
            }
        }
开发者ID:EmersonBessa,项目名称:FluxusWeb,代码行数:19,代码来源:GridViewControlPanel.ascx.cs


示例16: BindData

    public static void BindData(ASPxGridView gv, DevExpress.Xpo.Session s, string objectname, string filter = "", string DefaultSorting="", params object[] parameter)
    {
        try
        {
            DynamicDataTableClassInfo classInfo = dynamicClasses[objectname];

            if (classInfo != null)
            {
                XPServerCollectionSource ds = new XPServerCollectionSource(s, dynamicClasses[objectname], CriteriaOperator.Parse(filter, parameter));
                ds.DefaultSorting = DefaultSorting;
                gv.DataSource = ds;
                //gv.KeyFieldName = classInfo.KeyProperty.DisplayName;
            }
            else
                throw new Exception(string.Format("Đối tượng {0} không tìm thấy trong database. Nếu không có dữ liệu hiển thị thì XPOProfiles để xem điều kiện lọc đúng chưa", objectname));
        }
        catch (Exception ex)
        {
            SiAuto.Main.LogColored(Color.Red, "Loi BindData:" + ex.ToString());
            throw ex;
        }
    }
开发者ID:trantrung2608,项目名称:ilinkbay,代码行数:22,代码来源:XpoHelper.cs


示例17: InitGroupHeaders

 void InitGroupHeaders(ASPxGridView aspxGridView1)
 {
     ReadOnlyCollection<GridViewDataColumn> groupedColumns = aspxGridView1.GetGroupedColumns();
     for (int i = groupedColumns.Count - 1; i >= 0; i--)
     {
         {
             GridViewDataColumn groupedColumn = groupedColumns[i];
             GroupHeaderBand gb = new GroupHeaderBand();
             gb.Height = bandHeight;
             XRLabel l = new XRLabel();
             l.Text = groupedColumn.FieldName + ": [" + groupedColumn.FieldName + "]";
             l.LocationF = new PointF(initialGroupOffset + i * 10, 0);
             l.BackColor = Color.Beige;
             l.SizeF = new SizeF((report.PageWidth - (report.Margins.Left + report.Margins.Right)) - (initialGroupOffset + i * subGroupOffset), bandHeight);
             gb.Controls.Add(l);
             gb.RepeatEveryPage = shouldRepeatGroupHeadersOnEveryPage;
             GroupField gf = new GroupField(groupedColumn.FieldName, groupedColumn.SortOrder == ColumnSortOrder.Ascending ? XRColumnSortOrder.Ascending : XRColumnSortOrder.Descending);
             gb.GroupFields.Add(gf);
             report.Bands.Add(gb);
         }
     }
 }
开发者ID:EmersonBessa,项目名称:FluxusWeb,代码行数:22,代码来源:ReportHelper.cs


示例18: InitFilters

 void InitFilters(ASPxGridView aspxGridView1)
 {
     report.FilterString = aspxGridView1.FilterExpression;
 }
开发者ID:EmersonBessa,项目名称:FluxusWeb,代码行数:4,代码来源:ReportHelper.cs


示例19: GetVisibleDataColumns

 List<GridViewDataColumn> GetVisibleDataColumns(ASPxGridView aspxGridView1)
 {
     List<GridViewDataColumn> columns = new List<GridViewDataColumn>();
     foreach (GridViewColumn column in aspxGridView1.VisibleColumns)
     {
         if (column is GridViewDataColumn)
             columns.Add(column as GridViewDataColumn);
     }
     return columns;
 }
开发者ID:EmersonBessa,项目名称:FluxusWeb,代码行数:10,代码来源:ReportHelper.cs


示例20: GetColumnsInfo

 private List<ColumnInfo> GetColumnsInfo(ASPxGridView aspxGridView1, int pagewidth)
 {
     List<ColumnInfo> columns = new List<ColumnInfo>();
     List<GridViewDataColumn> visibleColumns = GetVisibleDataColumns(aspxGridView1);
     foreach (GridViewDataColumn dataColumn in visibleColumns)
     {
         ColumnInfo column = new ColumnInfo(dataColumn) { ColumnCaption = string.IsNullOrEmpty(dataColumn.Caption) ? dataColumn.FieldName : dataColumn.Caption, ColumnWidth = ((int)pagewidth / visibleColumns.Count), FieldName = dataColumn.FieldName, IsVisible = true };
         columns.Add(column);
     }
     return columns;
 }
开发者ID:EmersonBessa,项目名称:FluxusWeb,代码行数:11,代码来源:ReportHelper.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ASPxGridViewCustomCallbackEventArgs类代码示例发布时间:2022-05-24
下一篇:
C# ASPxComboBox类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap