Telerik Forums
UI for WinForms Forum
1 answer
530 views
Hello,

I have a DataGridView with TelerikMetro theme. I've set EnableHotTracking to False, but header cells still follow mouse hover events, e.g. border around header cell is highlighted when mouse is over header cell.
I need to disable that HotTracking for header and also make header non-clickable.

Thank you.
Anton
Telerik team
 answered on 31 Jul 2013
1 answer
77 views
Hi,
I'm currently upgrading a solution from telerik controls from 2010 to telerik controls from 2013. 
In our solution we have a class inheriting from RadComboBoxItem.
This control appears to have been deprecated. What control can I inherit from in telerik 2013 to achieve the same behaviour? Thanks.
Dave
George
Telerik team
 answered on 30 Jul 2013
20 answers
1.1K+ views

Hi,
I'm trying to implement F11 feature - full screen in my application.

It works like a charm for standard .NET Form, but for RadForm I have some inaccuracy.
Win7 x64 - on the top of the screen I see part of title bar which should be normally hidden by calling "targetForm.FormBorderStyle = FormBorderStyle.None;".
WinXP - on the top I still can see like 2px space from title bar, but more important is that it doesn't cover Windows taskbar in the bottom of the screen.

The Code is simple:

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 Telerik.WinControls.UI;
  
namespace RadControlsWinFormsApp1
{
    public partial class RadForm1 : RadForm
    {
        public FormState fs = new FormState();
  
        public RadForm1()
        {
            InitializeComponent();
        }
  
        private void radButton1_Click(object sender, EventArgs e)
        {
            fs.Maximize(this);
        }
  
        private void radButton2_Click(object sender, EventArgs e)
        {
            fs.Restore(this);
        }
    }
  
    /// <summary>
    /// Selected Win AI Function Calls
    /// </summary>
  
    public class WinApi
    {
        [System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "GetSystemMetrics")]
        public static extern int GetSystemMetrics(int which);
  
        [System.Runtime.InteropServices.DllImport("user32.dll")]
        public static extern void
            SetWindowPos(IntPtr hwnd, IntPtr hwndInsertAfter,
                         int X, int Y, int width, int height, uint flags);
  
        public static void SetWinFullScreen(IntPtr hwnd)
        {
            SetWindowPos(hwnd, IntPtr.Zero, 0, 0, GetSystemMetrics(0), GetSystemMetrics(1), 64);
        }
    }
  
    /// <summary>
    /// Class used to preserve / restore state of the form
    /// </summary>
    public class FormState
    {
        private FormWindowState winState;
        private FormBorderStyle brdStyle;
        private bool topMost;
        private Rectangle bounds;
  
        public bool IsMaximized = false;
  
        public void Maximize(RadForm targetForm)
        {
            if (!IsMaximized)
            {
                IsMaximized = true;
                Save(targetForm);
                targetForm.WindowState = FormWindowState.Maximized;
                targetForm.FormBorderStyle = FormBorderStyle.None;
                targetForm.TopMost = true;
                WinApi.SetWinFullScreen(targetForm.Handle);
            }
        }
  
        public void Save(RadForm targetForm)
        {
            winState = targetForm.WindowState;
            brdStyle = targetForm.FormBorderStyle;
            topMost = targetForm.TopMost;
            bounds = targetForm.Bounds;
        }
  
        public void Restore(RadForm targetForm)
        {
            targetForm.WindowState = winState;
            targetForm.FormBorderStyle = brdStyle;
            targetForm.TopMost = topMost;
            targetForm.Bounds = bounds;
            IsMaximized = false;
        }
    }
}

