Telerik Forums
UI for WinForms Forum
9 answers
1.2K+ views
Hi,
Is there ways to make RadDropDownList text as "ReadOnly" in Run Time mode?
Richard Slade
Top achievements
Rank 2
 answered on 16 Jul 2013
1 answer
92 views
Hi Telerik support,
When i try to reorder elements in a treeview, everithink works fine, but the droped item allways goes to the bottom of the node, not to the correct place between other two elements .
I saw that this is the same behavior with your demo app in TreeView-->Populate With Data --> Self Reference  section , but need to know is it some way to acheeve correct reorder functionality when bind treeview with some external data.

EDIT: Additionally, SortDescriptors also doesn't work in this scenario.

Regards,
Martin
Dimitar
Telerik team
 answered on 16 Jul 2013
4 answers
363 views
Hi!

I'm using RadGridView and I need to let the grid ColumnChooser fixed as part of the layout, as it was a component I can attach to another. As I could see and searched, the ColumnChooser is a floating window that is at the top.
Searching, I found out that I probably would get to what I need adding handles to the Shown event of the ColumnChooser (since every time it's shown a new instance is created), and call a move function that I have to implement to set the position of the ColumnChooser. As well, I would have to call this function every time the form is moved or re-sized.
Is there any other way to do something like a fixed ColumnChooser instead doing it?

Thanks in Advance!
Stefan
Telerik team
 answered on 16 Jul 2013
5 answers
167 views
I use 2 DateTimePicker, one for FromDate and one for ToDate.

I like the idea of displaying null text ie: 'From Begining' and 'To End' but my problem is that for some reason whatever I set NullDate for the ToDate, it returns MinDate value.

How can I make it choose the MaxDate when using SetToNullValue. I tried many variations but alas.

PS.: I have one DatePicker on a UserControl and have 2 copies of the user control on a form and I added properties to the usercontrol to set date.value, MinDate, MaxDate, NullText, NullDate, SetToNullValue..
Stefan
Telerik team
 answered on 16 Jul 2013
1 answer
91 views
I have a Telerik Report in a WinForm that randomly fails to release the PDF it has created for viewing. The first time the report will view fine. Changing variables and clicking submit more often results in a 'The process cannot access the file 'C:\Temp...\..PDF' because it is being used by another process. Exiting the report form itself has no effect and the files remain locked until the main program is shut down.
Stef
Telerik team
 answered on 16 Jul 2013
1 answer
304 views
 
this is the demo snipped of code that you provide in winforms Q2 2013 demo for listview -> custom settings. The orientation works fine in the demo app but I have the same snipped of code as the demo app.  I've debugged this multiple times trying to figure out why the orientation is always vertical but there is no clear reason for it at the moment.  

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Telerik.QuickStart.WinControls;
 
namespace Telerik.Examples.WinControls.ListView.CustomItems
{
    public partial class Form1 : ListViewExamplesControl
    {
        public Form1()
        {
            InitializeComponent();
 
            this.radListView1.ItemSize = new Size(200, 300);
            this.radListView1.AllowArbitraryItemHeight = true;
            this.radListView1.ItemSpacing = 10;
            this.radListView1.EnableKineticScrolling = true;
 
            this.radListView1.ListViewElement.ViewElement.ViewElement.Margin = new Padding(0, 10, 0, 10);
            this.radListView1.ListViewElement.ViewElement.Orientation = Orientation.Horizontal;
        }
    }
}

This is my code, it is very simple right now because I am still working on the figuring out the functionality 
of RadListView.  I've hard coded the orientation multiple times and printed it out in MessageBox but each time
MessageBox prints out vertical, for each of the 12 items in the Imagelist.  I was hoping you could explain why this
happens all of the time and a way to fix this.  Thank you for your time in this matter.  

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls;
using System.IO;
using System.Linq;
using Telerik.WinControls.Layouts;
using Telerik.WinControls.UI;
 
namespace testingImageViewer
{
    public partial class RadForm1 : Telerik.WinControls.UI.RadForm
    {
        private int intImageHeight = 0;
        private int intImageWidth = 0;
        private string strFilePath = "";
        StackLayoutPanel stackLayout;
        LightVisualElement imageElement;
 
        Image myImage;
        public RadForm1()
        {
            InitializeComponent();
            radListview.ItemSize = new Size(200, 300);  
            radListview.AllowArbitraryItemHeight = true;
            radListview.EnableKineticScrolling = true;
            radListview.ListViewElement.ViewElement.Orientation = Orientation.Horizontal;
            MessageBox.Show(radListview.ListViewElement.ViewElement.Orientation.ToString());
        }
 
        public void fillImageList()
        {
            OpenFileDialog ofd = new OpenFileDialog();
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                myImage = Image.FromFile(ofd.FileName);
                strFilePath = ofd.FileName;
            }
            else
            {
                MessageBox.Show("open dialog didn't open");
            }
        }
 
        private void RadForm1_Load(object sender, EventArgs e)
        {
            fillImageList();
            imagelistPictures.Images.Add(myImage);            
            showImages();
        }
 
        private void showImages()
        {
            if (imagelistPictures.Images.Empty)
            {
                MessageBox.Show("list image preview is empty");
            }
            else
            {
                for (int i = 0; i < imagelistPictures.Images.Count; i++)
                {
                    if (imagelistPictures.Images[i] != null)
                    {
                        // radListview.Items.Add(listImagePreview.Images[i]);
                        //intImageWidth = listImagePreview.Images[i].Width;
                        //intImageHeight = listImagePreview.Images[i].Height;
                        // pictureBox1.Image = listImagePreview.Images[i];  // adds it to picture box, adjust height/width
 
 
                        // show the image
                        // radListview.Height = imagelistPictures.Images[i].Height;
                        // radListview.Width = imagelistPictures.Images[i].Width;
 
                        ListViewDataItem lvdi = new ListViewDataItem("Go Hokies");
                        lvdi.Image = imagelistPictures.Images[i];
                        lvdi.ImageAlignment = System.Drawing.ContentAlignment.MiddleCenter;
                        //lvdi.Size.
 
                        radListview.Items.Add(lvdi);
 
                        radListview.ListViewElement.ViewElement.Orientation = Orientation.Horizontal;
                        MessageBox.Show(radListview.ListViewElement.ViewElement.Orientation.ToString());
                    }
                    else
                    {
                        MessageBox.Show("contents of list are null, break");
                        break;
                    }
                }
            }
        }
 
 
 
    }
}

      
Stefan
Telerik team
 answered on 16 Jul 2013
