Telerik Forums
UI for WinForms Forum
2 answers
172 views

I want to achieve functionality of Re-Ordering Rows In a Grid.

Requirement:
User will Select Row and Click on Up Button on UI to shift that on Up direction. Example If user select 3rd row from top and then click on up then it must shift that row to 2 position from top.
Also the which was on 2nd postion from top now comes on 3rd from top 

Below code I tried but not working Properly When Rows are More than 2 in a grid:

private void btnInternalUp_Click(object sender, EventArgs e)
    {

for (int index = 0; index < this.m_grdGridControl.SelectedRows.Count; index++)
{
var currentRow = this.m_grdGridControl.SelectedRows[index];
int currentIndex = currentRow.Index;
int nextIndex = NextIndex(this.m_grdGridControl, currentIndex, "up");                    
this.m_grdGridControl.MasterTemplate.Rows.Move(currentIndex, nextIndex);
   
}

    }

//NextIndexMethod Return the index where row need to be shifted:

public static int NextIndex(RadGridView grd,int currentIndex,string direction)
    {
        int nextIndex;
        if (direction.ToLower() == "up")
        {
            if(currentIndex == 0)
            {
                nextIndex = 0;
            }
            else
            {
                nextIndex = currentIndex - 1;
            }
        }
        else
        {
            if(currentIndex == grd.Rows.Count - 1)
            {
                nextIndex = currentIndex;
            }
            else
            {
                nextIndex = currentIndex + 1;
            }
        }

        return nextIndex;
    }

 

Shubham
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 10 Jul 2023
1 answer
175 views

Hello, 
we are using OpenEdge 10.2B and have quite a few files with OCX controls which we would like to change to use Telerik controls.  

Right now I'm focused on replacing progress bars to use RadProgressBar.

What I've done so far is created a ProgressBar.cls which has the RadProgressBar and a cancel button in it's own window.  The progress bar window is shown overtop of the calling window and is updated accordingly.  It works well, we were just hoping we could keep them in the same window.

Is it possible to use Telerik controls in a .w file?  Or are we going to need to rebuild each program that uses an OCX control to achieve this?

Dinko | Tech Support Engineer
Telerik team
 answered on 07 Jul 2023
1 answer
247 views
Hi,

I am trying to use the radColorDialog but its not showing on top of my main form.

The main form is set to TopMost to ensure its at the top (the app has other forms open)

From the main form I am calling:
private void button1_Click(object sender, EventArgs e)
        {
            this.TopMost = true;
            this.BringToFront();

            radColorDialog1.Reset();
            
            if (radColorDialog1.ShowDialog(this) == DialogResult.OK)
            {

            }
            
        }

This is winforms .net7 I am only using this one Telerik control UI.for winforms... (2023.2.606)

I would expect the dialog to above the main form.

I tried the colourBox and it has the same issue.
Dinko | Tech Support Engineer
Telerik team
 answered on 06 Jul 2023
1 answer
111 views
I have uninstalled/reinstalled Visual Studio, added & removed controls, restarted, etc.  Windows 10, VS 2015
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Jul 2023
1 answer
102 views

In the screen mockup below, is it possible to include a subgrid header like the onr that reads "Reference Information" when there is only a single grid at that level?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Jul 2023
1 answer
111 views

Hello,

I have a RadGridView with a GridViewMaskBoxColumn that has a DateTime mask of 'd', EnableNullValueInput set to true, and MaskType set to FreeFormDateTime. The CTRL+DEL does clear the box, but when I leave the box the current date is automagically filled. In CellValidating, CellValueChanged, CellValueNeeded, and UserAddingRow I assign the cell value to null if there is no current value in the cell or if it's whitespace or if it's an empty string. 

I see on this Parsing Dates Page under Date evaluation that "incomplete dates are always evaluated taking the current date as a basis". Can I override this behavior so a null cell can stay a null cell? If yes, how?

 

Thank you.

Dinko | Tech Support Engineer
Telerik team
 answered on 05 Jul 2023
1 answer
110 views

Hi,

I have a RadGridView that is the AssociatedObject of a RadPrintDocument that I want to print via a PrintDialog:

private PrintDialog printDialog;
RadPrintDocument doc = new RadPrintDocument
{
	AssociatedObject = radGridHistorie
};

printDialog.Document = doc;
printDialog.AllowSelection = true;

if (printDialog.ShowDialog() == DialogResult.OK)
{
	doc.Print();
}

 

If I select "All" in the PrintDialog, all entries are printed on the document.

If I select "Selection" in the printDialog after having Rows selected in the GridView, no entries are on the printed document.

What is wrong?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 04 Jul 2023
4 answers
304 views

Hi

I want to copy data from RadGridView1 to another RadGridView2.  I want to copy selected row from datagridview 1 using checkbox to another datagridview2. and selected rows should be removed from datagridview1.

And if i selected from datagridview2 it should moved again to datagridview1.

 

For Each row As GridViewDataRowInfo In Me.RadGridView1 .Rows
                  if  row.Cells(0).Value = true  then''Checkbox column

                 dim i as int16= Me.RadGridView2.add

                Me.RadGridView2.rows(i).cells(0).value= row.cells(0).vlaue.tostirng

         End If
Next row

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 04 Jul 2023
1 answer
102 views

I have a rad ribbon sittng above a table layoutpanel. when I open the backstage view from startmenubutton it opens in one of the cells of the Tablelayoutpanel rather than overlaying all the content and filling the screen. how do I resolve this

 

Dinko | Tech Support Engineer
Telerik team
 answered on 04 Jul 2023
2 answers
187 views

I can't seem to get FreezePanes to work.

I have a sheet populated with nothing but test character data:

I tried to freeze the top 3 rows, and the left-most 3 columns:

        mySpreadsheetControl.Workbook.Worksheets(0).ViewState.FreezePanes(3, 3)

Nothing seems to happen.

The RibbonBar menu option, to freeze either the top row or the left-most column does work. (why do I have to choose?)

Am I missing something?

Ian
Top achievements
Rank 2
Bronze
Bronze
Iron
 answered on 03 Jul 2023
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)
Chart (obsolete as of Q1 2013)
Form
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
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?