Telerik Forums
UI for WinForms Forum
7 answers
342 views
Hi,

I have created new class inheriting RadButtonElement and using this class on my Ribbonbar QuickAccessToolBar instead of RadButtonElement. When the mouse pointer comes to over button, background of the image does not change. Whereas, it does when i use RadButtonElement. Is it a bug, or i need to handle some events?

Thanks,

Baris
public class MyRadButtonElement:Telerik.WinControls.UI.RadButtonElement
    {
        private String _blabla;
 
        public MyRadButtonElement(String blabla)
            : base()
        {
            _blabla = blabla;
        }
 
        protected override Type ThemeEffectiveType
        {
            get
            {
                return typeof(Telerik.WinControls.UI.RadButtonElement);
            }
        }
 
    }
Baris
Top achievements
Rank 1
 answered on 01 Mar 2012
1 answer
472 views
 I found this link which shows some sample code on how to set the background color of a cell. The selectionmode is FulLRowSelect. I have some code in an event handler for CellFormatting that does this:

if (someConditionIsTrue)
{
e.CellElement.BackColor = Color.Red;
return;
}

e.CellElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local);


when certain conditions are met. At first I didn't think it was working, but I noticed when I moved my mouse over a row that should have a cell with a red background, suddenly the background switched to red. As soon as I move my mouse off that row it switches back to it's default color. That's not the behavior I'd like - it should be red regardless of whether the mouse is over that row or not.

What am I missing?
Richard Slade
Top achievements
Rank 2
 answered on 01 Mar 2012
18 answers
473 views
Hi,

I am using radgrid to dynamically load controls(drop down,textbox) @ runtime.If the grid contains too many rows and when i try to scroll the grid all the controls within the grid cell are getting distracted(please refer to the snap shot).

Basically in some textbox fileds drop drown icon is visible.

Please address this issue as soon as possible.
Jack
Telerik team
 answered on 01 Mar 2012
1 answer
77 views

Hi.

I want to show the new appointment Dialog (advanced)  (see pictures attached) rather than the  “inline” 3 option ( Save, Cancel, Options)  dialog, when you DoubleClick on the RadSchduler to create a new appointment.

Your help will be appreciated.

Thank you

Jose
Top achievements
Rank 1
 answered on 01 Mar 2012
3 answers
160 views
I was searching through the samples, but I cannot find a sample code that will enable the user to perform multi cells selection. The user needs to be able to select multiple cell from the same row or other rows. Each selected cells will have different background and foreground color.

Thank you,
Hendra
Jack
Telerik team
 answered on 29 Feb 2012
1 answer
76 views
Hi,
In the documentation a 
ManageBookmarksDialog of RadRichTextBox is mentioned. Where can I find this dialog?

Thanks,

Karl
Stefan
Telerik team
 answered on 29 Feb 2012
1 answer
233 views
Greetings,

How could I get the radgridview to display collapsed child rows set. In other words we have a radgridview with rows and child rows but how could we get the child rows collapsed for all initially until the user decides which one to expand.

Thanks and best regards,

G
Stefan
Telerik team
 answered on 29 Feb 2012
13 answers
362 views

When I attempt to enable row reordering with a gridview bound to a DataTable rather than manually adding rows like in the demo application, nothing happens. 

Is it possible to make reordering or drag/drop work when bound to a DataTable?

Stefan
Telerik team
 answered on 29 Feb 2012
5 answers
1.5K+ views
The default style does not gray out the image on a button that is disabled.

But there are other themes that do gray out the image (such as Desert, Breeze).

I'm making a copy of the default style and making small adjustments.  How can I make my custom theme use a gray image for a button that is disabled?
Stefan
Telerik team
 answered on 29 Feb 2012
3 answers
116 views
Hello,
I was hoping to have the ability to Update my RadGrid from a GidViewDetailElement that was implemented as a User Control. When a user clicks on a row in the RadGrid, a separate UserControl is displayed to show the Details of that Row.  I want to have the ability for the User to change a value in one of the fields shown in the Details vVew which will ujpdate the row in the base RadGrid. The code was implemented just like your example of "Custom Views" only that i wrapped the Details view as a User Control in a RadHostItem.  I'm able to view the data just fine in the User Control, its just not apparent to me how to now pass updates from this UserControl now back to my RadGrid with this GridViewDetailElement implementation or if its even possible.  Appreciate anyone who can help on this.  Thanks - Doug

