Telerik Forums
UI for WinForms Forum
3 answers
236 views

Hi

I have a problem updating the RadMultiColumnComboBox header when I retrieve which rows in the data grid are to be selected from the database.
the lines are selected with the lines that I set to true, but they are not put in the combo box header until I use the drop down function. Can this be solved or what am I doing wrong.

Private Sub FrmTestTelerik_Load(sender As Object, e As EventArgs) Handles Me.Load
        SetCheckStateToActvityTypes()
    End Sub

    Private Sub SetCheckStateToActvityTypes()
        For i As Integer = 0 To RadMultiColumnComboBox1.MultiColumnComboBoxElement.Rows.Count - 1
            Dim item As Object = RadMultiColumnComboBox1.MultiColumnComboBoxElement.Rows(i)
            Dim id As Integer = item.Cells(0).value
            If id = GetSelectetActivityTypeIDFromDB(id) Then
                RadMultiColumnComboBox1.MultiColumnComboBoxElement.Rows(i).Tag = Boolean.TrueString
                RadMultiColumnComboBox1.Refresh()

            End If
        Next
    End Sub

Best Regard

Stefan HÃ¥kansson Volvo Cars Sweden

 

Dinko | Tech Support Engineer
Telerik team
 answered on 05 May 2022
1 answer
129 views

hi ,I am using RadGridview and wanted to show the Columns in a vertical way and the rows horizontaly  is this possible ,if so can anyone please guide me .

thanks,

Med. 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 05 May 2022
0 answers
148 views

Hello all!  It's been a while :)

I'm working with your radDock control to give my Users a more graceful way of managing their visual data and so far it's working out quite well with one notable exception:

When a User has multiple DocumentWindow docked, the look and feel is fine (VS2012LightTheme) and looks like the image in DockSample1.  However, this is not the intended layout - it's merely the default for when new windows are opened.  Once opened my User move the windows to their desired locations as seen in image, DockSample2.  This is where the trouble is.

1) Which document has focus?  Only those with outstanding eyes can tell.

DockSample3 shows the effect I'm going for.  At a glance, this is only touching the BackColor of the TabStripItem but in fact I need to adjust all of the following:

BTW - I am GUESSING that this is a TabStripItem!  Please forgive me if i got this one wrong, and correct as needed :)

TabStripItem BackColor and Font Forecolor when Tab is ActiveWindow, Mouse Over and Not ActiveWindow

I did find a number of possible solutions in the Forums but most are for much older versions of Telerik UI for Winforms and did not translate.

Any help you can provide would be very helpful.

Kindest regards,

Curtis

 

 

 

 

 

 

Curtis
Top achievements
Rank 1
Iron
Iron
Veteran
 asked on 04 May 2022
2 answers
250 views

Hello.
In Winforms RadgridView, I'm trying to draw a border on the right side of the cell.
If I set RadGrid theme to "VisualStudio2022Light", the frame is not displayed. Other themes (not all) work good.

    Private Sub RadGridView1_CellFormatting(sender As Object, e As CellFormattingEventArgs) Handles RadGridView1.CellFormatting
        If e.CellElement.IsSelected Then
            e.CellElement.DrawBorder = True
            e.CellElement.BorderBoxStyle = Telerik.WinControls.BorderBoxStyle.FourBorders
            e.CellElement.BorderRightWidth = 1
            e.CellElement.BorderRightColor = Color.Red
        Else
            e.CellElement.ResetValue(LightVisualElement.DrawBorderProperty, ValueResetFlags.Local)
            e.CellElement.ResetValue(LightVisualElement.BorderBoxStyleProperty, ValueResetFlags.Local)
            e.CellElement.ResetValue(LightVisualElement.BorderRightWidthProperty, ValueResetFlags.Local)
            e.CellElement.ResetValue(LightVisualElement.BorderRightColorProperty, ValueResetFlags.Local)
        End If

How can I solve the problem without using VSB.

Regards

Jack

Jacek
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 04 May 2022
0 answers
286 views

Greetings,

With the given solution in this link it is possible to zip and unzip multiple files with a password, but I also need to zip and unzip folders with files in them. Considering there are folders and files in a single directory, how is it possible to zip them all with the same hierarchy of files and folders? I tested the solution in a scenario that there are folders in a directory and the result was taking out all files out of their corresponding folders and putting them all in one single zip file.

George C.
Top achievements
Rank 2
Iron
Veteran
 asked on 02 May 2022
1 answer
117 views

Hi, im using Hierarchy data that got stuck on show totals with gridviewgroup but the values always zero on childtemplate

