Telerik Forums
UI for WinForms Forum
2 answers
250 views
I want to change the
backcolor of a listViewDataItem, then later on, change it back to the standard
color (ie white if it's not selected or the standard selection color of it's
selected).

I'm using this code to change the backcolor:

previewedListItem.BackColor = Color.Gold
previewedListItem.BackColor2 = Color.Gold
previewedListItem.BackColor3 = Color.Gold
previewedListItem.BackColor4 = Color.Gold

and this code to change it back:

previewedListItem.BackColor = Color.FromArgb(0, 0, 0, 0)
previewedListItem.BackColor2 = Color.FromArgb(0, 0, 0, 0)
previewedListItem.BackColor3 = Color.FromArgb(0, 0, 0, 0)
previewedListItem.BackColor4 = Color.FromArgb(0, 0, 0, 0)

The problem is that once I've changed it back, if the user selects that item,
it stays white instead of showing the selection color. How can I change the
color back in a way that will still show the selection color if the item is
selected?
Stefan
Telerik team
 answered on 12 Nov 2014
1 answer
127 views
In the UI for ASP.Net, the drop down control has an option 'AllowCustomText' which seems to be what I need for the UI for WinForms.  My users want to be able to select an item from a drop down box or type in a value that is not in the list.  I do not want the value they enter to be saved in the list.  Right now, when I set the drop down to 'DropDown' (as opposed to DropDownList) the user can edit the text, but as soon as they tab off the cell, it replaces what they typed with the nearest entry in the drop down.

I have seen some threads that discuss solutions, but they seem so cumbersome and all of them have the typed in value being added to the drop list.

Isn't there an easier way to implement this functionality?  (I'm on UI for WinForms 2014 Q1)
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Nov 2014
6 answers
146 views
This (to me) seems to be a bit of an odd one.

I have a RadTreeView, if I set the SortOrder to None,  then Drag'n'Drop features work .. as i'd expect.

If I set the SortOrder to Ascending;  then Drag'n'Drop appears to be switched off?


Am I missing something?   Is there a setting I need,  or do I have to either implement my own custom sorting or custom drag'n'drop?

Thanks
Brian.
David
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 10 Nov 2014
1 answer
897 views
Hi,

Is there a way to change a rowfont to Bold based on the criteria in the records?

Example: 
Where I have code "c2.RowFont.Bold = True", it gives me error that Property Bold is read only.

Private Sub SetConditions()
     Dim c1 As New ConditionalFormattingObject("Forecolor Black", ConditionTypes.Equal, "0", "20", True)
     c1.RowForeColor = Color.Black
     grd1.Columns("trd_typ").ConditionalFormattingObjectList.Add(c1)

     Dim c2 As New ConditionalFormattingObject("Forecolor Blue", ConditionTypes.Equal, "3", "", True)
     c2.RowForeColor = Color.Blue
     c2.RowFont.Bold = True
     grd1.Columns("trd_typ").ConditionalFormattingObjectList.Add(c2)

     grd1.TableElement.Update(False)
End Sub
Dimitar
Telerik team
 answered on 10 Nov 2014
1 answer
102 views
I want to programmatically tell the grid when to show the [+] hierarchy expand button.  Can this be done or do all the rows have to have this enabled?

I have a databound master and a load-on-demand child.  My problem is that not all rows make sense to have this template shown.  Below is how I am approaching this now. 

GridViewTemplate template = new GridViewTemplate();
 template.Columns.Add(new GridViewTextBoxColumn("Account"));
template.Columns.Add(new GridViewTextBoxColumn("CRM Opp ID"));
 gvAttainment.MasterTemplate.Templates.Add(template);

template.HierarchyDataProvider = new GridViewEventDataProvider(template);
 this.gvAttainment.RowSourceNeeded += new GridViewRowSourceNeededEventHandler(gvAttainment_RowSourceNeeded);

...

