RadGridView gridView = new RadGridView(); |
gridView.Name = name; |
gridView.Anchor = (System.Windows.Forms.AnchorStyles)(System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right); |
gridView.AutoSize = true; |
gridView.AutoScroll = true; |
gridView.MasterGridViewTemplate.BestFitColumns(); |
//gridView.MasterGridViewTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; |
gridView.MasterGridViewTemplate.AutoGenerateColumns = false; |
gridView.MasterGridViewTemplate.AllowAddNewRow = true; |
gridView.ShowGroupPanel = false; |
gridView.ContextMenuOpening += new ContextMenuOpeningEventHandler(gridView_ContextMenuOpening); |
gridView.GridBehavior = new MyBehavior(); // see behavior below |
gridView.CellBeginEdit += new GridViewCellCancelEventHandler(gridView_CellBeginEdit); |
gridView.CellValueChanged += new GridViewCellEventHandler(gridView_CellValueChanged); |
gridView.StandardTab = true; |
Hi,
We have a problem with the rendering of the grid(version 2009.3.9.1203) since we upgrade to version 2009 Q3.
He is the code we use to set the columns width :
Me.Instance.DataSource = Value
Me.Instance.GridElement.BeginUpdate()
If Me.Instance.MasterGridViewTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.None Then
For Each column As GridViewDataColumn In Me.Instance.Columns
column.BestFit()
Next
End If
Me.Instance.GridElement.EndUpdate()
Since we update, the column.BestFit() don't work and all column have like width of 1...? We usually have grid with more than 10 columns and it has always work fine.
What should we do to fix it?
thx
Hi,
I fill the grid like this:
bindingSource.DataSource = typeof(MyClass); //MyClass has a property of boolean type which are represented by checkboxes in the grid as well as string properties
grid.EnableFiltering = true;
grid.MasterGridViewTemplate.EnableFiltering = true;
grid.DataSource = bindingSource;
//refresh the binding source
As you can see, I enable filtering programatically. The problem is that no filtering for bool columns is available. I can filter text columns by manually entering some text in the filter row (however no menu/editor/designer is shown for this, I can only enter text and the LIKE operator is applied automatically), but there is no way to filter checkbox columns.
What can be the cause of such strange behavior, how can I solve this problem?
Thanks,
Maciej Aniserowicz
Dim documentTop As AnalyseForm = CType(MainDock.DocumentManager.ActiveDocument.Controls(0), AnalyseForm) |
Dim exporter As New ExportToExcelML(documentTop.DataGrid) |
exporter.SheetMaxRows = ExcelMaxRows._65536 |
exporter.ExportVisualSettings = True |
Dim fileName As String = "c:\ExportedData.xls" |
exporter.RunExport(fileName) |