Telerik Forums
UI for WinForms Forum
1 answer
140 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
148 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
420 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
332 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
432 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
176 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
128 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
102 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
134 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
1 answer
229 views
Hi,

I saved a RadButton theme in an XML file and it's in the project's Resources file.
It's available in the Properties.Resources.RedGridButton class.

I have a RadGrid with a Command Column and I need to set the theme of its default RadButton.
But the grid's CellFormatting event exposes just the buttonElement of the command column.
How to set the button's theme?

Thanks!
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)
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?