void gvAttainment_RowSourceNeeded(object sender, GridViewRowSourceNeededEventArgs e)
{
            
            switch (e.ParentRow.HierarchyLevel)
{

case 0:
                        //Query DB for data and display here
                        GridViewRowInfo row = e.Template.Rows.NewRow();
                        row.Cells["Account"].Value = from DB
Dimitar
Telerik team
 answered on 10 Nov 2014
1 answer
739 views
Hi.
I have a radgridview with a multi columns  and one column is a combobox , i want to validation row when user select a item in combobox on ValueChanged event in radgrid . how can i get value a cell (combobox) in radgridview on ValueChanged event  ?
plz help me .
Stefan
Telerik team
 answered on 10 Nov 2014
1 answer
137 views
Hi,

I get this exception trying to filter a column on a radgridview setup as "Excel-like" mode.

The colum shows the "Duration" and it is a "TimeSpan" databind type.

Any help would be appreciated.

Thanks

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Nov 2014
3 answers
536 views
Hi there.

I'm currently evaluating Telerik for an upcoming personal project.

The attached image is a very crude mock up of the type of look I'd like to achieve with the list view control, but I'm running into a few walls. Most other controls I've been able to work my way around but no so far with ListView.

I'm the control to show all items in ViewType ListView, Each item will have a thumb nail image, and I'd like to display a main header text (Series Name) with associated sub text of differing fonts and sizes. This is where I'm stumbling, any assistance would be greatly appreciated.

Stefan
Telerik team
 answered on 10 Nov 2014
5 answers
306 views
I'm writing a time entry program that will require a lot of time pickers on a single form. I have to do some math to add up the hours based on TimeIn and TimeOut for each shift.

I set the control to a default date and time on load. The trouble I'm having is when the user changes a time using the picker, the date reverts to the current date. The result is my date math is wrong. If the TimeIn date and time is set to 10/21/2014 1:00 AM on load and they change the time to 2:00 AM, I'm getting 10/24/2014 2:00 AM, which is a problem for my math.

1) Is there are way to format the radtimepicker to be time only and return a time only value? I don't care about the date portion at all. I'm just using these to get hours worked in a single day.

2) Alternatively, since I'm stashing the times in a database, is there someway to keep the date from changing? I can work with a fixed date for time calculations.

Thanks
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Nov 2014
3 answers
206 views

Based on the example here - http://www.telerik.com/help/winforms/multicolumncombobox-filtering.html
I cannot get the composite filters to work.  The single filter works fine.

Based on the code below, once I bind the data to the datasource, the DisplayMember is automatically set to the first column, in this case Account.  The documentation says the data is filtered by the DisplayMember field.  So this works fine for the single column filter.

For the composite filter, no filtering takes place.  You can see from the attached debug image that the filter is being set correctly.
  > Is it because the DisplayMember is only set to "Account"?
     > Can it be set to something that would work correctly (eg: Account, Description)?

If the composite filtering does not work, please remove it from the Telerik documentation or detail how to get it to work.  A two column drop down is a pretty simple example.  BTW I am on Winforms v2013.3.1127.40

Thanks!

Dim sSql As String = "Select Account, Description From accounts Order By Account"
cbo.DataSource = tbl
 
'THIS single filter section works fine
cbo.AutoFilter = True
Dim filter As New FilterDescriptor(cbo.DisplayMember, FilterOperator.Contains, "")
cbo.EditorControl.MasterTemplate.FilterDescriptors.Add(filter)
 
'THIS composite filter does not work - duplicated from Telerik example
 
'Dim cmpFilter As New CompositeFilterDescriptor()
'Dim fltMain As New FilterDescriptor(cbo.DisplayMember, FilterOperator.Contains, "")
'Dim fltDesc As New FilterDescriptor("Description", FilterOperator.Contains, "")
'cmpFilter.FilterDescriptors.Add(fltMain)
'cmpFilter.FilterDescriptors.Add(fltDesc)
'cmpFilter.LogicalOperator = FilterLogicalOperator.[Or]
'cbo.EditorControl.FilterDescriptors.Add(cmpFilter)


​

Dimitar
Telerik team
 answered on 07 Nov 2014
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
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
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
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?