Telerik Forums
UI for WinForms Forum
1 answer
145 views

Hi,
    1.  How to get radtreeview drag and drop event to handle to get source and destination full path node using vb.net. I tried but i can get both source and destination as same node. I provide treeview node sample structure.

Family
     ----Father
             ---Son1
             ---Son2
     ----Mother
             ---Son3
             ---Son4

 Here i drag and drop Son4 under the Son1, so i need to get source as Family/Mother/Son4 and destination as  Family/Father/Son1/Son4.

2. How to restrict to drop nodes in level 1(Family) and  level 3 (Son1,Son2,Son3,Son4), i need to move nodes Son1,Son2,Son3,Son4 under Father and Mother node, not to create child node under Son1,Son2,Son3,Son4, I mean move Son2 above Son1, same like Son4 move above Son3 and also move Son3 or 4 move to below Father node, same like Son1 or 2 move below Mother as child node.


Please reply asap.

Regards
Aravind
Aravind
Top achievements
Rank 2
Iron
Iron
Iron
 updated question on 22 May 2023
0 answers
102 views
Hi, please tell me how to move rows in grid with bindingsource and the selfreference mode. And if you turn on the sort mode, then dragging stops working altogether.
alex
Top achievements
Rank 2
Iron
 updated question on 21 May 2023
1 answer
150 views

When I load data into  my sheets, where there are columns which have a lot of data  (long descriptions of things)  and I use 'autoFitWidth to make things look sensible, I end up with some very wide columns, as expected.

Where a column is wider than the viewable area, left and right scroll often don't do anything: the sheet still shows one column. It seems to want to show all of a column, so after a while, it jumps to the next wide column.

(zipped video below)

This is strange behaviour, and also means that my users can not figure out how to re-size one of these wide columns, and then use word wrapping to make it easier to read.

Have I done something bad to my data to make it do this ? Or is there a setting somewhere to make the scrolling smooth?

Thanks

Anna
Telerik team
 answered on 19 May 2023
0 answers
91 views
Hi! Why is the value of the selected cell in RadGridView shifted to the left, how can I fix this? Table in mode grid.Relations.AddSelfReference() (like TreeView)
alex
Top achievements
Rank 2
Iron
 updated question on 19 May 2023
1 answer
125 views

Hi guys,

I have been searching for a correct answer for that, but without success. It looks like work in C# but not in VB.

I want to implement a TAB between the rows in this sample project. Any idea what is missed?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 May 2023
1 answer
101 views

There are hundreds of installed examples but they're all without projects. Putting them in a project results in many build errors.

 

What is the procedure for running the examples?

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 May 2023
1 answer
128 views

I'm using the built-in 'Fluent' Theme, and one bit I don't like is that by default the color of the text in a text box (and same for most other controls) is a mid-grey. This only turns to black when the mouse hovers over it.

Is there a simple way to change this behaviour?  To make it black all the time? It's making it hard to take video of my application being used, because the text is quite pale.

Oh, and PLEASE don't tell me that 'I just need to edit the Theme' - I don't make changes to themes very often, and each time I do, I have to re-discover how powerful - and complicated - it is. :-)

 

Dinko | Tech Support Engineer
Telerik team
 answered on 17 May 2023
2 answers
117 views

Hi,

I have used RadListControl.ScrollToItem to bring a searched for item into view,thi sbrings it into view but either at top or bottom of the list. Is it possible to somehow center the selected item in the middle of the view so that I can obtain context based on surrounding items ?

Many thanks

Toby

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 May 2023
1 answer
163 views

Hi. 

I have a grid which have a lot of columns. 

20 of the columns are of decimal data type and I need to show their total. But some rows should not be included in the total.

I tried two different approaches to do this, both approaches had different problems.

This is my data model class