i Have included the main pieces of code in how this was implemented.
Here is the code in my MainForm.c file that defines the detailView GridViewDetailElement for my RadGrid rgDetails.
private void InitializeGridControl()
        {
            this.rgDetails.TableElement.SetValue(DockLayoutPanel.DockProperty, Telerik.WinControls.Layouts.Dock.Top);
            this.rgDetails.TableElement.Margin = new Padding(10, 0, 10, 10);
            this.detailView = new GridViewDetailElement();
            this.rgDetails.GridViewElement.Panel.Children.Insert(1, this.detailView);
            this.detailView.SetValue(DockLayoutPanel.DockProperty, Telerik.WinControls.Layouts.Dock.Bottom);
            this.detailView.Margin = new Padding(10, 0, 10, 2);
        }


Here is the Class that Defines the GridViewDetailElement (just the relevant code).
public class GridViewDetailElement : GridVisualElement, IGridView
    {
        private RadGridViewElement gridElement;
        private GridViewInfo viewInfo;
        public DetailElement detailPanel;
  
        #region Fields
  
        private RadHostItem hostDetailView;
  
        #endregion
  
        #region Initialization
  
        protected override void InitializeFields()
        {
            base.InitializeFields();
  
            this.UseNewLayoutSystem = true;
            this.Padding = new System.Windows.Forms.Padding(10);
            this.StretchHorizontally = true;
            this.MinSize = new Size(0, 250);
            this.MaxSize = new Size(0, 250);
            this.DrawFill = true;
            this.Class = "RowFill";
            this.detailPanel = new DetailElement();
        }
  
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            hostDetailView = new RadHostItem(detailPanel);
            this.Children.Add(hostDetailView);
        }
  
public void Initialize(RadGridViewElement gridElement, GridViewInfo viewInfo)
        {
            this.gridElement = gridElement;
            this.viewInfo = viewInfo;
            this.gridElement.GridControl.CurrentRowChanged += new CurrentRowChangedEventHandler(GridControl_CurrentRowChanged);
        }
  
        public void Detach()
        {
            this.gridElement.GridControl.CurrentRowChanged -= new CurrentRowChangedEventHandler(GridControl_CurrentRowChanged);
            this.gridElement = null;
            this.viewInfo = null;
        }
  
public void UpdateView()
        {
            GridViewDataRowInfo dataRow = this.GridViewElement.GridControl.CurrentRow as GridViewDataRowInfo;
  
            if (dataRow != null)
            {
                detailPanel.UpdateUCView(dataRow);
            }
        }
  
        public RadGridViewElement GridViewElement
        {
            get { return this.gridElement; }
        }
  
        public GridViewInfo ViewInfo
        {
            get { return this.viewInfo; }
        }
  
        #endregion
  
        #region Event Handlers
  
        private void GridControl_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
        {
            this.UpdateView();
        }
  
        #endregion
     ...
}

And Here is my UserControl Code (relevant code only)

public partial class DetailElement : UserControl
    {
        public DetailElement()
        {
            InitializeComponent();
        }
 
        public void UpdateUCView(GridViewDataRowInfo dataRow)
        {
            string statusView;
            if (dataRow != null)
            {               
                statusView = GetSafeString(dataRow.Cells["State"].Value.ToString());
                switch (statusView)
                {
                    case "Running":
                        picBoxStatus.Image = Properties.Resources.start24;
                        break;
                    case "Paused":
                        picBoxStatus.Image = Properties.Resources.pause24;
                        break;
                    case "Stopped":
                        picBoxStatus.Image = Properties.Resources.stop_red24;
                        break;
                    default:
                        picBoxStatus.Image = Properties.Resources.warning16;
                        break;
                } 
                this.rTxtServiceOwner.Text = GetSafeString(dataRow.Cells["StartName"].Value.ToString());
                this.rTxtServiceType.Text = GetSafeString(dataRow.Cells["ServiceType"].Value.ToString());
                ....
         }
 
private void rChkTrackService_Click(object sender, EventArgs e)
        {
        // How Do I pass an update from this CheckBox back to my main Grid ???????????????
        }
}

Thanks Doug


Ivan Petrov
Telerik team
 answered on 29 Feb 2012
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
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
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?