Telerik Forums
UI for WinForms Forum
1 answer
221 views

Hello,

How Draw into cell of gridview ???

Thanks for you help

My sample of code below :

Dim oRadGridView as RadGridView = new RadGridView()

Dim oPDFExporter As New GridViewPdfExport(oRadGridView)
With oPDFExporter
   AddHandler .CellFormatting, AddressOf oPDFExporter_CellFormatting
   AddHandler .CellPaint, AddressOf oPDFExporter_CellPaint
   .PageMargins = New Padding(10, 10, 10, 10)
   .ExportSettings = oPdfExportSettings
   If bLandScape Then
     .PageSize = New SizeF(297, 210)
   Else
     .PageSize = New SizeF(210, 297)
   End If
  .ShowHeaderAndFooter = True
  .FileExtension = ".pdf"
  .HiddenColumnOption = HiddenOption.DoNotExport
  .ShowHeaderAndFooter = True
  .HeaderHeight = iHeightHeader
  .HeaderFont = New System.Drawing.Font("Arial", 8, FontStyle.Regular)
  .LeftHeader = sLeftHeader
  .MiddleHeader = sMiddleHeader
  .RightHeader = sRightHeader
  .ReverseHeaderOnEvenPages = True
  .FooterHeight = 30
  .FooterFont = New System.Drawing.Font("Arial", 8, FontStyle.Regular)
  .SummariesExportOption = SummariesOption.ExportAll
  .ExportGroupedColumns = True
  .ExportHeaderRowOnEachPage = True
  '.FitToPageWidth = True
  Using oMemoryStream As New MemoryStream()
     Dim oRenderer As New PdfExportRenderer
     .RunExport(oMemoryStream, oRenderer)
     Using oFileStream As New FileStream(sPDFDocumentName, FileMode.Create, FileAccess.Write)
       oMemoryStream.WriteTo(oFileStream)
     End Using
     oRenderer = Nothing
   End Using
End With
oPdfExportSettings = Nothing
oPDFExporter = Nothing

Private Sub oPDFExporter_CellFormatting(sender As Object, e As PdfExportCellFormattingEventArgs)

End Sub

Private Sub oPDFExporter_CellPaint(sender As Object, e As ExportCellPaintEventArgs)
            Dim oPDFExporter As GridViewPdfExport = DirectCast(sender, GridViewPdfExport)
            Dim oRadGridView As RadGridView = oPDFExporter.RadGridViewToExport
            With e
                .Cell.TextWrap = True
                Dim oSize As SizeF = .Rectangle.Size
                Dim iX As Integer = .Rectangle.X + (oSize.Width - 20)
                Dim iY As Integer = .Rectangle.Y
                Select Case .Cell.ColumnIndex
                    Case "column_category"
                        If oRadGridView.Rows(e.Cell.RowIndex).Cells(13).Value = True Then
'HOW DRAW INTO CELL ?????
                            '.Cell.Graphics.DrawString("€", New System.Drawing.Font("Segoe UI", 11), Brushes.Blue, New PointF(iX, iY))
                        End If
                End Select
                oSize = Nothing
            End With
            oRadGridView = Nothing
            oPDFExporter = Nothing
End Sub

Dimitar
Telerik team
 answered on 08 Jun 2017
1 answer
133 views

Hi there,

I'm trying to recreate the "drag column to group by it" feature shown in the animation on this webpage:

http://www.telerik.com/support/kb/winforms/gridview/details/high-performance-with-radgridview-and-virtual-mode-including-filtering-sorting-and-grouping

Neither of the 2 C# projects at the bottom of the page have the drag grouping feature enabled by default.

Trying to drag a column header onto the grouping row causes a "invalid operation" cursor icon to be displayed

Please could you look into this and advise on how to get the demo source code giving the same results as the animation ?

Many thanks in advance,

 

James

 

 

 

 

 

Hristo
Telerik team
 answered on 08 Jun 2017
3 answers
118 views

I have recently updated to the latest version from 2016 Q1 and noticed a change in the way the RadTextBox displays when the Visual Studio 2012 Light theme is used.

The issue is easily reproduced by creating a new project and adding a RadTextBox with AutoSize as false and a Height of 20. Everything displays normally under the default theme.

