Telerik Forums
UI for WinForms Forum
1 answer
259 views

Hello,

I was unchecking a cell programmatically and was expecting the same behavior as when I uncheck it through the UI, but it seems that the header checkbox is not updated when you modify a cell's value programmatically:

private void RadForm1_Load(object sender, EventArgs e)
{
    radGridView1.AllowSearchRow = true;
    radGridView1.TableElement.SearchHighlightColor = Color.Orange;
    radGridView1.AutoExpandGroups = true;
 
    DataTable dt = new DataTable();
 
    dt.Columns.Add("test", typeof(bool));
 
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
    dt.Rows.Add(true);
 
    radGridView1.DataSource = dt;
 
    ((Telerik.WinControls.UI.GridViewCheckBoxColumn)radGridView1.Columns[0]).EnableHeaderCheckBox = true;
    ((Telerik.WinControls.UI.GridViewCheckBoxColumn)radGridView1.Columns[0]).Width = radGridView1.Width - 50;
 
    radGridView1.TableElement.Update(Telerik.WinControls.UI.GridUINotifyAction.Reset); //force header checkbox to check
 
    radGridView1.TableElement.ScrollTo(15, 0);
}
 
private void radButton1_Click(object sender, EventArgs e)
{
    radGridView1.Rows[0].Cells[0].Value = false;
}

I have tried adding radGridView1.TableElement.BeginUpdate() to the beginning & radGridView1.TableElement.EndUpdate() to the end of radButton1_Click, along with radGridView1.TableElement.Update(Telerik.WinControls.UI.GridUINotifyAction.ExpandedChanged) & radGridView1.TableElement.Update(Telerik.WinControls.UI.GridUINotifyAction.Reset) immediately after changing the cell's value, but all of these lines seem to invalidate the RadGridView in one way or another. They cause the search row's buttons to flicker and scroll the RadGridView up to the top.

Is there a solution to this problem that will result in behavior similar to checking/unchecking a cell using the UI?

Thank you!

Dimitar
Telerik team
 answered on 02 May 2016
1 answer
320 views
Im trying to use this code to get each listview item with the default system's icon. Can get it to work with common listview, but not with radListView. Any idea on how to make it work?

 

ListView listView1;
ImageList imageList1;
 