public class SgkThkk : SgkAssistantBase
    {
        public string cn { get; set; } = "";
        public DateTime tya { get; set; } = DateTime.Now;
        public string bm { get; set; } = "";
        public string sgm { get; set; } = "";
        public decimal tp { get; set; } = 0;
        public decimal ip { get; set; }= 0;
        public decimal kn14857 { get; set; }= 0;
        public decimal kn15921 { get; set; }= 0;
        public decimal kn6645 { get; set; }= 0;
        public decimal kn15510 { get; set; }= 0;
        public decimal kn2828 { get; set; }= 0;
        public decimal kn6111 { get; set; }= 0;
        public decimal kn17103 { get; set; }= 0;
        public decimal kn17103i { get; set; }= 0;
        public decimal kn27103 { get; set; }= 0;
        public decimal kn27103i { get; set; }= 0;
        public decimal kn37103 { get; set; }= 0;
        public decimal kn37103i { get; set; }= 0;
        public decimal kn7252 { get; set; }= 0;
        public decimal kn17256 { get; set; }= 0;
        public decimal kn7316 { get; set; }= 0;
        public decimal kn7319 { get; set; }= 0;
        public decimal kn5510 { get; set; }= 0;
        public decimal kn4857 { get; set; }= 0;
        public decimal kn159210 { get; set; }= 0;
        public decimal kn3294 { get; set; }= 0;
        public decimal odenecek { get; set; }= 0;
        public string pdfPath { get; set; } = "";
        public bool onayli { get; set; } = true;
}

Purpose: exclude lines with "İPTAL" in the 'bm' column from the total

1st approach is to use CustomSummaryItem

public class CustomSummaryItem : GridViewSummaryItem
    {
        public CustomSummaryItem()
            : base()
        { }

        public override object Evaluate(IHierarchicalRow row)
        {
            decimal totalPos = 0;
            foreach (GridViewRowInfo childRow in row.ChildRows)
            {
                if ((childRow is GridViewGroupRowInfo) == false)
                {

                    string bm = childRow.Cells["bm"].Value.ToString();

                    if (bm != "İPTAL")
                    {
                        totalPos += Convert.ToDecimal(childRow.Cells[this.Name].Value);
                    }
                }

            }
            return totalPos;
        }
    }

And this is the method that adds a summary row to the grid