Now add the Visual Studio 2012 Light theme and set the RTB to use it. The bottom of the RTB disappears. Not good. It isn't happy with anything under a Height of 24.

How can this issue be resolved? I've encountered similar issues with this theme in the past and I was not expecting the update to the latest version to break something which has been working just fine under older versions.

Dimitar
Telerik team
 answered on 08 Jun 2017
0 answers
103 views

Hi,

When i use "radGridView1.Rows.Clear();" to clear rows from gridview, rows are removed in background but not visually until i click on expanding mark (+)

I want to know how to clear gridview rows in background and visually

Ahmed
Top achievements
Rank 1
 asked on 07 Jun 2017
1 answer
163 views

I cannot seem to get the AnimatedPropertySetting to work with a radRadialGauge. We have this code to update the gauge from serial data approx every 5 seconds (via delegate):

public void DisplayTempChart(float temperature)  

 {             

//radialGaugeNeedle1.Value = temperature;   <----- when this is uncommented, the needle responds correctly         

AnimatedPropertySetting setting = new AnimatedPropertySetting(                 <----- this property setting never works, the needle is never updated

    RadRadialGaugeElement.ValueProperty,                 

     this.radRadialGauge1.Value,                  

     temperature,                 

     12,                 
     40);              

setting.ApplyEasingType = RadEasingType.OutBounce;              

setting.ApplyValue(radRadialGauge1.GaugeElement);         

}

 

Any help is appreciated!

Dimitar
Telerik team
 answered on 07 Jun 2017
2 answers
187 views

Hi There,

I have created a marker called Car. This marker has a property called m_sLicensePlate.

How can i find that specific marker based on this property. The markers are in a specific layer.

My idea is something like :

 

Car findMarker(string p_sLicensePlate)

{

MapLayer carLayer = new MapLayer("Cars");

 

foreach (Car Item in carLayer.....)

{

    if (Item.m_sLicensePlate == p_sLicensePlate) return Item;

}

return null;

}

Victor
Top achievements
Rank 2
 answered on 06 Jun 2017
1 answer
171 views

I was recently put in charge of updating a very old screen. It uses nested gridviews to drill down the mapping structure of a file. IE There is a list of files in the master template, detail template and file layout template among other child templates below these. 

    I need to insert a subdetail template for certain cases that then opens into the file layout template. Can I do this? In certain cases I want to display the detail then subdetail, and finally the file layout template while still being able to go from detail to layout for other entries (files). If it will work this way, I can have file layout and subdetail be tabs on the same level, I just need to have subdetail open the file layout below it. 

I have access to the latest Telerik version, though the program was written with an older version. 

Dimitar
Telerik team
 answered on 06 Jun 2017
3 answers
92 views
Hi,
I have MultiColumn ComboBox Filtering and when writing arabic in the filter, it does not return ant thing !!!
Does it support Arabic? If Not, How does it?
Hristo
Telerik team
 answered on 06 Jun 2017
11 answers
1.2K+ views
The Intellisense for CancelEdit says that it closes the active editor and discards the change. It seems to be closing the active editor but NOT discarding the change.

I tried using the CellValidating event similar to this post:

http://www.telerik.com/community/forums/winforms/gridview/validating-user-input.aspx

But e.Cancel also does not discard the change.

Here is my scenario:
1) User enters a new value.
2) In the CellValidating event, the system displays a dialog asking for the reason for the change.
3) User cancels from that dialog.
4) Code needs to discard the change and close the active editor.

Using myGrid.CancelEdit closes the active editor but does not discard the change. Using e.Cancel seems to do nothing.

How do I end the edit and discard the change to a cell?

Thanks!
Hristo
Telerik team
 answered on 05 Jun 2017
1 answer
278 views

I'm using the collapsible panel with expand direction = right.  I'd like to increase the size (at least the height anyway) of the button because the app is used on a touch screen so the pointer device is a fat finger and not a mouse.  I set the font size to 14pt so the width is probably ok.  How do I set to the size of that button?

While I'm asking, can I also set the width of that header (expand direction right)?  And an alternative would be to enable clicking on the header to execute the collapse/expand action.  Would you offer that solution, too?

Thank you,

Gary

Hristo
Telerik team
 answered on 05 Jun 2017
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?