Telerik Forums
UI for WinForms Forum
11 answers
1.5K+ views
I want to change the month name and week name, for Localization.

but I can't use Culture feature. because that language not in microsoft CultureInfo.

so I need Custom change the name value .

How can I do?
Qakmak
Top achievements
Rank 1
 answered on 13 Jun 2013
11 answers
1.0K+ views
Hello, Telerik Team.

I have two questions.

1.
I'm using default Telerik theme:
this.ThemeClassName = "Telerik.WinControls.UI.RadGridView";  
this.ThemeName = "ControlDefault"
And now I should implement lines between rows. I tryed solve this with next code:
        void _gridView_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)  
        {  
            GridDataCellElement cell = e.CellElement as GridDataCellElement;  
            cell.DrawBorder = true;  
            e.CellElement.BorderTopWidth = 1;  
            e.CellElement.BorderTopColor = Color.LightGray;  
        } 
But in this way the last column has black borders.
http://img408.imageshack.us/img408/5127/telerik.png

May be I did anything wrong? How can I enable borders for rows in easy way?

2. I'm using my grid with enabled EnableHotTracking property.
How can I disable animation for HotTracking?
How can I disable animation for grid?

Best regards,
Dan Pristupov
Stefan
Telerik team
 answered on 13 Jun 2013
1 answer
123 views
I added to Rad Page View some pages and set the strip alignment to Right
problem is that i wish to display the text of each added page in horizontal instead of default vertical

I would like to have same layout as my attached capture that includes a 3 tabs pages  (main,diag,doc)

please help
Smayr
Top achievements
Rank 1
 answered on 13 Jun 2013
3 answers
206 views
Hi, im trying to use waiting bars inside radgridview, I sucessfully add the waitingbars to the gridview in the CellFormatting event.
The problems comes when i try to dinamically change the state of the waitingbars individually (startwaiting - stopwaiting) when certain event happend eg. when i click a button i want determined cell to starwaiting or stopwaiting, here is the button code:        

private void NewPjButton_Click(object sender, EventArgs e)
{
    radGridView1.EndEdit();
    radGridView1.Rows[2].Cells[5].IsSelected = true;
    radGridView1.Rows[2].Cells[5].BeginEdit();
 
    RadwaitingBarEditor editor = radGridView1.ActiveEditor as RadwaitingBarEditor;
 
    if (editor != null) //this is always null
    {
        RadwaitingBarEditorElement element = editor.EditorElement as RadwaitingBarEditorElement;
        element.StartWaiting();
    }
}

and here the editor and element editor:

public class RadwaitingBarEditor : BaseGridEditor
{
    public override void BeginEdit()
    {
        base.BeginEdit();
        this.EditorElement.Focus();
        ((RadwaitingBarEditorElement)this.EditorElement).WaitingStarted += new EventHandler(RadwaitingBarEditor_WaitingStarted);
    }
    public override bool EndEdit()
    {
        ((RadwaitingBarEditorElement)this.EditorElement).WaitingStarted -= new EventHandler(RadwaitingBarEditor_WaitingStarted);
        return base.EndEdit();
    }
    void RadwaitingBarEditor_WaitingStarted(object sender, EventArgs e)
    {
        OnValueChanged();
    }
    protected override RadElement CreateEditorElement()
    {
        return new RadwaitingBarEditorElement();
    }
}
 
public class RadwaitingBarEditorElement : RadWaitingBarElement
{
    public RadwaitingBarEditorElement()
    {
        this.CanFocus = true;
         
    }
    public event EventHandler WaitingStarted;
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(RadWaitingBarElement);
        }
    }
   protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
    {
        base.OnPropertyChanged(e);
        if (e.Property == RadTrackBarItem.ValueProperty
            && this.Parent != null
            && this.WaitingStarted != null)
        {
            this.WaitingStarted(this, EventArgs.Empty);
        }
    }
}

this code just dosent work, the editor is always null. Please if someone can guide me how to do it correctly I will apreciate it so much!!.

Thank you, 
Ivan Petrov
Telerik team
 answered on 12 Jun 2013
2 answers
57 views
Hello,

I need to find a way to intercept an event, key press, or something. I need to be able delete some nodes in a RadTreeView, but not others. Some nodes are parent "static" nodes (i.e. node analogs to a List<Object>), whereas other nodes are non-static, the Object values themselves.

I'd like to delete the non-static children, and not delete the static ones, during normal "casual" operation. That is, the user is navigating and casually pressed Delete to delete a node.

The poor man's way of doing it will probably work: hook up some context menus, that sort of thing.

Is there a BeforeRemove type event, or otherwise an event that allows me to check and flag a Cancel?

Thank you...
Paul
Telerik team
 answered on 12 Jun 2013
8 answers
217 views
Hi,
i wanted to update DataTable and show the data in a grid
i update DataTable in a timer with the interval of 1 second

it updates successfully but when i drag the column header and the update timer ticks the following error occurs