public void AddSummariesToTHKK(RadGridView rgv)
        {
            rgv.MasterTemplate.AutoExpandGroups = true;
            rgv.GroupDescriptors.Clear();
            rgv.GroupDescriptors.Add(new GridGroupByExpression("cn Group By cn"));
            rgv.SummaryRowsBottom.Clear();

            rgv.MasterTemplate.ShowTotals = true;

            List<GridViewSummaryItem> lstSum = new List<GridViewSummaryItem>();
            CustomSummaryItem tptSum = new CustomSummaryItem(); tptSum.Name = "tp"; tptSum.Aggregate = GridAggregateFunction.Sum;  tptSum.FormatString = "Toplam: {0:C}"; lstSum.Add(tptSum);

            CustomSummaryItem ipSum = new CustomSummaryItem(); ipSum.Name = "ip"; ipSum.Aggregate = GridAggregateFunction.Sum; ipSum.FormatString = "Toplam: {0:C}"; lstSum.Add(ipSum);
            CustomSummaryItem kn14857Sum = new CustomSummaryItem(); kn14857Sum.Name = "kn14857"; kn14857Sum.Aggregate = GridAggregateFunction.Sum; kn14857Sum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn14857Sum);
            CustomSummaryItem kn15921Sum = new CustomSummaryItem(); kn15921Sum.Name = "kn15921"; kn15921Sum.Aggregate = GridAggregateFunction.Sum; kn15921Sum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn15921Sum);
            CustomSummaryItem kn6645Sum = new CustomSummaryItem(); kn6645Sum.Name = "kn6645"; kn6645Sum.Aggregate = GridAggregateFunction.Sum; kn6645Sum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn6645Sum);
            CustomSummaryItem kn15510Sum = new CustomSummaryItem(); kn15510Sum.Name = "kn15510"; kn15510Sum.Aggregate = GridAggregateFunction.Sum; kn15510Sum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn15510Sum);
            CustomSummaryItem kn2828Sum = new CustomSummaryItem(); kn2828Sum.Name = "kn2828"; kn2828Sum.Aggregate = GridAggregateFunction.Sum; kn2828Sum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn2828Sum);
            CustomSummaryItem kn6111Sum = new CustomSummaryItem(); kn6111Sum.Name = "kn6111"; kn6111Sum.Aggregate = GridAggregateFunction.Sum; kn6111Sum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn6111Sum);
            CustomSummaryItem kn17103Sum = new CustomSummaryItem(); kn17103Sum.Name = "kn17103"; kn17103Sum.Aggregate = GridAggregateFunction.Sum; kn17103Sum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn17103Sum);
            CustomSummaryItem kn17103iSum = new CustomSummaryItem(); kn17103iSum.Name = "kn17103i"; kn17103iSum.Aggregate = GridAggregateFunction.Sum; kn17103iSum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn17103iSum);
            CustomSummaryItem kn27103Sum = new CustomSummaryItem(); kn27103Sum.Name = "kn27103"; kn27103Sum.Aggregate = GridAggregateFunction.Sum; kn27103Sum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn27103Sum);
            CustomSummaryItem kn7252Sum = new CustomSummaryItem(); kn7252Sum.Name = "kn7252"; kn7252Sum.Aggregate = GridAggregateFunction.Sum; kn7252Sum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn7252Sum);
            CustomSummaryItem kn17256Sum = new CustomSummaryItem(); kn17256Sum.Name = "kn17256"; kn17256Sum.Aggregate = GridAggregateFunction.Sum; kn17256Sum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn17256Sum);
            CustomSummaryItem kn7316Sum = new CustomSummaryItem(); kn7316Sum.Name = "kn7316"; kn7316Sum.Aggregate = GridAggregateFunction.Sum; kn7316Sum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn7316Sum);
            CustomSummaryItem kn7319Sum = new CustomSummaryItem(); kn7319Sum.Name = "kn7319"; kn7319Sum.Aggregate = GridAggregateFunction.Sum; kn7319Sum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn7319Sum);
            CustomSummaryItem kn5510Sum = new CustomSummaryItem(); kn5510Sum.Name = "kn5510"; kn5510Sum.Aggregate = GridAggregateFunction.Sum; kn5510Sum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn5510Sum);
            CustomSummaryItem kn4857Sum = new CustomSummaryItem(); kn4857Sum.Name = "kn4857"; kn4857Sum.Aggregate = GridAggregateFunction.Sum; kn4857Sum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn4857Sum);
            CustomSummaryItem kn159210Sum = new CustomSummaryItem(); kn159210Sum.Name = "kn159210"; kn159210Sum.Aggregate = GridAggregateFunction.Sum; kn159210Sum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn159210Sum);
            CustomSummaryItem kn3294Sum = new CustomSummaryItem(); kn3294Sum.Name = "kn3294"; kn3294Sum.Aggregate = GridAggregateFunction.Sum; kn3294Sum.FormatString = "Toplam: {0:C}"; lstSum.Add(kn3294Sum);
            CustomSummaryItem odeSum = new CustomSummaryItem(); odeSum.Name = "odenecek"; odeSum.Aggregate = GridAggregateFunction.Sum; odeSum.FormatString = "Toplam: {0:C}"; lstSum.Add(odeSum);

            GridViewSummaryRowItem sumTopRow = new GridViewSummaryRowItem();
            sumTopRow.AddRange(lstSum);
            rgv.SummaryRowsBottom.Add(sumTopRow);

            rgv.BottomPinnedRowsMode = GridViewBottomPinnedRowsMode.Fixed;
            rgv.MasterView.SummaryRows[0].IsPinned = true;
            rgv.MasterView.SummaryRows[0].PinPosition = PinnedRowPosition.Bottom;
        }

With this approach, grand totals always show 0

The result is like below

CustomSummaryRow result 

CustomSummaryRow result

2nd approach is to subscribe to the GroupSummaryEvaluate event of the grid

private void rgvSgkOtomasyon_GroupSummaryEvaluate(object sender, GroupSummaryEvaluationEventArgs e)
        {
            decimal value = 0;
            foreach (GridViewRowInfo row in this.rgvSgkOtomasyon.Rows)
            {
                if (row.Cells["bm"].Value.ToString() == "İPTAL" || !e.SummaryItem.FormatString.Contains("0:C")) continue;
                value += (decimal)row.Cells[e.SummaryItem.Name].Value;
            }

            e.Value = value;
        }
There are two major problems with this approach when we group by any column.
1- The same number appears under the groups in the summary row and the grand total row. (all show the grand total of the column)
2- "0" replaces the name of the grouped column

There is no problem when we do not group by any column.

Here is the result

GroupSummaryEvaluate result

GroupSummaryEvaluate result

Thank you in advance for your help

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 16 May 2023
9 answers
736 views

I have a listview with 5 columns, I want the 4th column of each row of the list box to have a backcolor which is specified by the user, (it's a visual representation of what they will see later in the program)  I created a ListViewDataItem to capture all the info to be displayed in the listview, but I can't seem to get it to change the backcolor of a specific column.

 

please advise.

 

thanks

Jason

Henri
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 16 May 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
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
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
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
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?