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

C# RadGridView类代码示例

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

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



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

示例1: ValidationBehavior

        public ValidationBehavior(RadGridView gridView, bool isEnabled)
        {
            this.gridView = gridView;
            this.isValidationEnabled = isEnabled;

            this.gridView.CellValidating += this.GridView_CellValidating;
        }
开发者ID:netintellect,项目名称:PluralsightSpaJumpStartFinal,代码行数:7,代码来源:ValidationBehavior.cs


示例2: CreateSpreadsheet

 private static RadSpreadsheet CreateSpreadsheet(RadGridView grid)
 {
     return new RadSpreadsheet()
     {
         Workbook = CreateWorkBook(grid)
     };
 }
开发者ID:CJMarsland,项目名称:xaml-sdk,代码行数:7,代码来源:PrintAndExportExtensions.cs


示例3: CheckSessionAccessList

        public static void CheckSessionAccessList(AccessSubType accessSubType, RadButton btnPrint, RadButton btnAdd, RadButton btnNew, RadButton btnSave, RadButton btnCancel, RadGridView grid)
        {
            if (Session.CurrentUser.Role.IsAdmin)
                return;

            AccessControl ac = Session.CurrentUser.Role.AccessControlList[accessSubType];

            if (!ac.AccessPrint)
            {
                if (btnPrint != null)
                    btnPrint.Hide();
            }

            if (!ac.AccessRemove)
            {
                if (grid != null)
                    grid.Columns.RemoveAt(grid.Columns.Count() - 1);
            }

            if (!ac.AccessInsert)
            {
                if (btnAdd != null)
                    btnAdd.Hide();
                if (btnNew != null)
                    btnNew.Hide();
            }

            if (!ac.AccessChange)
            {
                if (btnSave != null)
                    btnSave.Hide();
                if (btnCancel != null)
                    btnCancel.Hide();
            }
        }
开发者ID:Ashna,项目名称:Shayan-Dental,代码行数:35,代码来源:FormDefinePatient.cs


示例4: GridViewRowDoubleClickHandler

        public GridViewRowDoubleClickHandler(RadGridView gridView)
        {
            MouseButtonEventHandler handler = (sender, args) =>
            {
                var row = sender as GridViewRow;
                if (row != null && row.IsSelected)
                {
                    var methodName = GetMethodName(gridView);

                    var dataContextType = gridView.DataContext.GetType();
                    var method = dataContextType.GetMethod(methodName);
                    if (method == null)
                    {
                        throw new MissingMethodException(methodName);
                    }

                    method.Invoke(gridView.DataContext, null);
                }
            };

            gridView.RowLoaded += (s, e) =>
            {
                e.Row.MouseDoubleClick += handler;
            };

            gridView.RowUnloaded += (s, e) =>
            {
                e.Row.MouseDoubleClick -= handler;
            };

        }
开发者ID:llenroc,项目名称:Inflexion2,代码行数:31,代码来源:GridViewRowDoubleClickHandler.cs


