Telerik Forums
UI for WinForms Forum
1 answer
246 views
Hi

I'm on a tight schedule and have put many hours of work into a usercontrol that does a bunch of stuff, automatic syntax highlighting based on list and db lookups, validation as you type and so on and so forth.

I did all of this on the assumption that, like the control set I worked with in my previous job, the Telerik Grid would provide some means of created a custom column that used my control.

However, having started work on the actual grid, I can find no way of doing this. After my initial efforts bore no fruit I searched extensively for ways of doing it both here and elsewhere on the Web and found nothing.

The code fragments I have found all require that one uses a class that is inherited from RadElement. Since the control I have, which represents many hours of work, is already written and I'm on a tight schedule, I _don't_ want to rewrite the whole thing from scratch based on a RadElement derived control. And C# doesn't allow multiple inheritance.

So the only thing I can think of is to somehow wrap my usercontrol in a class inherited from RadElement. My assumption is that it is possible to override certain painting and editing events inherited from the RadElement class so that they present my usercontrol. But the documentation of RadElement's members is kinda minimal - auto-documented code minimal. There's no explanation of what any of the events or functions are FOR, just descriptions of their signatures.

Is what I'm attempting possible? If so, how do I proceed?

Thanks in anticipation :)
Jack
Telerik team
 answered on 03 Jul 2009
1 answer
183 views
Hi!

I have been working for 2 days now trying to solve a basic "2 way binding" problem but I'm about to give up.
Is this possible with todays RadGridView?

We are working on a enterprise application with a n-tire layer architecture.

Data Access Layer
Business Logic Layer
GUI

The Data Access Layer is using Linq2SQL to get the data from the database and then passes the linq objects to the business layer and then the gui layer.
In the gui layer we have a RadGridView.

The RadGridView is readonly from start.
After the user clicks on a "Start edit" button, the RadGridView can be edited.

I want the user to be able to edit fields, remove rows and add new rows but nothing should be changed in the database until the user presses the button "Save changes".

Can this be done?
Can someone please send me a "best practice" example for this, I cannot be the only one looking for this?

Regards,
Per Bornsjö

Jordan
Telerik team
 answered on 03 Jul 2009
1 answer
226 views
Hi, I have a RadGridView that is bound to a DataTable.
I refresh the data binding every 30 seconds.
Currently before I refresh I store the currently selected rows and reselect them on rebinding to make the user experience as seamless as possible.
This works fine until I have enough items to cause it to scroll. When I have items selected at the bottom of the list, on refresh the selection disappears even though I have it added to the selectedrows collection, and the scrollbar is at the top with the item out of view. When I manually scroll down, I see that my previous selection has disappeared.
Also I tried using the code below as suggested in the forum to scroll to my selected row.
int visualRowsCount = this.radGridView1.GridElement.VisualRows.Count;   
  
this.radGridView1.GridElement.ScrollToRow(indexToScroll - visualRowsCount + 3);  
But my visualrows.count is always returned as zero. And when I call the ScrollToRow method, it always gives an outofbounds exception.
I am using the binding below where docs is a DataTable.
this.gridDocs.MasterGridViewTemplate.Columns.Clear(); 
this.gridDocs.MasterGridViewTemplate.DataSource = docs; 
Am I doing something wrong here?
Jack
Telerik team
 answered on 03 Jul 2009
5 answers
532 views
I'm using RadControls for WinForms 2008.3 1321 (control version 8.2.0.0) and found the following issue:

The SelectedValueChanged event of the RadComboBox fires two times when the item selection changes. I'm able to reproduce this with the following small WinForms test project:

Form1.Designer.cs
namespace RadComboTest 
{ 
    partial class Form1 
    { 
        /// <summary> 
        /// Required designer variable. 
        /// </summary> 
        private System.ComponentModel.IContainer components = null; 
 
        /// <summary> 
        /// Clean up any resources being used. 
        /// </summary> 
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> 
        protected override void Dispose(bool disposing) 
        { 
            if (disposing && (components != null)) 
            { 
                components.Dispose(); 
            } 
            base.Dispose(disposing); 
        } 
        #region Windows Form Designer generated code 
 
