Telerik Forums
UI for WinForms Forum
10 answers
3.2K+ 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
862 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
665 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
150 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
251 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
79 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
333 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
8 answers
3.4K+ views

I found multiple requests back in 2009 for this feature and it appears it has been implemented.

According to this page, the DateTimePicker does have the ability to show both dates and times to choose.

https://www.telerik.com/products/winforms/datetimepicker.aspx

The page is marked as UI for Winforms and I have been trying to find out how to make the DateTimePicker to show both dates and times.

There is no code for it and no articles. This is for winforms.

Is this even possible?

 

Thanks.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Feb 2020
11 answers
1.2K+ views
Hi,

  I updated my applications to new version, Telerik 2012 Q1 but before I was using Telerik 2012. When I was testing the application I saw a grid doesn't display the value of the previous version of Telerik. When I set a value 12.379 the value is rounded to 12.38 and in the previous version I set a value 12.379 and it keeps the value.
 I'd like know how to do disable the round option when I set values like 12.379?

Example attached.

Thanks!
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Feb 2020
2 answers
121 views

Hi,

I am having troubles to Import PDF documents based on an Ownerpassword. Is there a way to open these documents?

The only info I find was based on Java:
https://docs.telerik.com/devtools/aspnet-ajax/api/server/Telerik.Pdf.Security/SecurityManager

Regards,
André

Tanya
Telerik team
 answered on 24 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
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?