When you replace RadForm by Form everything is all right on both OS :-(

Any idea, any help?
Thanks Zbyněk
Paul
Telerik team
 answered on 30 Jul 2013
1 answer
168 views
I try add sourse to DropDownList, but this dosn't return result...
Object r is List<CultureInfo>
           
DataTable dtLangs = new DataTable();
dtLangs.Columns.AddRange(new DataColumn[] {new DataColumn("ID"), new DataColumn("Name")} );
AppSetting.Instance.Languages.Select( r => dtLangs.Rows.Add(r.TwoLetterISOLanguageName, r.DisplayName));
 
this.ddlLanguage.DataSource = dtLangs;
this.ddlLanguage.DisplayMember = "Name";
this.ddlLanguage.ValueMember = "ID";
Dimitar
Telerik team
 answered on 30 Jul 2013
16 answers
1.3K+ views
Hi,
I having difficuty to change the radbutton back color. I tried radbutton1.backcolor=color.red. This method is not working. Please help.
thanks so much
Peter
Telerik team
 answered on 30 Jul 2013
5 answers
356 views
Hi,

I would like to filter my Radgridview and then iterate thru filtered rows. Can't be more simple... I use Winform Q3-2010

I have no problem to apply the filter. The RadGridView display only filtered rows. It is OK
But when I want to iterate in them, I read all the rows !!! 

Here my code

Dim serveursource As String = "SRV-13-1;SRV-59-2"
  Dim f As Integer
  Dim words As String() = serveursource.Split(New Char() {";"c})
  Dim strRowFilter As String
  Dim filter As New FilterDescriptor()
  filter.PropertyName = "Dest_Serveur"
  filter.[Operator] = FilterOperator.IsEqualTo
  filter.IsFilterEditor = True
  RadGridView1.EnableFiltering = True
  ' Use For Each loop over words and display them
  Dim word As String
  For Each word In words
      If word <> "" Then
          filter.Value = word
          Me.RadGridView1.FilterDescriptors.Add(filter)
          f = 0
          For Each rowInfo As GridViewRowInfo In RadGridView1.Rows
              f += 1
          Next
          MsgBox(word & "Nb of rows:" & Me.RadGridView1.Rows.Count.ToString & ">>" & f.ToString)
      End If
  Next
What is wrong ?

Thanks
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Jul 2013
3 answers
56 views
Hello

Actually i am new to rad controls and i am binding a gridview with a data table.
my gridview makes rows but didn't show data.

my cs code is
    DataTable tblSrc = new DataTable();
               tblSrc.Columns.Add("Title");
               tblSrc.Columns.Add("Time");
               tblSrc.Columns.Add("PrimaryArtist");
               tblSrc.Columns.Add("Album");
               tblSrc.Columns.Add("PrimaryGenre");
               tblSrc.Columns.Add("Rating");
               tblSrc.Columns.Add("Status");
 
               DataRow dr;
               for (int i = 0; i < 5; i++)
               {
                   dr = tblSrc.NewRow();
 
                   dr["Title"] = "asd";
                   dr["Time"] = "asd";
                   dr["PrimaryArtist"] = "Add To PlayList";
                   dr["Album"] = "asd";
                   dr["PrimaryGenre"] = "asd";
                   dr["Rating"] = "asd";
                   dr["Status"] = "asd";
                   tblSrc.Rows.Add(dr);
               }
 
               //DataSet ds = APS.GetAllPodcastsByPublisherId(73);
               this.Gv_SongList.DataSource = tblSrc;
 Pleases anybody tell me why this happen??
any solution?
Qaiser
Top achievements
Rank 1
 answered on 30 Jul 2013
7 answers
1.3K+ views
Hello,
I'm trying to create a dialog form without title bar and use theme ("Windows8"). Shaped form for some reason uses another window background color, and applying theme doesn't change it. I tried to derive my form from RadForm and hide TitleBar with:
this.FormElement.TitleBar.Visibility = ElementVisibility.Collapsed;

Title bar is hidden. But when I apply "Windows8" theme to my application, my dialog has different border, where TitleBar should be. Also bottom border becomes 1px height, and when TitleBar is visible it is same as left and right borders.

How to accomplish desired look from the attached file?

Thank you.
George
Telerik team
 answered on 30 Jul 2013
1 answer
163 views
Can anyone help me with creating static text column with colspan (no summary for this cell).

Thanks
Dimitar
Telerik team
 answered on 30 Jul 2013
1 answer
109 views
Hi,
I can assign ContextMenuStrip to a radGridView. 
Now I have a Hierarchical Grid, what should i do if i want to assign ContextMenuStripA to master and ContextMenuStripB to detail?  

Dimitar
Telerik team
 answered on 30 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
TimeSpanPicker
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
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?