i'm attached files with no group and it works fine. otherwise still zero if using group on childtemplate.

        private void SetDataGridTemplate()
        {
            this.datagrid.Columns.Clear();
            this.datagrid.GroupDescriptors.Clear();
            this.datagrid.Templates.Clear();
            this.datagrid.Relations.Clear();

            this.datagrid.Columns.AddRange(
                new GridViewDecimalColumn("idsub"),
                new GridViewTextBoxColumn("name"),
                    new GridViewTextBoxColumn("unit"),
                new GridViewDecimalColumn("price"));

            var child = new GridViewTemplate();
            child.Columns.AddRange(
                new GridViewDecimalColumn("idsub"),
                new GridViewTextBoxColumn("itemname"),
                new GridViewDecimalColumn("qty"),
                new GridViewTextBoxColumn("satuan"),
                new GridViewDecimalColumn("price"),
                new GridViewDecimalColumn("total"),
                new GridViewDecimalColumn("idcategory"),
                new GridViewTextBoxColumn("category")
                );
            this.datagrid.Templates.Add(child);
            var grupKategori = new GroupDescriptor
            {
                Format = "{0}{1}"
            };
            grupKategori.GroupNames.Add("idcategory", ListSortDirection.Ascending);
            grupKategori.GroupNames.Add("category", ListSortDirection.Ascending);
            this.datagrid.Templates[0].GroupDescriptors.Add(grupKategori);

            var item1 = new GridViewSummaryItem { Name = "price", Aggregate = GridAggregateFunction.Sum, FormatString = "" };
            var item2 = new GridViewSummaryItem { Name = "total", Aggregate = GridAggregateFunction.Sum, FormatString = "{0:0}" };
            var rowSummary = new GridViewSummaryRowItem(new[] { item1, item2 });
            this.datagrid.Templates[0].SummaryRowsBottom.Add(rowSummary);

            this.datagrid.Templates[0].ShowParentGroupSummaries = true;
            this.datagrid.Templates[0].ShowTotals = true;

            var relation = new GridViewRelation();
            relation.ParentTemplate = this.datagrid.MasterTemplate;
            relation.ChildTemplate = this.datagrid.Templates[0];
            relation.ParentColumnNames.Add("idsub");
            relation.ChildColumnNames.Add("idsub");
            this.datagrid.Relations.Add(relation);
        }

        private void buttonLoad_Click(object sender, EventArgs e)
        {
            this.SetDataGridTemplate();
            this.datagrid.DataSource = GetParentSource();
            this.datagrid.Templates[0].DataSource = GetChildSource();
        }

        private void datagrid_GroupSummaryEvaluate(object sender, GroupSummaryEvaluationEventArgs e)
        {
            switch (e.SummaryItem.Name)
            {
                case "idcategory":
                    string[] arr = e.Value.ToString().Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
                    string strvalue = e.Value.ToString();
                    if (strvalue.Contains(","))
                    {
                        arr = e.Value.ToString().Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                        if (arr.Length > 1)
                        {
                            e.FormatString = arr[1];
                        }
                    }
                    break;
                case "total":
                    switch (e.Parent)
                    {
                        case GridViewGroupRowInfo _:
                            e.FormatString = "{0:0}";
                            break;
                        case GridViewHierarchyRowInfo _:
                            e.FormatString = "{0:0}";
                            break;
                    }
                    break;
                case "price":
                    if (e.Parent is GridViewGroupRowInfo GroupRow)
                    {
                        e.FormatString = $"SubTotal {GroupRow.HeaderText}";
                    }
                    else if (e.Parent == this.datagrid.MasterView.ViewTemplate)
                    {
                        e.FormatString = "Total ";
                    }
                    else if (e.Parent is GridViewHierarchyRowInfo h)
                    {
                        e.FormatString = "Total ";
                    }
                    break;
            }
        }
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 May 2022
1 answer
115 views
Hello, I am setting items pragmatically to be pinned or not. I would like to show a little icon next to the pinned items at the top. How can I accomplish this? Thank you
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 May 2022
1 answer
98 views

Hi, 

I need to set a tooltip to a specific title of a child template of a hierarchical radgridview.

On column titles i can set it without problem using ViewCellFormatting event, but on tabbed childs template titles i can't.

(Radgridview for winforms)

Please help.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 May 2022
2 answers
334 views

I did some searching and finding it difficult to disable button(s) in RadGridView. 

I have a gridview with two buttons (Edit, Delete) then datacolumns in grid.

When Delete is pressed, I want to execute code, disable / hide Edit / Delete buttons on that row only.

I was able to disable the button but then all buttons are now being disabled on all rows.  Even though the buttons are disabled the commandcellClick is still executing when clicking on the disabled button.

I did add the CellFormatting  procedure but it executes so many times it's hard to know what row / cell it's on and when.

 private void gvResults_CellFormatting(object sender, CellFormattingEventArgs e)
        {
                if (e.ColumnIndex == 0)
                   {
                        RadButtonElement b = (RadButtonElement)e.CellElement.Children[0];
                        b.Enabled = false;
                        Debug.Print("Working on cell: " + e.CellElement.Value);
                    }
        }
tar
Top achievements
Rank 2
Iron
Iron
Iron
 updated answer on 29 Apr 2022
1 answer
192 views

Hi,

   I tried Telerik Radgridview Grouping using example in docs.telerik.com/devtools/winforms/controls/gridview/grouping/setting-groups-programmatically. But when ever i tried to group its showing Object not set to instance of  an Object error.

 

My input data looks like this

 

 

My Group descriptor code looks like this

My Error looks like this

 

I am not sure why i am getting this error. I just wanted to group the data by DevelopmentPart.

 

And also if you have any small sample project for gridview can you provide?

 

Regards

Harsha

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 29 Apr 2022
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
ProgressBar
CheckedDropDownList
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
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?