        /// <summary> 
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor. 
        /// </summary> 
        private void InitializeComponent() 
        { 
            this.radComboBox1 = new Telerik.WinControls.UI.RadComboBox(); 
            ((System.ComponentModel.ISupportInitialize)(this.radComboBox1)).BeginInit(); 
            this.SuspendLayout(); 
            //  
            // radComboBox1 
            //  
            this.radComboBox1.Location = new System.Drawing.Point(12, 12); 
            this.radComboBox1.Name = "radComboBox1"; 
            //  
            //  
            //  
            this.radComboBox1.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren; 
            this.radComboBox1.Size = new System.Drawing.Size(260, 20); 
            this.radComboBox1.TabIndex = 0; 
            this.radComboBox1.Text = "radComboBox1"; 
            //  
            // Form1 
            //  
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 
            this.ClientSize = new System.Drawing.Size(284, 264); 
            this.Controls.Add(this.radComboBox1); 
            this.Name = "Form1"; 
            this.Text = "Form1"; 
            ((System.ComponentModel.ISupportInitialize)(this.radComboBox1)).EndInit(); 
            this.ResumeLayout(false); 
            this.PerformLayout(); 
 
        } 
        #endregion 
 
        private Telerik.WinControls.UI.RadComboBox radComboBox1; 
    } 
} 
 
 

Form1.cs
using System; 
using System.Diagnostics; 
using System.Windows.Forms; 
using Telerik.WinControls.UI; 
 
namespace RadComboTest 
{ 
    public partial class Form1 : Form 
    { 
        public Form1() 
        { 
            InitializeComponent(); 
 
            radComboBox1.Items.Add(new RadComboBoxItem("Item1", 1)); 
            radComboBox1.Items.Add(new RadComboBoxItem("Item2", 2)); 
            radComboBox1.Items.Add(new RadComboBoxItem("Item3", 3)); 
 
            radComboBox1.SelectedValueChanged += new EventHandler(radComboBox1_SelectedValueChanged); 
        } 
 
        void radComboBox1_SelectedValueChanged(object sender, EventArgs e) 
        { 
            Debug.Fail("radComboBox1_SelectedValueChanged"); 
        } 
    } 
} 
 

Can anybody confirm this issue?

Regards,
ReneMT


gmendez
Top achievements
Rank 1
 answered on 02 Jul 2009
1 answer
407 views
Hello Telerik support,

I realize this was discussed on this forum back in June '07, but didn't reach a conclusion.  I'm trying to simply set input focus to a radTextBox like so:

private

void Form_Load(object sender, EventArgs e)

 

{
    this.radTextBox.Focus();

}

The cursor does not get set onto the radTextBox.  What needs to be done here?


Thanks!
Jeremy

Nikolay
Telerik team
 answered on 02 Jul 2009
5 answers
501 views
Hello,
     I'm using rad ribbonbar for my windows application with shaped form class to get MS word 2007 look for my application. I have the following issues when I tried to do that.

  • I can't see the border around my application. When I set border width property, it gives me a border leaving ribbon bar. Also, If I have a docking manager docked , it covers the border.
  • When I maximize my form, I can't access min, max, close buttons as the top portion of the application is covered by windows task bar ( I have windows task bar at the top)
  • I'm unable to min,max, close from task bar entry as right click has been disabled.

Is there any way to get what I'm looking for? Please let me know if I have to make it more clear, I have couple of screen shots that I can send.

Best,
Sree

Deyan
Telerik team
 answered on 02 Jul 2009
1 answer
234 views
I have set an Application wide Theme but for a few of the grids I would like to use a different Theme. How can I change the Theme on the GridView. I have tried the following:

tbuilder = Telerik.WinControls.ThemeResolutionService.GetRegisteredControlStyleBuilder(

GetType(RadGridView).FullName, GetType(Telerik.WinControls.RootRadElement).FullName, "ControlDefault")

 

tbuilder.BuildStyle(myRadGridView.RootElement)

but GetRegisteredControlStyleBuilderGetRegisteredControlStyleBuilder methods retuns nothing.


Also how does one change the Theme on a DockManager control?


Telerik rocks!

 

Deyan
Telerik team
 answered on 02 Jul 2009
1 answer
161 views
Hi ,

Greetings to All

Can we have the MasterTable EditForm and automatic AddNew , Update & Delete in Deskotop Application
Like the Template Form or the Edit Form  as we have in ASP.Net Controls
Can this be achived in Desktop Application

Thanks
Vinodh

Nick
Telerik team
 answered on 02 Jul 2009
1 answer
132 views
Hi Guys

Can anyone help me with this?

I'm using a tree view and have enabled incremental search, which works just fine.

How ever because I have a button with a mnemonic (&Close) when I press "C" the form closes!!

I'm using C# and have converted from VB6 where the user had to hold down the ALT key as well.

Does anyone have a clean work around , preferably one that does not have to be put into each form/button?

Thanks in advance
Bob
Top achievements
Rank 1
 answered on 01 Jul 2009
1 answer
176 views
Is there a way to apply a theme at runtime to an individual element in a radCarousel e.g. apply a theme to radButtonElement.

Regards,

David
Nikolay
Telerik team
 answered on 01 Jul 2009
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
SyntaxEditor
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?