示例5: PrintPreview

        public static void PrintPreview(RadGridView grdData)
        {
            if (grdData.Rows.Count <= 0)
            {
                MessageBox.Show(@"No Datas To Be Printed.", @"Print", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return;
            }
            try
            {
                var rpd = new RadPrintDocument
                {
                    Margins = new Margins(10, 10, 10, 10),
                    DefaultPageSettings = { PaperSize = new PaperSize("A4", 850, 1100) },
                    AssociatedObject = grdData
                };

                var dialog = new RadPrintPreviewDialog
                {
                    ThemeName = grdData.ThemeName,
                    Document = rpd,
                    StartPosition = FormStartPosition.CenterScreen
                };
                dialog.ShowDialog();
            }
            catch (Exception e)
            {
                MessageBox.Show(@"Error While Printing Document." + Environment.NewLine + e.Message, @"Print", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
开发者ID:PrakashDevkota9898,项目名称:HSSNInventory,代码行数:28,代码来源:ClsCommon.cs


示例6: CreatDataGridView

        /// <summary>
        /// 创建RadGridView
        /// </summary>
        /// <param name="structs">RadGridView列</param>
        /// <param name="itemsSource">数据源</param>
        /// <param name="headerName"></param>
        /// <returns></returns>
        public static RadGridView CreatDataGridView(Dictionary<string, string> structs, IEnumerable<object> itemsSource, string headerName)
        {
            var rgView = new RadGridView
                {
                    ShowGroupPanel = false,
                    AutoGenerateColumns = false,
                    IsReadOnly = true,
                    Name = headerName,
                    RowIndicatorVisibility = Visibility.Collapsed
                };

            foreach (var gvColumn in structs.Keys.Select(item => new GridViewDataColumn
                {
                    Header = structs[item],
                    IsFilterable = false,
                    IsSortable = false,
                    DataMemberBinding = new System.Windows.Data.Binding(item)
                }))
            {
                rgView.Columns.Add(gvColumn);
            }
            rgView.ItemsSource = itemsSource;

            return rgView;
        }
开发者ID:unicloud,项目名称:AFRP,代码行数:32,代码来源:ImageAndGirdOperation.cs


示例7: ConvertSelectedDataToString

        /// <summary>
        /// Converts the selected data to string for clipboard copy paste.
        /// </summary>
        /// <param name="grid">The gridview.</param>
        /// <returns>The formatted textual representation of the selected gridview cells.</returns>
        public static string ConvertSelectedDataToString(RadGridView grid)
        {
            var sb = new StringBuilder();

            foreach (var h in grid.Columns)
            {
                sb.Append(h.Name + "\t");
            }

            sb.Append("\n");

            foreach (GridViewRowInfo t in grid.SelectedRows)
            {
                for (int cell = 0; cell < t.Cells.Count; cell++)
                {
                    sb.Append(t.Cells[cell].Value != null ? t.Cells[cell].Value.ToString() : " --- ");

                    sb.Append("\t");
                }

                sb.Append("\n");
            }

            return sb.ToString();
        }
开发者ID:cwschroeder,项目名称:MeterTestComService,代码行数:30,代码来源:ViewUtil.cs


示例8: ContextMenuBehavior

        public ContextMenuBehavior(RadGridView grid, FrameworkElement contextMenu)
        {
            this.gridView = grid;
            this.contextMenu = contextMenu;

            (contextMenu as RadContextMenu).Opened += RadContextMenu_Opened;
            (contextMenu as RadContextMenu).ItemClick += RadContextMenu_ItemClick;
        }
开发者ID:netintellect,项目名称:PluralsightSpaJumpStartFinal,代码行数:8,代码来源:ContextMenuBehavior.cs


示例9: BindingRowDetailsWidthBehavior

		public BindingRowDetailsWidthBehavior(RadGridView grid)
		{
			this.gridView = grid;
			if(this.gridView != null)
			{
				this.gridView.LoadingRowDetails+=new EventHandler<Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs>(OnLoadingRowDetails);			
			}		
		}
开发者ID:JoelWeber,项目名称:xaml-sdk,代码行数:8,代码来源:BindingRowDetailsWidthBehavior.cs


示例10: CustomFilterBehavior

        public CustomFilterBehavior(RadGridView gridView, TextBox tb)
        {
            this.gridView = gridView;
            this.tb = tb;

            this.tb.TextChanged -= FilterValue_TextChanged;            
            this.tb.TextChanged += FilterValue_TextChanged;
        }
开发者ID:netintellect,项目名称:PluralsightSpaJumpStartFinal,代码行数:8,代码来源:CustomFilterBehavior.cs


示例11: ConfigurationPanelBehavior

        public ConfigurationPanelBehavior(RadGridView grid, FrameworkElement panel)
        {
            this.grid = grid;
            this.panel = panel;
            this.ActivatedRows = new ObservableCollection<MyBusinessObject>();

            this.panel.LayoutUpdated += new EventHandler(panel_LayoutUpdated);
        }
开发者ID:netintellect,项目名称:PluralsightSpaJumpStartFinal,代码行数:8,代码来源:ConfigurationPanelBehavior.cs


示例12: SelectedCellsBindingBehavior

		public SelectedCellsBindingBehavior(RadGridView gridView, System.Windows.Controls.ListBox listBox)
        {
            this.gridView = gridView;
            this.listBox = listBox;

			this.listBox.ItemsSource = this.selectedCells;
			this.gridView.SelectedCellsChanged += gridView_SelectedCellsChanged;
        }
开发者ID:netintellect,项目名称:PluralsightSpaJumpStartFinal,代码行数:8,代码来源:SelectedCellsBindingBehavior.cs


示例13: CustomFilterBehavior

        public CustomFilterBehavior(RadGridView gridView, RadWatermarkTextBox textBlock, RadBusyIndicator busyIndicator)
        {
            this.gridView = gridView;
            this.textBlock = textBlock;
            this.busyIndicator = busyIndicator;

            this.textBlock.TextChanged -= this.OnTextBlockTextChanged;
            this.textBlock.TextChanged += this.OnTextBlockTextChanged;
        }
开发者ID:netintellect,项目名称:OutlookInspired,代码行数:9,代码来源:CustomFilterBehavior.cs


示例14: GetAttachedBehavior

		private static RowReorderBehavior GetAttachedBehavior(RadGridView gridview)
		{
			if (!instances.ContainsKey(gridview))
			{
				instances[gridview] = new RowReorderBehavior();
				instances[gridview].AssociatedObject = gridview;
			}

			return instances[gridview];
		}
开发者ID:netintellect,项目名称:PluralsightSpaJumpStartFinal,代码行数:10,代码来源:RowReorderBehavior.cs


示例15: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Procbel.Apps.Silverlight.Modules.Incidencias;component/Views/IncidenciasOverview" +
                 "UserControl.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.attachmentGrid = ((RadGridView)(this.FindName("attachmentGrid")));
 }
开发者ID:sgh1986915,项目名称:Sliverlight-Prism,代码行数:10,代码来源:IncidenciasOverviewUserControl.g.i.cs


示例16: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Procbel.Apps.Silverlight.Modules.Contacts;component/Views/ContactsListUserContro" +
                 "l.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.contactsDataSource = ((RadDomainDataSource)(this.FindName("contactsDataSource")));
     this.gridView = ((RadGridView)(this.FindName("gridView")));
 }
开发者ID:sgh1986915,项目名称:Sliverlight-Prism,代码行数:11,代码来源:ContactsListUserControl.g.i.cs


示例17: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Procbel.Apps.Silverlight.Modules.Activities;component/Views/ActivitiesListUserCo" +
                 "ntrol.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.activitiesGrid = ((RadGridView)(this.FindName("activitiesGrid")));
     this.Status = ((GridViewDataColumn)(this.FindName("Status")));
 }
开发者ID:sgh1986915,项目名称:Sliverlight-Prism,代码行数:11,代码来源:ActivitiesListUserControl.g.i.cs


示例18: ConfigurationPanelBehavior

        public ConfigurationPanelBehavior(RadGridView gridView, FrameworkElement panel)
        {
            this.RemoveChildTableDefinitionsCommand = new RemoveChildTableDefinitonsCommand(this);
            this.RestoreChildTableDefinitionsCommand = new RestoreChildTableDefinitonsCommand(this);
            this.gridView = gridView;
            this.controlPanel = panel;

            this.gridView.DataLoading += this.gridView_DataLoading;

            panel.LayoutUpdated += this.panel_LayoutUpdated;
        }
开发者ID:netintellect,项目名称:PluralsightSpaJumpStartFinal,代码行数:11,代码来源:ConfigurationPanelBehavior.cs


示例19: ControlPanelBehavior

        public ControlPanelBehavior(RadGridView gridView, FrameworkElement panel)
        {         
            this.AddCommand = new UnboundMode.AddCommand(this);
            this.RemoveCommand = new UnboundMode.RemoveCommand(this);
            this.ClearCommand = new UnboundMode.ClearCommand(this);
            this.gridView = gridView;
            this.panel = panel;

            this.panel.LayoutUpdated += new EventHandler(panel_LayoutUpdated);     

            FillGrid();
        }
开发者ID:netintellect,项目名称:PluralsightSpaJumpStartFinal,代码行数:12,代码来源:ControlPanelBehavior.cs


示例20: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Procbel.Apps.Silverlight.Modules.Incidencias;component/Views/IncidenciasListUser" +
                 "Control.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.FilterBox = ((System.Windows.Controls.TextBox)(this.FindName("FilterBox")));
     this.incidenciasGrid = ((RadGridView)(this.FindName("incidenciasGrid")));
     this.radToggleButton = ((RadToggleButton)(this.FindName("radToggleButton")));
 }
开发者ID:sgh1986915,项目名称:Sliverlight-Prism,代码行数:12,代码来源:IncidenciasListUserControl.g.i.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# RadMenuItem类代码示例发布时间:2022-05-24
下一篇:
C# RadComboBoxSelectedIndexChangedEventArgs类代码示例发布时间: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