Telerik Forums
UI for WinForms Forum
4 answers
604 views

I have a bar chart and I'm trying to get the name of the series when I click on the Label Element next to the bar.

However, I can't find any documentation on how to add a click event to the label element (in the image attached, I'm talking about the $10000 label).

I have a SelectedPointChanged event registered to my RadChartView control and that works great, but only works when the bar is clicked not the label next to it.

private void selectionController_SelectedPointChanged(object sender, ChartViewSelectedPointChangedEventArgs args)
{
 var series = args.NewSelectedSeries;
}

 

 

 

 

James
Top achievements
Rank 1
Veteran
 answered on 29 Feb 2020
1 answer
151 views

I'm using static BindingList as DataSource:

public class Items
{
    public static DateTime FechaTrabajo = DateTime.Today;
    public static MyBindingList<Pedidos> pedidos = new MyBindingList<Pedidos>();
    public static async Task Load(DateTime fechaTrabajo)
    {
        try
        {
            pedidos.Clear();
            FechaTrabajo = fechaTrabajo;
            pedidos.Add(await SSEService.Instance.GetPedidos(fechaTrabajo));
            pedidos.ListUpdated();
        }
        catch (Exception) { }
    }
}

 

Where MyBindingList extends BindingList and ListUpdated is like:

public void ListUpdated()
{
    this.OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, 0));
}

 

I'm using Items.pedidos as datasource for the Grid and all is working perfect, grid is updating data when needed, but when I need selectedrows, if Items.pedidos has had data and now is empty. When I call:

private void bNuevoPalet_Click(object sender, EventArgs e)
{
    int rows = this.radGridView1.Rows.Count;
    int srows = this.radGridView1.SelectedRows.Count;
    if (this.radGridView1.SelectedRows.Count > 0)
    {
        Pedidos ped = this.radGridView1.SelectedRows[0].DataBoundItem as Pedidos;
        if (ped != null)
        {
            fPedido.ShowMe(ped);
        }
    }
}

 

rows = 0

but srows = 1

 

Nadya | Tech Support Engineer
Telerik team
 answered on 28 Feb 2020
1 answer
205 views

I am working with the RadPdfViewer and RadPdfStreamWriter components, and I have the need to be able to display thumbnails of each page of a group of PDF documents and allow a user to re-arrange the thumbnails to group together into new documents. This is the digital equivalent of taking a stack of papers and laying them out on a table to pick and choose how to assemble the pages back into distinct documents

I understand how to display the individual documents and the thumbnails of the pages, and I understand how to merge and split PDF documents using the PdfStreamWriter and PdfStreamReader, but I have not found a way to load multiple documents into a single viewer control and allow users to re-order the thumbnails. Is this functionality that is supported in the current WinForms controls?

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Feb 2020
10 answers
3.3K+ views

Hi All,

I am using a datatable as datasource for my telerik gridview

Mygrd.Datasource=myDatatable

Then I made some changes to myDatatable

Now I need to update Mygrd, the following code doesn't seem to work
Mygrd.TableElement.Update(GridUINotifyAction.BatchDataChanged)
Mygrd.MasterTemplate.Refresh()
Also tried parameter "GridUINotifyAction.RowsChanged"  Doesn't work either

What do I need to do to update the grid ?

Thanks

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Feb 2020
3 answers
914 views

I've set the row span style, the selection is applied only for the single cell but I need it for the whole merged cell. I've added the code for your reference. Please check image & do the needful.

 

code :

