Telerik Forums
UI for WinForms Forum
8 answers
507 views
Hi
I have the following code ..
 
Private Sub RadGridView1_CellFormatting (sender As Object, e As UI.CellFormattingEventArgs) Handles RadGridView1.CellFormatting
 
  If e.CellElement.ColumnInfo.Name = "Document" Then
  e.CellElement.ForeColor = Color.Red
 
  Else
  e.CellElement.ResetValue (LightVisualElement.ForeColorProperty, ValueResetFlags.Local)
  End if
         
  If e.CellElement.ColumnInfo.Name = "Document" Then
  If e.CellElement.RowInfo.Cells ("Document"). Value> = RadTextBox4.Text And e.CellElement.RowInfo.Cells ("Document"). Value <= RadTextBox5.Text Then
 
 
   e.CellElement.DrawFill = True
   e.CellElement.BackColor = Color.Yellow
   e.CellElement.ForeColor = Color.Blue
   e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Radial
   e.CellElement.Font = New Font ("Book Antiqua", 12.75 !, FontStyle.Bold)
 
 
    End if
    End if
End Sub
 
works perfectly !
Now I would like to add only the sum in the "Document" column that only e.CellElement.BackColor = Color.Yellow or also e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Radial have.
 
I would like to have this sum displayed in radlabel3.text, how do I get it there?
Nadya | Tech Support Engineer
Telerik team
 answered on 02 Jul 2020
16 answers
2.0K+ views
In the following thread I received help on creating a subclassed TimePicker bound to a TimeSpan CLR type:

http://www.telerik.com/community/forums/winforms/gridview/timepicker-column-in-radgridview-at-runtime.aspx

The app is using this custom editor to enter default personnel schedules. It would be very labor-saving to copy the ArriveTime and/or DepartTime on Monday and simply paste it into the corresponding cell in the rows below. That is my goal, and the users' wish, but it is not working for the following series of reasons:

I am marking the row as "dirty" (i.e. needs to be persisted) in the CellValueChanged event and then later testing to see if the row is dirty in the RowValidating event, and if so, I save it to the database. The aim here is to avoid much unnecessary database i/o; only "dirty" rows are written to the database.  However, the paste operation does not cause the CellValueChanged event to fire, and so the row is never marked as having been changed. 

QUESTION: Is there a code change I can make to the TimePicker that would cause a paste operation to fire the CellValueChanged  event?

void DFGRID_CellValueChanged(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
        {
            e.Row.Tag = "dirty";
        }


Todor
Telerik team
 answered on 02 Jul 2020
7 answers
814 views

Hello. I searched for similar problems in the threads but can't find one that solves my problem.

My form's KeyPreview property is set to true, and I have a code for Form_KeyDown event as follows:

private void Form_KeyDown(Object eventSender, KeyEventArgs eventArgs)
{
        ...some code
}

Now, when I press the ESC key inside one of the cells in edit mode, I expect the Form_KeyDown event to fire. But in this case, it does not. It only fires when the grid is not in edit mode.

How can I automatically trigger these form key events from the editors, without manually calling them from CellEditorInitialized?

 

Thank you in advance.

Nadya | Tech Support Engineer
Telerik team
 answered on 01 Jul 2020
1 answer
109 views

Is there a best way to clear contents of an unbound grid without removing the rows/columns?

RadGridView.Rows.Clear() is not desirable because it deletes the actual rows.

Nadya | Tech Support Engineer
Telerik team
 answered on 01 Jul 2020
3 answers
192 views
Hi,

I"m working with RadDiagram where I added several RadDiagramContainerShape and RadDiagramShape. The main container is a RadDiagramContainerShape and it is positioned at (0, 0) according to the RadDiagram.

When I click on the top left corner of the main container, at the red dot in the attached image, the button click is (41,39). Then I use PointToClient to get the position in the RadDiagram and I have (35, -40), knowing that it is supposed to be around (0, 0). Then to make sure of this I calculated the  PointToScreen using the main container location which is (0, 0). The result was (6, 79), but it is supposed to be around the button click (41,39).

In addition, when I drag and drop shapes to my main container it never goes to the cursor position because all what is mentioned above is not accurate.

Is this normal, and what can I do to fix this?
Thanks in advance for your help!
Peter
Telerik team
 answered on 01 Jul 2020
2 answers
70 views

I see that the CustomColors[] array is read only.

How can I assign a list of custom colors to a ColorDialogForm?

Thanks,

Jim

 

James
Top achievements
Rank 1
Veteran
 answered on 30 Jun 2020
2 answers
54 views

Hello

I am trying to modify programmatically the back color of the Grid Column Chooser.

I have tried setting the backcolor on the columnChoosercreated Event but I had no success

Thanks in advance for any advice on the matter

Pierre-Jean

pierre-jean
Top achievements
Rank 1
Veteran
Iron
 answered on 26 Jun 2020
3 answers
213 views

Hi,

 

I'm having a bit of an issue filtering old dates in my gridview.  By default, the datepicker select today's date.  Depending on the results and my dataset, the dates might be a couple fo years back (anywhere in between 1999 and 2020). 

 

Is there a quick way to browse through the different years on the datepicker?  At the moment, I can only switch 3 months back or forward using the arrows. 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Jun 2020
9 answers
1.3K+ views



I need DataValueField value from clientside. how to retieve RadAutoCompleteBox   DataValueField value from clientside? 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Jun 2020
3 answers
95 views

Hi All

 I am wondering if there is a way of changing the filtering to look more like the current version/s of excel.

The file grid.jpg is what the radgrid gives me, whereas the excel.jpg shows how to select multiple months, and select key ranges (this month, last month, between, etc).

 

Would i be able to replicate this with the gridview?

 

Also how can i change the filter logos so they are more visible when a column has a filter applied?

 

Ade

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Jun 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?