Telerik Forums
UI for WinForms Forum
2 answers
84 views

Hi,

I'm currently working with a chartview where the y-axis contains seconds. I',m trying to convert the seconds to minutes and/or hours, depending on rather the amount of seconds is more or equal one or more hour/s.

How can I achieve this behavior?

 

Thanks in advance!

Nicklas
Top achievements
Rank 1
Veteran
 answered on 03 Mar 2020
1 answer
168 views

Hi,

We are setting the ResourcesPerView property as 3 for the rad-scheduler on code behind.
rdSched.ActiveView.ResourcesPerView = 10

Screeshot link
If it is not set, it shows 2 columns. But in existing project, it displays all the columns as mentioned on the below screenshot.
Existing Screenshot link
Without setting the ResourcesPerView is it possible to display the columns as per the screenshot?

 

Peter
Telerik team
 answered on 02 Mar 2020
4 answers
390 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
83 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
112 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
2.8K+ 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
684 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
546 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
105 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
211 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
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
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
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
Rotator
TrackBar
MessageBox
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ScrollBar
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
ColorBox
Callout
FilterView
PictureBox
VirtualKeyboard
NavigationView
Accessibility
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
Flyout
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
DateOnlyPicker
TimeOnlyPicker
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
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?