MergeVertically(Me.rdgvRGrid, New Integer() {0, 1})

 

  Private Sub MergeVertically(radGridView As RadGridView, columnIndexes As Integer())
        Dim Prev As GridViewRowInfo = Nothing
        For Each item As GridViewRowInfo In radGridView.Rows
            If Prev IsNot Nothing Then
                Dim firstCellText As String = String.Empty
                Dim secondCellText As String = String.Empty

                For Each As Integer In columnIndexes
                    Dim firstCell As GridViewCellInfo = Prev.Cells(i)
                    Dim secondCell As GridViewCellInfo = item.Cells(i)

                    firstCellText = (If(firstCell IsNot Nothing AndAlso firstCell.Value IsNot Nothing, firstCell.Value.ToString(), String.Empty))
                    secondCellText = (If(secondCell IsNot Nothing AndAlso secondCell.Value IsNot Nothing, secondCell.Value.ToString(), String.Empty))

                    setCellBorders(firstCell, Color.FromArgb(209, 225, 245))
                    setCellBorders(secondCell, Color.FromArgb(209, 225, 245))

                    If firstCellText = secondCellText Then
                        firstCell.Style.BorderBottomColor = Color.White
                        secondCell.Style.BorderTopColor = Color.White
                        secondCell.Style.ForeColor = Color.Transparent
                    Else
                        secondCell.Style.ForeColor = Color.Black
                        Prev = item
                        Exit For
                    End If
                Next
            Else
                Prev = item
            End If
        Next
    End Sub

 

    Private Sub setCellBorders(cell As GridViewCellInfo, color As Color)
        cell.Style.CustomizeBorder = True
        cell.Style.BorderBoxStyle = Telerik.WinControls.BorderBoxStyle.FourBorders
        cell.Style.BorderLeftColor = color
        cell.Style.BorderRightColor = color
        cell.Style.BorderBottomColor = color
        If cell.Style.BorderTopColor <> Color.Transparent Then
            cell.Style.BorderTopColor = color
        End If
    End Sub

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Feb 2020
2 answers
697 views

Hi,

I am working on RadListView, reading files from folder, and display file in the folder along with icon(image), Issue is the icon doesn't resize according to the item size. Code is given below

           

the result is as following:

Kindly guide me how can I display the image according to the size of item;

Regards

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Feb 2020
3 answers
246 views


Hi,
I have a grid with 4 columns, 2 of the are of type GridViewDateTimeColumn. (FromDate and ToDate)

every time the user add a new row I have to set the ToDate column as 31/12/9999.
I do that on code and it works.

But then if the user want to edit that, when he change the date he cannot go back to set the date as 31/12/9999
the max value allowed is 31/12/9998.

I understand that the control set as maxValue 31/12/9998 but I need to be able to set dates as 31/12/9999 because my DB is expecting that and I cannot change it to 9998 (its an old program working for many years and I am not allowed to make changes in DB) 

So I need a workaround to be able to set a date as 31/12/9999.

thanks in advance
Iair
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Feb 2020
1 answer
280 views
Alternatively, is there a column type that will allow me to fill a cell with a custom image?  In that case I would just handle the clicks myself.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Feb 2020
1 answer
96 views

I am hoping to have a city, state, and name on a page as text box controls. How would I got about setting the datasource to only the results of the other textbox controls if there is a value entered? 

 

So if i have 5 people   with the following info

City      State      Name

Mil         WI         Tools

Mil          IL          Tools

Chi        WI         LLC

Chi         IL          ORG

La          CA        LLC

 

I want to be able to type into the city box 

MIL and then if i go  to the State or Name on it should only have the values of the top two rows

Nadya | Tech Support Engineer
Telerik team
 answered on 27 Feb 2020
6 answers
368 views

Hello!

Why does RowFormating event does not override the color for the pinned columns?

It only formats the unpinned columns of the GridView. The RowFormatting code bellow.

Can someone point me in the right direction?

Thank you very much!

Private Sub RadGridView1_RowFormatting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.RowFormattingEventArgs) Handles RadGridView1.RowFormatting
 
        If e.RowElement.RowInfo.Cells("Status").Value = "Finalizata" Then
            e.RowElement.DrawFill = True
            e.RowElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid
            e.RowElement.BackColor = Color.DimGray
        Else
            e.RowElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local)
            e.RowElement.ResetValue(LightVisualElement.GradientStyleProperty, Telerik.WinControls.ValueResetFlags.Local)
            e.RowElement.ResetValue(LightVisualElement.DrawFillProperty, Telerik.WinControls.ValueResetFlags.Local)
        End If
    End Sub

 

Ras Ran
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 25 Feb 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
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?