Telerik Forums
UI for WinForms Forum
2 answers
272 views

 Grid position is not proper after reload the data. Winforms radgridview we are using.

Grid is having huge data with headers and child grids (Nested grid).

The issue is related to grid position after data save.

User will expand the grid including header ,child and do some edits and save the records.

After save the grid position we are trying to set from code. As a part of the save function grid data will be reloaded and then we are expanding the headers and child grid same as how the user kept.

Below two properties are not consistent before save and after data reload.

 rdGrid.VerticalScroll.Maximum
 rdGrid.VerticalScroll.Minimum

Other than setting these properties how we can set the grid position.  Thanks in Advance

 

 int position = vScroll.Maximum ;
 bool isMaxValue = position == vScroll.Maximum - vScroll.LargeChange + 1;

     if (isMaxValue)
                            {
                                position = vScroll.Maximum - vScroll.LargeChange + 1;
                            }
                            rdGrid.TableElement.VScrollBar.Value = position;

 

Dimitar
Telerik team
 answered on 24 Jun 2019
1 answer
125 views

In your example when you maximize the window, it does not stay fullscreen, but rather before the Windows Taskbar. how to do this?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Jun 2019
3 answers
305 views

Hi guys,

So I was following this telerik video on the 3 types of filtering (basic, excel-like, custom) :  https://www.telerik.com/videos/winforms/filtering-and-expressions-in-radgridview-for-winforms

I tried to apply the custom filtering using a textbox just like the video on my project, but I keep getting an error.  It's suppose to search all the rows and match what's in the textbox.  It'll run, but as soon as I try typing into the textbox, I get an error.  What am I doing incorrectly?

I've attached some pics of it and the code as well.  Thank you!

 

Here is my code:

 private void ProductionInstructionPrintPage_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dbMTISysDataSet.VW_ProdPrintPage' table. You can move, or remove it, as needed.
            this.vW_ProdPrintPageTableAdapter.Fill(this.dbMTISysDataSet.VW_ProdPrintPage);

            this.WindowState = FormWindowState.Maximized;

            radGridView1.EnableFiltering = true;
            radGridView1.EnableCustomFiltering = true;

        }

 

private void radTextBox1_TextChanged(object sender, EventArgs e)
        { 

            radGridView1.MasterTemplate.Refresh();
        }

        private void radGridView1_CustomFiltering(object sender, GridViewCustomFilteringEventArgs e)
        {
            // if the custom filter is empty, reset this row to its default state
            if (string.IsNullOrEmpty(radTextBox1.Text))
            {
                e.Visible = true;

                //reset each cell in this row
                for (int i=0; i<radGridView1.ColumnCount; i++)
                {
                    e.Row.Cells[i].Style.Reset();
                    e.Row.InvalidateRow();
                }

                return;
            }

            //if the custom filter is set, locate the cells in this row that match it and colorize them
            e.Visible = false;
            for (int i = 0; i<radGridView1.ColumnCount; i++)
            {
                string text = e.Row.Cells[i].Value.ToString();

                //locate and colorize matching cells
                if (text.IndexOf(radTextBox1.Text, StringComparison.InvariantCultureIgnoreCase) >= 0)
                {
                    e.Row.Cells[i].Style.CustomizeFill = true;
                    e.Row.Cells[i].Style.DrawFill = true;
                    e.Row.Cells[i].Style.BackColor = Color.PowderBlue;
                    e.Visible = true;
                }
                else
                {
                    e.Row.Cells[i].Style.Reset();
                    e.Row.InvalidateRow();
                }
            }
        }

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Jun 2019
2 answers
183 views

I would like my users to red mark images before sending to us.What I am looking for is where I would have buttons above the image for:

Draw Line
Draw Circle
Draw Rectangle
Draw w/Pen

And each would be preset to width of 2, color red. I do not want to use your Draw Dialogs at all.

