Telerik Forums
UI for WinForms Forum
1 answer
99 views
Hi everyone,

I'm working on a project in WinForms using the Telerik library. We previously used the Q2 2009 version of the library. In our project we use a RadComboBox wich is contains a bunch of default answers.But the combo accept custom text and when the user select a default answer, in the SelectedIndexChanged event we add to the text of the combo the selected awser seperated from the original text (saved in the tag of the combo when the dropdown is opened) by a " - ".

Here is the code :

private void rcbElement_SelectedIndexChanged(object sender, EventArgs e) 
            RadComboBoxEditorElement rcbe = (RadComboBoxEditorElement)sender; 
             
            rcbe.Text = (rcbe.Tag.ToString() == "" ? "" : rcbe.Tag + (rcbe.Text == "" ? "" : " - ")) + rcbe.Text; 
            rcbe.SelectedText = ""
            rcbe.Tag = rcbe.Text; 

But now with the new version (Q1 2010 SP2) this doesn't work anymore. The text of the combo remains the text of the selected item. How can we do that with the new version ?

[Nean]
Victor
Telerik team
 answered on 25 May 2010
1 answer
120 views
Hello,
Strange thing when using your RadComboBox.
I have a comboBox bind to a dataTable.
When I'm trying to change the value of the comboBox It stay NULL.

Now, I check this And I've noticed something strange:
In debug, When I'm standing on the object "radComboBox1.selectedValue" I see the a value (lats say) '12345'.
If I click on the value it self (I'm using visual studio 2008) It goes into edit mode and then I see that the value is actually: '12345M'.

I don't have a clue where this 'M' come from. It doesn't appear  any where in my sql,datatable or code.

I tried the some code with a simple comboBox And it was fine (with out the 'M').

Do you know this behavior?

Thanks,
Roy.
Svett
Telerik team
 answered on 25 May 2010
1 answer
100 views
I am trying to achieve a page up/down functionality for a Point of sale.

Lets say the case where i have a listbox
Achored on all sides, and autoscroll enabled = true

with two bottons Page up / Page down

If I press page down button I want the list box to scroll down by the amount of its height.
How do I do this ?

I tried using for page down

radListBox1.AutoScrollOffset = new Point(0, (-1*radListBox1.AutoScrollOffset.Y)+radListBox1.Height);

I use a positive value for y point because it gets converted into negative and therefore I set the Y offset to a positive by multiplying it by -1.

With very little success.

Thank you in advance
Chona
Top achievements
Rank 1
 answered on 25 May 2010
4 answers
239 views
I am using the 2010.1.10.409 version of the Telerik.WinControls.UI assembly to utilize the new DocumentWindow and RadDock Manager.  I am creating a UserControl that inherits from DocumentWindow

using Telerik.WinControls.UI.Docking; 
 
public class myControl : DocumentWindow { } 

When I go into the design view to add controls I am only getting a blank gray screen.  Also when I updated my older user controls that inherited from DockPanel to now inherit from DocumentWindow, all of the controls that were on the form are now just listed in the gray screen, meaning that they are not showing the design and layout that the DockPanel originally gave me.

Is this a known issue?  Or is there something that I need to do to be able to have the design time support that the DockPanels had?
Nikolay
Telerik team
 answered on 25 May 2010
2 answers
122 views
Hi guys,

Im sure there is some obvious im missing, but the problem i have is that i have a grid with 3 columns. Column 1 has report name, Column 2 - a checkbox column to 'show' that report, Column 3 - a checkbox column to 'hide' that report. So if a user clicks the checkbox in 'Show' column, i want to uncheck the 'Hide' checkbox column (ie column 2) and vice versa. The code below handles it, however the grid only refreshes the change once i move off the current row... So what do i need to call so that the cells or row is repainted instantly once this code runs? Also should i instead use the CellValueChanged event? coz that didnt seem to work, hence why i chose this event here. Also do i even need to call BeginEdit and EndEdit here? Im not quite sure when those methods should be used.

Thanks for your advice :-) Chris.

