Telerik Forums
UI for WinForms Forum
2 answers
129 views

We are using the Excel like filtering feature. Upon startup I would like to set specific entries in a column as attached. How can I do this?

 

Terry
Top achievements
Rank 1
 answered on 31 Jul 2018
1 answer
142 views

Hi,

The scenario is following

The system has 2 different windows (type floating.).

Say user is doing something like editing in a first window.

I want programatically to restrict user to the window he is currently working in, until he commits his work.

I.e. prevent him to go to window #2 until he clicks save - so it should work as a modal dialog box while user in editing mode.

I tried to hook up to ActiveWindowChanging event of RadDock class. 

I wrote essentially 

private void DockerContainer_ActiveWindowChanging(object sender, DockWindowCancelEventArgs e)
{
            // some processng
           if (needTo capture)
           {
                e.Cancel = true;
            }
}

But it doesn't work.

Are there any way to do what i want to do?

Please help,

Boris Pitel

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Jul 2018
3 answers
167 views

Hello folks!

Is there some way to adjust the width of the textbox in the TableSearchRow?  Also, can a MaxLength be set for this same textbox?

-Curtis

Dimitar
Telerik team
 answered on 30 Jul 2018
5 answers
514 views

Sample code below. Just copy, paste and run. :)

var grid = new RadGridView
{
    Dock = DockStyle.Fill,
    AutoSizeRows = false,
    AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill
     
};
 
grid.Columns.Add(new GridViewTextBoxColumn() { Name = "column1", HeaderText = "Column 1" });
grid.Columns.Add(new GridViewTextBoxColumn() { Name = "column2", HeaderText = "Column 2" });
grid.Columns.Add(new GridViewTextBoxColumn() { Name = "column3", HeaderText = "Column 3" });
grid.Columns.Add(new GridViewTextBoxColumn() { Name = "column4", HeaderText = "Column 4" });
 
var columnGroupsView = new ColumnGroupsViewDefinition();
columnGroupsView.ColumnGroups.Add(new GridViewColumnGroup("Group 1 Line 1" + Environment.NewLine + "Group 1 Line 2"));
columnGroupsView.ColumnGroups[columnGroupsView.ColumnGroups.Count - 1].Rows.Add(new GridViewColumnGroupRow());
columnGroupsView.ColumnGroups[columnGroupsView.ColumnGroups.Count - 1].Rows[0].ColumnNames.Add("column1");
columnGroupsView.ColumnGroups[columnGroupsView.ColumnGroups.Count - 1].Rows[0].ColumnNames.Add("column2");
 
columnGroupsView.ColumnGroups.Add(new GridViewColumnGroup("Group 2 Line 1" + Environment.NewLine + "Group 2 Line 2"));
columnGroupsView.ColumnGroups[columnGroupsView.ColumnGroups.Count - 1].Rows.Add(new GridViewColumnGroupRow());
columnGroupsView.ColumnGroups[columnGroupsView.ColumnGroups.Count - 1].Rows[0].ColumnNames.Add("column3");
columnGroupsView.ColumnGroups[columnGroupsView.ColumnGroups.Count - 1].Rows[0].ColumnNames.Add("column4");
 
grid.ViewDefinition = columnGroupsView;
 
var form = new RadForm();
form.Controls.Add(grid);
form.ShowDialog();

 

How to change by code height of group row? Please see attached image.

Important: I want to stay with AutoSizeRows = false.

konrad
Top achievements
Rank 1
 answered on 30 Jul 2018
11 answers
293 views

It looks like the stand text block formatting is done on word boundary, i.e. text delimited by spaces. Is there any way to make a custom block so I can format based on words delimited by other characters, e.g. "|", "[", "]" etc. Also, what is the extent of customisation, is it just fore/back colour of text? I'd like bold, italics etc. also so perhaps my best option is to use a rich text editor.

Dimitar
Telerik team
 answered on 27 Jul 2018
3 answers
278 views

I'm having a very strange issue.  When I click "open property builder" I am presented with an error message.  It says...

Could not load file or assembly 'Telerik.WinControls.Themes.HighContrastBlack, Version ...' or one of its dependencies.  The system cannot find the file specified.