System.NullReferenceException was unhandled
  Message=Object reference not set to an instance of an object.
  Source=Telerik.WinControls.GridView
  StackTrace:
       at Telerik.WinControls.UI.RadGridViewDragDropService.GetDragImageHint(ContentAlignment textAlignment, Bitmap hintImage, RectangleF textRectangle, Int32 hintImageWidth)
       at Telerik.WinControls.UI.GridHeaderCellElement.GetDragHintCore()
       at Telerik.WinControls.RadItem.Telerik.WinControls.ISupportDrag.GetDragHint()
       at Telerik.WinControls.RadDragDropService.PrepareContext()
       at Telerik.WinControls.RadDragDropService.HandleMouseMove(Point mousePos)
       at Telerik.WinControls.UI.RadGridViewDragDropService.HandleMouseMove(Point mousePosition)
       at Telerik.WinControls.RadDragDropService.Telerik.WinControls.IMessageListener.PreviewMessage(Message& msg)
       at Telerik.WinControls.RadMessageFilter.NotifyGetMessageEvent(Message& msg)
       at Telerik.WinControls.RadMessageFilter.GetMessageHookProc(Int32 code, IntPtr wParam, IntPtr lParam)
       at System.Windows.Forms.UnsafeNativeMethods.GetMessageW(MSG& msg, HandleRef hWnd, Int32 uMsgFilterMin, Int32 uMsgFilterMax)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at RadControlsWinFormsApp1.Program.Main() in Program.cs:line 18
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:


here is my code:
private void RadRibbonForm1_Load(object sender, EventArgs e)
{
        DataTable Data = new DataTable();
        Data.Columns.Add("field1");
        Data.Columns.Add("field2");
        Data.Columns.Add("field3");
        Data.Columns.Add("field4");
        Data.Columns.Add("field5");
        Data.Columns.Add("field6");
        Data.Columns.Add("field7");
        Data.Columns.Add("field8");
        Data.Columns.Add("field9");
       radGridView1.DataSource = Data;
}
void fillData()
{
lock (Data)
            {
                Data.BeginLoadData();
 
                if (adapter.SelectCommand.Connection.State == ConnectionState.Closed)
                    adapter.SelectCommand.Connection.Open();
                SqlDataReader reader = adapter.SelectCommand.ExecuteReader();
                try
                {
                    while (reader.Read())
                    {
                        var v1 = reader.GetInt64(0);
                        var v2 = reader.GetInt32(1);
                        var v3 = reader.GetDouble(2);
                        var v4 = reader.GetDouble(3);
                        var v5 = reader.GetString(4);
                        var v6 = reader.GetString(5);
                        var v7 = reader.GetFloat(6);
                        var v8 = reader.GetFloat(7);
                        var v9 = reader.GetInt32(8);
                        Data.LoadDataRow(new object[] { v1, v2, v3, v4, v5, v6, v7, v8, v9 }, false);
                    }
 
                    Data.EndLoadData();
                    reader.Close();
                    DataRow[] deletedrows = Data.Select(string.Empty, string.Empty, DataViewRowState.Unchanged);
                    foreach (DataRow item in deletedrows)
                        item.Delete();
 
                    Data.AcceptChanges();
 
                }
                catch (Exception)
                {
                    Data.EndLoadData();
                    reader.Close();
                }
            }
}
 
 private void timer1_Tick(object sender, EventArgs e)
        {
            fillData();
            this.radGridView1.MasterTemplate.Refresh(null);
        }
Peter
Telerik team
 answered on 12 Jun 2013
7 answers
179 views
I'm using the PageView in ExplorerBar ViewMode.  I would like to change all of my PageViewPages so that:

1. The item height is smaller (shorter).

2. Mouseover doesn't change the item color.

3. Select/Deselect doesn't change the item color.

4. I'm going to set up two images to use to indicate whether the user can expand or collapse a page.  I think I can manage that much.  But if you have any suggestions, especially for pushing the image over to the right side, I would be happy to read them.

Thank you.
Peter
Telerik team
 answered on 12 Jun 2013
1 answer
52 views

Hi, 

   I'd like know if is possible disable Drag and Drop of Tile? I don't wanna enable Drag and Drop between groups.
If is possible, how to do it?


Thanks,

Flávio Da Maia Jr
Paul
Telerik team
 answered on 12 Jun 2013
4 answers
249 views
Hello,

Is there a way to control the order of series when they draw?

For example, we have at least two subsets of series that I would like to discern between. One should overlay the other for easier perception what is going on in the scatter line curves.

Currently things paint and it's somewhat of a muddy mess to discern much of anything, especially for series of any magnitude, say a dozen tree nodes selected with 9x-series per node, some background, some foreground.

Thank you!

Regards,

Michael Powell
Travis
Top achievements
Rank 1
 answered on 12 Jun 2013
1 answer
170 views
I have custom TreeNodes that inherit from RadTreeNode.  When I try to select a node via code the custom treenode will not highlight.  I've tried all the examples I could find.  I saw the post about overriding the ThemeClassName for a treeview, but there is no such property for the radtreenode.  help please
Anton
Telerik team
 answered on 12 Jun 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?