2 answers
79 views
Hi,

I have a gridview that is hooked up to a web service, when you edit a cell and move to another cell it calls an update on the web service to update the DB, all works very well.

However, I can't seem to get this functionality working with the 'add new row' row. How do I know when a user has moved away from teh add new row row, so I can then construct an entity object to send to the web services Add method?

Thanks in advance
M
Matthew
Top achievements
Rank 1
 answered on 15 Jul 2013
1 answer
153 views

Hope the below button click methods can help someone in implementing records navigation (backward and forward) in RadGridView.

private void btnPrev_Click(object sender, EventArgs e)
        {
            if (gridview1.CurrentRow.Index > 0)
            {
                gridview1.ChildRows[gridview1.CurrentRow.Index - 1].IsCurrent = true;
            }
        }
        private void btnNext_Click(object sender, EventArgs e)
        {           
            if (gridview1.CurrentRow.Index < gridview1.ChildRows.Count - 1)
            {               
                gridview1.ChildRows[gridview1.CurrentRow.Index + 1].IsCurrent = true;            
                 
            }
        }

Stefan
Telerik team
 answered on 15 Jul 2013
1 answer
77 views
Hi there,
How can I bind an object like List<Person> to a RadTreeView according theirs true/false values (How can bind checkbox values to a column of List<Person>)?
I try google that but I can't find any related answer (It is available in ASP.NET AJAX).
So if there is Checkbox mode in RadTreeView for winforms, how can bind a datasource to check or uncheck checkboxes according data?

Regards,
Mohsen.
Mohsen
Top achievements
Rank 1
 answered on 13 Jul 2013
2 answers
150 views
Hi.

For now I'm using GridViewMaskBoxColumn with standart mask type and 00°00'00.00000'' as a mask.
I also changed promt char to 0:
private void CellBeginEdit(object sender, GridViewCellCancelEventArgs e)
 {
  RadMaskedEditBoxEditor editor = e.ActiveEditor as RadMaskedEditBoxEditor;
  if (editor != null)
  {
      editor.MaskTextBox.PromptChar = '0';
           
  }
 
...
}


The requirements has changed and now I need to show + or -  before the mask so it should look like
+00°00'00.00000''. The most easiest way is to use #00°00'00.00000'', but in this case when I start edit
masktextbox looks like 000°00'00.00000'' which is very inconvenient. So I need some how to provide possibility to let use enter (choose)
+ or - and preserve the old mask (00°00'00.00000''). The regex is also not very convenient.

Is the any possibility to provide selection of a sign for standart mask?

My control version is 2011.2.11.831

Thanks in advance.

Peter
Telerik team
 answered on 12 Jul 2013
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
CheckedDropDownList
ProgressBar
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?