Telerik Forums
UI for WinForms Forum
4 answers
157 views
Hello,

when i am using RadGridView with Office2010Black theme, and loading some data into, i got vertical scrollbar painted wrong. See the screenshot attached.

My grid initialization section:

private DataTable dataTable;
 
public Form1()
{
    InitializeComponent();
 
    radGridView1.AutoSizeRows = false;
    radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
    radGridView1.RowFormatting += radGridView1_RowFormatting;
    radGridView1.ReadOnly = true;
    radGridView1.ShowRowHeaderColumn = false;
    radGridView1.VerticalScrollState = ScrollState.AlwaysShow;
 
    radGridView1.ThemeName = "Office2010Black";
 
    dataTable = new DataTable();
    dataTable.Columns.Add("number", typeof(int));
    dataTable.Columns.Add("descriptions", typeof(string));
 
    radGridView1.DataSource = dataTable;
 
}
 
void radGridView1_RowFormatting(object sender, RowFormattingEventArgs e)
{
    e.RowElement.RowInfo.Height = 120;
}

When loading data, i have (according to requirements) to disable the Grid control first, and enable it as soon as data loaded.
Here is an example:

private void radButton1_Click(object sender, EventArgs e)
     {
         radGridView1.Enabled = false;
 
         Random rnd = new Random((int)DateTime.Now.Ticks);
 
         dataTable.Clear();

         for (int i = 0; i < rnd.Next(1000); i++)
         {
             DataRow row = dataTable.NewRow();
             row[0] = i + 1;
             row[1] = "description" + i.ToString();
             dataTable.Rows.Add(row);
         }
 
         radGridView1.Enabled = true;
     }

After doing so, i have wrong painting behavior of the vertical scrollbar (it is only so in Office 2010 black theme!!), as it shown on the screenshot. See second image, as it should be expected.

In addition, i have experinced that the scroller thumb does not update it's height immediately, according to the added rows count.
It will only redraw itself when user is dragging it or resizing control.

I have tried: radGridView1.Invalidate(), but it does not help.

So far workarounds are:
1) decorating code with BeginUpdate/EndUpdate does partially fix the problem, scrollbar thumb does not change it's size
2) do not disable grid when loading data - works fine for me and even updates scrollbar thumb size, but i need to disable grid before doing data loading due to application requirements.


Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Nov 2014
14 answers
443 views

Hello,

I am new to Telerik WinControl. I’m using version 2012.3.1017.40.

I was looking for a control for displaying a chart-diagram in a Windows Forms application. I found the controls “RadChart” and “RadChartView”. Because of the advice of use the control “RadChartView” in your documentation I was making first experiences with this control the last days. As I can see so far, this control seems to be a powerful tool. Having created, configured this control and bound data to it I am looking for the possibility to print out the content of this control. In the documentation I have read that RadChartView does not support the functionality to export its content to a file. I would like to get to know if it is possible to print out the content of a “RadChartView” control anyway.

Karim el Safadi

Dimitar
Telerik team
 answered on 17 Nov 2014
4 answers
319 views
When a RadLabel enters the disabled state the fore color changes to gray. However, when the RadLabel is re-enabled the fore color does not return to it's former glory, rather it stays gray forever.

I can't seem to override this behavior even with a custom theme.

Edit: I tried setting the forecolor in radLabel1_EnabledChanged, but it never fired. The problem seems to be that when a RadLabel parent's Enabled flag is set to true, the RadLabel itself is never notified of the event.

If I manually set ".Enabled = true;" for every label on my form, they restore their original ForeColors as expected.

The RadLabel is in a SplitPanel which is in a RadSplitContainer, where the RadSplitContainer is the control being disabled / enabled.
George
Telerik team
 answered on 14 Nov 2014
11 answers
3.0K+ views

Hi,

I am working on the hierarchical grid and displaying data using self references.

My requirement is when i refresh the grid then the selectd row should be selected and the scroll bar
position should be at the same location but now when i refresh the scroll bar is moved to top of the grid.