public void ExtractAssociatedIconEx()
{
    // Initialize the ListView, ImageList and Form.
    listView1 = new ListView();
    imageList1 = new ImageList();
    listView1.Location = new Point(37, 12);
    listView1.Size = new Size(151, 262);
    listView1.SmallImageList = imageList1;
    listView1.View = View.SmallIcon;
    this.ClientSize = new System.Drawing.Size(292, 266);
    this.Controls.Add(this.listView1);
    this.Text = "Form1";
 
    // Get the c:\ directory.
    System.IO.DirectoryInfo dir = new System.IO.DirectoryInfo(@"c:\");
 
    ListViewItem item;
    listView1.BeginUpdate();
 
    // For each file in the c:\ directory, create a ListViewItem
    // and set the icon to the icon extracted from the file.
    foreach (System.IO.FileInfo file in dir.GetFiles())
    {
        // Set a default icon for the file.
        Icon iconForFile = SystemIcons.WinLogo;
 
        item = new ListViewItem(file.Name, 1);
        iconForFile = Icon.ExtractAssociatedIcon(file.FullName);
 
        // Check to see if the image collection contains an image
        // for this extension, using the extension as a key.
        if (!imageList1.Images.ContainsKey(file.Extension))
        {
            // If not, add the image to the image list.
            iconForFile = System.Drawing.Icon.ExtractAssociatedIcon(file.FullName);
            imageList1.Images.Add(file.Extension, iconForFile);
        }
        item.ImageKey = file.Extension;
        listView1.Items.Add(item);
    }
    listView1.EndUpdate();
}
Dimitar
Telerik team
 answered on 02 May 2016
5 answers
55 views

Hello,

I would like use attribut to rename headercolum with AutoGenerateColumns .

Like :

[Description("Employ Number")]

public int EmployeeId { get; set; }

Possible ?

thank you

Dimitar
Telerik team
 answered on 02 May 2016
1 answer
232 views

Delete only this occurance: calls update event - I want to change it to delete event 

where do I find right click context menu of edit & delete and its event bindings

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 May 2016
19 answers
301 views
Having problem in Edit Appointment Form Size 
can some one help me. . 

Just Click the attached file

Thanks


Windows 7 Enterprise SP1
En-PH
.Net 4.5
RadControls (Q1 2013) v2013.1.220.40 Dev

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 May 2016
3 answers
386 views
Hello,

I have created a custom theme for our application. I have themed the RadGridView and the RadScrollbars. The issue I have is the scrollbars on the grid.do not respect the theme that was created for the scrollbars. The scrollbar theme does not have dark borders around all of the objects, they are light gray. Yet the grid does not have the light borders. Is these something I am missing?

There is a screen shot attached.

Thanks,

Ben

Dimitar
Telerik team
 answered on 02 May 2016
4 answers
411 views

Hello,

Let me start with what my overall goal is, just in case I'm taking the completely wrong approach to this:
I have multiselect turned on on my RadGridView. I would like to allow a user to quickly select all the ChildRows of a group by just clicking on that specific GroupRow. I would also like to allow them to select multiple groups at the same time by holding shift or ctrl. This could be a combination of ChildRows and GroupRows.

 

Here's what I've tried doing:
1. Using the SelectionChanged event. When I select a GroupRow, the SelectedRows.Count property of my RadGridView is 0 (ie the IsSelected property of the GroupRow that I just selected is still false). I could use the CurrentRow property and just set all of the ChildRows of the current GroupRow to selected, but if the user holds down shift and selects many GroupRows at once, this will only catch the last one.

2. Using the CurrentRowChanged event. I'm not able to use this for the same reason as above: I can only select the ChildRows of the GroupRow that is last in the selection list.

3. Using the SelectionChanging event. Surprisingly, only a single row exists in e.Rows, despite me selecting multiple GroupRows.

 

So I'm left with CurrentRowChanging. With this event, I'm given the OldRow and the NewRow, so it is (probably) possible to determine if the user is holding down ctrl or shift, determine whether the user has filtered or sorted the rows, and then manually select each ChildRow under each GroupRow based on this logic, but that just seems a little obscure and unnecessary.

 

Here is my code (there's nothing to it)... I tried programatically selecting the 2nd group row as well, but the property will not set:

private void RadForm1_Load(object sender, EventArgs e)
{
    DataTable dt = new DataTable();
 
    dt.Columns.Add("col1", typeof(string));
    dt.Columns.Add("col2", typeof(int));
 
    dt.Rows.Add("group1", 0);
    dt.Rows.Add("group1", 1);
    dt.Rows.Add("group1", 2);
    dt.Rows.Add("group1", 3);
    dt.Rows.Add("group2", 0);
    dt.Rows.Add("group2", 1);
    dt.Rows.Add("group3", 0);
    dt.Rows.Add("group3", 1);
    dt.Rows.Add("group4", 0);
    dt.Rows.Add("group5", 1);
    dt.Rows.Add("group6", 0);
    dt.Rows.Add("group7", 1);
 
    radGridView1.DataSource = dt;
    radGridView1.GroupDescriptors.Add(new Telerik.WinControls.UI.GridGroupByExpression("col1 GROUP BY col1"));
 
    radGridView1.Groups[1].GroupRow.IsSelected = true;
}

 

Thank you!

Dimitar
Telerik team
 answered on 02 May 2016
1 answer
182 views

Hello,

Is it possible to put an image on a RadMenu bar, and have it aligned all the way to the right?  You would have your standard menus (File, Edit, Help) on the left, and at the other end place a logo image.

 

Thanks,

George

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 May 2016
3 answers
181 views

Hi, 

Is it possible to mail merge labels as you can do in Word? I can't find this feature anywhere on the mail merge documentation.

I did find this feature request but I don't know if this is requesting the feature for Winforms and if the feature has been implemented yet.

 

Best Regards

Mohammed

Dimitar
Telerik team
 answered on 02 May 2016
7 answers
572 views

Hi,

Labview has a .NET Container to host .Net Windows Forms Controls *)

I make a simple Example with  2 .NET Containers for RadPropertyGrid  and PropertyGrid .

And assign a new instance of Printdialog of System.Windows.Forms to SelectedObject.

I thought I could replace the PropertyGrid  with RadPropertyGrid  (more features,  modern look), but RadPropertyGrid doesnt work.

What could be the problem?

I attached also the simple Labview 2015 vi (rename PropGrid.vi.gif to PropGrid.vi)

Peter

*) see an complex Example with Datagridview: https://github.com/unipsycho/LabVIEWdotNetDataGrid

Hristo
Telerik team
 answered on 29 Apr 2016
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
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?