private void gridReport_ValueChanged(object sender, EventArgs e)
        {
            RadCheckBoxEditor editor = (RadCheckBoxEditor)sender;
            editor.BeginEdit();
            SUB_REPORT report = (SUB_REPORT)gridReport.CurrentCell.RowInfo.DataBoundItem;
            if (gridReport.CurrentCell.ColumnIndex == 1) // show column
            {
                if ((bool)editor.Value)
                {
                    report.Hide = false;
                }
            }
            else
            {
                if ((bool)editor.Value)
                {
                    report.Show = false;
                }
            }
            editor.EndEdit();           
        }                 
chris petropoulos
Top achievements
Rank 1
 answered on 25 May 2010
3 answers
145 views
Hi
How can I load an existing theme to visual style builder then edit the colors and save as new theme
i can' find from the smart tag of any controls, click "Open Visual Style Builder" 


i use Q1 2010
Regards,
Rasha


 
Vassil Petev
Telerik team
 answered on 24 May 2010
4 answers
153 views
hey guys I finally figured out why I can't see my appointments!
if I enable the following code I can't see any appointments:
            radScheduler1.GroupType = GroupType.Resource;
if I use no group type I can see all my appointments !!! why is that ? please help me out !!!

regards
Dobry Zranchev
Telerik team
 answered on 24 May 2010
5 answers
645 views

By any chance does any one sample code on how I can load the root folder structure.

For example C:\Test\ is the root.

I need to list all the files and sub folders in the rad tree view with different icons for folders and different icons for the files.

 

Any sample code would be appreciated.

thanks,

Goran

Victor
Telerik team
 answered on 21 May 2010
3 answers
192 views
Hi!

Is it possible to set the working area to weekend also?
For now, I can change the Time Interval but it always show for monday to friday.

Thanks,
Nadia
Boyko Markov
Telerik team
 answered on 21 May 2010
1 answer
160 views
Hello-

I have created a UserControl with the RadRotator on it and 4 buttons.  1 for Previous, 1 for View, 1 for Remove, and 1 for Next.  All the buttons work except the Remove button.  Here is my code to add images to the RadRotator:

foreach (FileInfo  photoFileInfo in m_photos) 
            { 
                Bitmap photoBitmap = new Bitmap(Image.FromFile(photoFileInfo.FullName), 313, 253); 
 
                RadImageItem radImageItem = new RadImageItem 
                                                { 
                                                    Image = photoBitmap, 
                                                    Tag = photoFileInfo.Name 
                                                }; 
 
 
                this.InvokeIfNeeded(() => photoRadRotator.Items.Add(radImageItem)); 
            } 

The Remove button calls the RemovePhoto Method.  Here is the event handler for the delete button:
if (photoRadRotator.CurrentItem != null
            { 
                RadItem currentItem = photoRadRotator.CurrentItem; 
                string fileNameString = currentItem.Tag.ToString(); 
 
                foreach (RadItem radItem in photoRadRotator.Items) 
                { 
                    List<RadItem> items = new List<RadItem>(); 
                    if (radItem != currentItem) 
 
                        items.Add(radItem); 
                    ((RadImageItem) radItem).Image = null
                } 
 
                photoRadRotator.Items.Clear(); 
                currentItem.Dispose(); 
                this.RemovePhotos(fileNameString); 
            } 

Here is the code for the last line the RemovePhotos method:
            if (!Directory.Exists(m_unusedFolder)) 
            { 
                Directory.CreateDirectory(m_unusedFolder); 
            } 
 
            File.Move(Path.Combine(m_associatedFolder, fileToRemove), 
                      Path.Combine(m_unusedFolder, fileToRemove)); 

I an error on the File.Move line that says the file is in use by another process.  I have determined that the RadRotator i still holding on to the file through the Image property of the RadImageItem.  I am trying to allow a user to look through a directory of photos using the RadRotator.  If they find a photo they want to remove, they click the delete button and the photo is removed from the RadRotator and moved to another directory.  

How can I programmatically remove an item from the RadRotator and then move it to another directory without the RadRotator still having a lock on the file?

Thanks,
Chance
Victor
Telerik team
 answered on 21 May 2010
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)
Chart (obsolete as of Q1 2013)
Form
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
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?