could you please help me on the above requirement?

Thanks & Regards
Muralidhar Dasari

Code Snippet for refresh:- 
using (radGridView1.DeferRefresh())
  {
    this.radGridView1.TableElement.Update(GridUINotifyAction.DataChanged);
    this.radGridView1.TableElement.Update(GridUINotifyAction.StateChanged);
}
George
Telerik team
 answered on 14 Nov 2014
1 answer
204 views
We are looking to alter one of the standard themes, changing some of the details as well as the colours. Once complete, it will be necessary to make other themes that are the same but based on different colours.

I'm well aware of the usage of Visual Builder, so creating an initial theme is not a problem. I also have code that finds a theme in the currently loaded application, extracts all the images and alters the colours. I believe I can then create a clone of the theme and replace the images with the re-coloured versions, assuming the following code works

foreach (Telerik.WinControls.StyleRepository repository in theme.Repositories)
{
    if (repository.ItemType == "Image")
    {
        foreach (Telerik.WinControls.PropertySetting setting in repository.Settings)
        {
            if (setting.Name == "Image")
            {
                Bitmap bmp = GetBitMap(repository.Key);
                setting.Value = bmp
            }
        }
    }
}

What I'm stuck with, is how to save the altered theme back to a tssp file.

Any help would be appreciated. 

Thanks
Jason
George
Telerik team
 answered on 14 Nov 2014
1 answer
108 views
Hi, 

I am trying to setup the grid in the way that when ther user add a new item to the grid, it show something that the following html table:

<table>
  <tr>
       <td>Name</td>
       <td>Surname</td>
  </tr>
  <tr>
       <td colspan ='2'>Gender</td>
  </tr>
</table

Something like 2 rows in one

All works fine, when I add a new item to the grid it greate the layout correctly, but when I perform click on the cell of the second "subrow", grid do not raise CellDoubleClick event, it only raise the event if a click on the first subrow.

Any help would be appreciated.

this.radGridControlSelection.BeginInit();
this.radGridControlSelection.DataSource = this.dataList;           
 
HtmlViewDefinition view = new HtmlViewDefinition();
 
this.radGridControlSelection.ViewDefinition = view;
 
view.RowTemplate.Rows.Add(new RowDefinition());
view.RowTemplate.Rows.Add(new RowDefinition());
 
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Name"));           
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Surname"));
 
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Gender"));
view.RowTemplate.Rows[1].Cells[0].ColSpan = 2;
 
this.AsignTitlesToRadGridControlSelection();
Dimitar
Telerik team
 answered on 14 Nov 2014
1 answer
114 views
Good day community,

I have some questions about usage drag and drop for multiselect rows (with EnableLassoSelection).
When I set 
MultiSelect = true
and select rows using arrows, it work very nice, but when I set
MultiSelect = true
EnableLassoSelection = true;
multiselect does not work, because when I selected item and try grab it listview again tries to select rows.

Somebody knows how to fix it, or may be you have some working example.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 14 Nov 2014
1 answer
77 views
I added a new RadCheckBox from toolbox to my form. However, the object has not been initialized/instantiated in the Form1.Designer.cs code? So I have a button on a form, but I can't use it for anything.

How can I make sure that RadCheckBox that I added to the form has an object instance in the generated Telerik code? I could try to do it myself, but I note that this class states above the InitializeComponent() the following:

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()


So how to generate the code to make an object instance then? Please help. Thanks.
Stefan
Telerik team
 answered on 14 Nov 2014
1 answer
128 views
Is there a way to get the current text in the Search Box on the TableSearchRow?  I know you can set the value for the search criteria but is there anyway to return the current value?
Stewart
Top achievements
Rank 1
 answered on 13 Nov 2014
1 answer
783 views
I'm displaying some information in a panel using the RadLabel.  I noticed that you cannot select (i.e., drag and highlight) the RadLabel Text.  Is there a setting so that the label can be highlighted for copy and paste purposes by the user?

Thank you!

Best Regards,

Ed
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Nov 2014
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
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
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
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?