What's most interesting is that I am not using or referencing this theme anywhere in my project.

Dimitar
Telerik team
 answered on 26 Jul 2018
5 answers
880 views

I'm trying to highlight just one column header.
I would also like the whole column to have a different border to the others.
But I have not managed to modify any element of the header either.
This is the code I am using:

Private Sub RadGridView1_CellFormatting(sender As Object, e As UI.CellFormattingEventArgs) Handles RadGridView1.CellFormatting
 
        If TypeOf e.CellElement Is GridHeaderCellElement Then
            e.CellElement.Font = myCustomFont
            e.CellElement.BorderBoxStyle = BorderBoxStyle.OuterInnerBorders
 
        End If
End Sub

 

Thanks!

Dimitar
Telerik team
 answered on 26 Jul 2018
5 answers
330 views

How can I get a click event over an annotation label?

And change mouse pointer like this?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Jul 2018
7 answers
216 views

I'm using RowPaint event to "merge" cells. But when Printing it is not using the RowPaint event.

I tried to use PrintCellPaint event. But Row of event args are different. One is GridDataRowElement and other is GridViewDataRowInfo.

How can I use the same code to both events?

private void radGridView2_RowPaint(object sender, GridViewRowPaintEventArgs e)
{
    var dataRow = e.Row as GridDataRowElement;
    if (dataRow == null)
        return;
 
    var value = Convert.ToInt32(dataRow.RowInfo.Cells["Group"].Value);
    if (value == -1)
        return;
 
    var startCell = e.Row.VisualCells[2];
 
    var leftPos = startCell.PointToControl(startCell.Bounds.Location).X + (startCell.TableElement.CellSpacing * startCell.ColumnIndex);
 
    var msgLocation = new Rectangle(leftPos + 1, 1, e.Row.Bounds.Width - leftPos - 2, e.Row.Bounds.Height - 2);
 
    e.Graphics.FillRectangle(new SolidBrush(Color.White), msgLocation);
    e.Graphics.DrawString(EventLogs[value], e.Row.Font, new SolidBrush(Color.Black), msgLocation);
 
    var textSize = e.Graphics.MeasureString(EventLogs[value], e.Row.Font, msgLocation.Width);
    //if (textSize.Height > dataRow.Size.Height)
        startCell.RowInfo.Height = (int)textSize.Height;
}
Hristo
Telerik team
 answered on 26 Jul 2018
5 answers
161 views

Hi,

I'm working with a RadGridView to show dynamically some event come on my app. The RadGridView use a GridViewTemplate to show some children events and the relation is made with a GridViewRelation.
I do some tests to try to customize the display on the event ViewCellFormatting but I still have problem on the RadPageViewStripElement where like on the sample because I cannot remove the Yellow line (define on the RadPageViewContentAreaElement).

I would like know if it's possible to remove this yellow line?

 

private void GridView_ViewCellFormatting(object sender, CellFormattingEventArgs e)
        {
            GridDetailViewCellElement childCell = e.CellElement as GridDetailViewCellElement;
            GridGroupExpanderCellElement expanderCell = e.CellElement as GridGroupExpanderCellElement;
 
            if (childCell != null)
            {
                childCell.Padding = Padding.Empty;
                 
                RadPageViewStripElement stripElement = childCell.PageViewElement as RadPageViewStripElement;
                if (stripElement != null)
                {
                    stripElement.DrawBorder = false;
                    stripElement.Padding = Padding.Empty;
                     
                    RadPageViewContentAreaElement contentArea = stripElement.ContentArea as RadPageViewContentAreaElement;
                    contentArea.DrawBorder = false;
                    contentArea.BackColor = Color.Yellow;
                    contentArea.Padding = Padding.Empty;
 
                    foreach (RadPageViewItem item in stripElement.Items)
                    {
                        item.Size = new Size(0, 1);
                        item.Visibility = ElementVisibility.Hidden;
                        item.DrawBorder = false;
                    }
                }
                 
            }
          
            else if ((expanderCell != null) && (expanderCell.RowElement is GridDataRowElement))
            {
                expanderCell.Expander.Visibility = ElementVisibility.Hidden;
            }
        }
Hristo
Telerik team
 answered on 26 Jul 2018
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?