Telerik Forums
UI for WinForms Forum
2 answers
556 views

Hi.
I have a RadGridView that SelectionMode property is set to CellSelect.

Dictionary<int, string> drms = new Dictionary<int, string>();
 
private void ddlSetDurum_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
        {
            if (ddlSetDurum.SelectedIndex != 0)
            {
                drms.Clear();
 
                foreach (var item in rgvTakip.SelectedCells)
                {
                    int i = item.RowInfo.Index; // Works fine if no column filtering is done
                    if (!drms.ContainsKey(i))
                    {
                        drms.Add(i, rgvTakip.Rows[i].Cells["tkd"].Value.ToString());
                        rgvTakip.Rows[i].Cells["tkd"].Value = ddlSetDurum.SelectedText; 
                    }
                }
                isDurumSet = true;
                ddlSetDurum.SelectedIndex = 0;
            }
        }

 

After filtering by any column, when I try to get the row index of the selected cells, it gives me the index number in the rows created after the filtering process.

When I want to change the value of a cell using the obtained row index, this time it works according to the original table, not the filtered table.

So I have to get the original index number of that cell before filtering.

Nadya | Tech Support Engineer
Telerik team
 answered on 04 Jan 2021
1 answer
184 views

Hi, 

What is the method to clear or reset a layout diagram ?

I have tried the following without success ... 

        LayoutDiagram.DeselectAll()

        LayoutDiagram.Clear()

        LayoutDiagram.UndoRedoService.Clear()

        LayoutDiagram.Refresh()

Issue I am having is if there is a selected shape on the diagram, when I clear/re-add shapes, I am getting a strange side-effect where the shape's manipulation adorner becomes visible but the shape is no longer selectable. It looks like there is some "cache" behind the scenes that isn't clearing ? I would have expected LayoutDiagram.Clear is all I needed to call to reset to a "clean slate" ? Is this so ?

Kind regards,

Milan

 

 

Peter
Telerik team
 answered on 04 Jan 2021
5 answers
230 views

Hello,

I want to use the LoadOnDemand feature of the RadTreeView.

But the NodesNeeded event gets executed on unwanted occasions, such as if I set the form's Enabled property to False, if I use the FindNodes method, or if I refer to the RadTreeview control.

The utility of loading on demand then becomes a defect for me.

It would be good if this event was executed only once, when you want to load the node.

Am I doing something wrong?

Excuse my English. I am Francophone.

Thank you

Nadya | Tech Support Engineer
Telerik team
 answered on 30 Dec 2020
3 answers
2.2K+ views

Hello,
I want to remove a row from the grid, I remove it from the DataSet but it doesn't refresh in the grid. How do I make the grid update after deleting a row in the DataSet?
Is there a better way to do it? Maybe deleting the row in the grid?
What is the best strategy to do it?
I only want to do this in memory, since the update in the database is done with ADO and SQL statements.

Best regards.

 

My code:

            DataRow[] drr = dsHojaCalculo.Tables[0].Select("key_guid = '"+ esteAEliminarGuid+  "' ");
            foreach (var fila in drr)
            {
                fila.Delete();
                dsHojaCalculo.Tables[0].AcceptChanges();
            }

            gridHc.DataSource = null;
            gridHc.DataSource = dsHojaCalculo.Tables[0];



 

 

 

 

 

 

Nadya | Tech Support Engineer
Telerik team
 answered on 30 Dec 2020
1 answer
187 views

I have it mostly working but am having one issue.  I am trying to get the rowinfo in the target grid where the files are dropped.   Grid 1 has a one to many relationship to grid 2.  I am trying to drag data from grid 2 to a different in row in Grid 1.  I want to get the serialID field of the target row in Grid 1, but have not been able to find a way to get that info. 

 

Thank you as always.

Nadya | Tech Support Engineer
Telerik team
 answered on 30 Dec 2020
5 answers
337 views
Can I change printer for printing from GridView without PrinterDialog, but from code? (i.e. not default printer and not using PrinterDialog. I have to save printer by user and set it when it is needed)  
Krasimir
Top achievements
Rank 1
 answered on 30 Dec 2020
13 answers
289 views

Hi,

I have put the calendar into a popupeditor, the purpose is to choose a "from" and "to" date for filtering data. For that reason I'm trying to only allow 2 selected dates. It doesn't seem to be so straight forward, currently I tried to prevent more than 2 selected dates in the SelectionChanged and SelectionChanging event by using e.Cancel = true and some other stuff also. But it's like the events doesn't detect it before too many dates are selected?

The best scenario would be if there's a way to disable the "drag selection" so that it's only possiple to select a date by clicking a date.

 

In any case, how can this behavior be achieved? 

 

Thanks in advance!

Nadya | Tech Support Engineer
Telerik team
 answered on 29 Dec 2020
6 answers
184 views
I develop candlestick charts now. How to use Telerik UI for WinForms put candlestick series on the top and volume series on the bottom? (like 2020-12-24_16-38-06.png)
Nadya | Tech Support Engineer
Telerik team
 answered on 29 Dec 2020
3 answers
184 views

Hi. 

I tried to do the same for the example in this article, but there was no drop-down list. It also did not accept the values on the list.

CellIndex dataValidationRuleCellIndex = new CellIndex(0, 0);
  
ListDataValidationRuleContext context = new ListDataValidationRuleContext(worksheet, dataValidationRuleCellIndex);
context.InputMessageTitle = "Restricted input";
context.InputMessageContent = "The input is restricted to the week days.";
context.ErrorStyle = ErrorStyle.Stop;
context.ErrorAlertTitle = "Wrong value";
context.ErrorAlertContent = "The entered value is not valid. Allowed values are the week days!";
context.InCellDropdown = true;
context.Argument1 = "Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday";
  
ListDataValidationRule rule = new ListDataValidationRule(context);
  
worksheet.Cells[dataValidationRuleCellIndex].SetDataValidationRule(rule);

 

 

 

Nadya | Tech Support Engineer
Telerik team
 answered on 29 Dec 2020
1 answer
255 views

I need to loop through all controls/elements and child controls/elements on a form and disable the control/element if the Tag property = "someText".

The following code works for controls and child controls on the form, but not for radRibbonBar elements. 

=================================================
foreach (var control in GetControlHierarchy(this))
            {
                if (control.Tag != null)
                {
                    if (control.Tag.Equals("someText"))
                    {
                        control.Enabled = false;
                    }
                }
            }

 private IEnumerable<Control> GetControlHierarchy(Control root)
        {
            var queue = new Queue<Control>();

            queue.Enqueue(root);

            do
            {
                var control = queue.Dequeue();

                yield return control;

                foreach (var child in control.Controls.OfType<Control>())
                    queue.Enqueue(child);

            } while (queue.Count > 0);
        }
======================================================

How would I change the above code to include radRibbonBar elements?

Thank you,

Nadya | Tech Support Engineer
Telerik team
 answered on 29 Dec 2020
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?