I would also want to have Undo/Redo available without using your tool palette.

Save I can handle already since you have the SameImageAs method.

How can I do this please?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Jun 2019
2 answers
86 views

Hello Telerik Community , I just moved from devexpress to telerik and I can say it's really amazing for winforms.

I have some questions about licensing to make sure I don't get in trouble for copyright laws.

 

I'm developing an open-source app which is a 3D modeler and I used Telerik Rad Controls for Winform Trial to build GUI.

So here's the first question , Is it OK if I publish my app source in git-hub when it's using telerik trial version?

 

And second question , Can I share trial assemblies downloaded from official telerik website ?

 

In this case users and developers who use my app get nag screen and they need to buy full version of telerik right ?!

So it's OK to do that ?

 

Regards,

Mike Cell

Mike
Top achievements
Rank 1
 answered on 22 Jun 2019
2 answers
126 views

I wish to programmatically select the "Basic" Colors Tab when the colorbox is opened, without hidding the other tabs

Thanks in advance

pierre-jean
Top achievements
Rank 1
Veteran
Iron
 answered on 21 Jun 2019
1 answer
110 views

Hi,

 

Is it possible to add a series of check boxes to each header? I would like them to appear directly underneath the date.

 

Thanks

Nadya | Tech Support Engineer
Telerik team
 answered on 19 Jun 2019
30 answers
1.2K+ views
Hi,

Is it posssible to add additional controls such as a radCheckbox to the 'editAppointmentsDialouge'?
I need to implement a way of marking appointments as confirmed/not yet confirmed.

Regards

Dave
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Jun 2019
1 answer
91 views

I have a gridview with a checkbox column. When the checkbox is checked, I would like to immediately perform some validation and cancel the check if the validation fails. I would like this to happen immediately and not when the user leaves the cell. 

I have set the editmode of the column to onvaluechange and now the CellValueChanged event fires as soon as the checkbox is checked. I can perform validation there and show a messagebox immediately if the validation fails. However if I uncheck the textbox from the CellValueChanged event, it doesn't take affect until the user leaves the cell.

I've tried using the CellValidation event but it doesn't fire until the user leaves the cell. 

How can I uncheck the checkbox and have it take effect immediately, without the user having the leave the cell?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Jun 2019
3 answers
237 views

I have a RadGridView using the VisualStudio2012Light theme which is exactly the style I want - I don't want anything to change when it comes to that at all, not the headers, summary rows, add new row, etc.

I have some columns with WrapText enabled so they will stretch and auto size their parent rows where needed if AutoSizeRows is enabled.

Now the problem comes in when AutoSizeRows is enabled. All non-data rows resize as well, breaking whatever heights were set as part of the theme. For maintainability I don't want to have to add explicit overrides/adjustments for heights in case the theme changes at a later stage. I am very happy with the theme and only want the rows to stretch in size and to never shrink below what the theme dictates.

I'm using 2016 Q1 and am battling to find the correct event and property combinations to only allow my data rows to resize - I figured that preventing autosizing of non-data rows is probably the cleanest fix for now I don't know if there is any request perhaps to prevent AutoSizeRows from shrinking already themed heights?

I've tried using the CreateRow event but can't figure out how to change enable/disable from there. The GridViewCreateRowEventArgs object has a RowElement property which hasn't been instantiated yet since the row doesn't exist. Must I instantiate that myself to set AutoSize to false? How would I create a default RowElement without changing anything else but that? If I can't use e.RowElement, how do I use e.RowInfo to set AutoSize to false?

I've tried using the RowFormatting event but to no avail.

 Any assistance on this would be greatly appreciated.

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Jun 2019
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
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
Rotator
TrackBar
MessageBox
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
ColorBox
Callout
FilterView
PictureBox
VirtualKeyboard
NavigationView
Accessibility
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
Flyout
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
DateOnlyPicker
TimeOnlyPicker
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
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?