Telerik Forums
UI for WinForms Forum
10 answers
293 views
Hi
I have two columns on my gridview that need to be calculated. Column One is (A - B) Column B is (Result of Column One * Qty Ordered).
No matter how I write this I am getting an error saying "cannot remove this column because it is part of an expression "A - B""
How do I get around this issue.
Thanks
Em
Emanuel Varga
Top achievements
Rank 1
 answered on 11 Oct 2010
2 answers
309 views
Random question:

Is there a way to make this control do scrolling text?

example
textbox would contain:

"this is a.."
"his is a t"
"is is a te"
"s is a tes"
" is a test"
"is a test "

I'm not that was not necessary, but eh. 
Anyone know?'

Emanuel Varga
Top achievements
Rank 1
 answered on 11 Oct 2010
15 answers
795 views
I am trying to add an image next to the text information in the ListBox.

I have a imageList that has the images i want to display.  I tried something like this.

RadListBoxItem test1 = new RadListboxItem("ITEM" + imageList1.Images[0]);
radListBox1.Items.Add(test1);

But all i get is the "ITEMSystem.Drawing.Bitmap" instead of the image.... 
Peter
Telerik team
 answered on 11 Oct 2010
3 answers
462 views
Hi,

I have a hierarchical gridview with checkbox column. I have a checkbox in header as well.
When the header checkbox is checked/unchecked all other rows gets checked/unchecked accordingly.
But when i do the same in Child it is not working properly.
When i check/uncheck header of Child then the child rows of only expanded row should get checked/unchecked but not all the child rows.
Right now its applying changes for all child rows but i want it only for expanded row.

Below is my code:
<
private void AddCheckColumn(fc_rad_dataGridView dataGridView)
        {
            CustomCheckBoxColumn checkColumn = new CustomCheckBoxColumn();
            checkColumn.Name = "IsActive";
            checkColumn.FieldName = "Active";
            if (!dataGridView.Columns.Contains("IsActive"))
                dataGridView.Columns.Insert(dataGridView.Columns.Count - 1, checkColumn);
        }

public class CustomCheckBoxColumn : GridViewCheckBoxColumn
    {
        public override Type GetCellType(GridViewRowInfo row)
        {
            if (row is GridViewTableHeaderRowInfo)
            {
                return typeof(CheckBoxHeaderCell);
            }
            return base.GetCellType(row);
        }
    }

    public class CheckBoxHeaderCell : GridHeaderCellElement
    {
        RadCheckBoxElement checkbox;

        protected override Type ThemeEffectiveType
        {
            get
            {
                return typeof(GridHeaderCellElement);
            }
        }

        public CheckBoxHeaderCell(GridViewColumn column, GridRowElement row)
            : base(column, row)
        {

        }

        public override void Initialize(GridViewColumn column, GridRowElement row)
        {
            base.Initialize(column, row);
            column.AllowSort = false;
            column.TextAlignment = ContentAlignment.MiddleRight;
        }

        public override void SetContent()
        {
        }

        protected override void DisposeManagedResources()
        {
            checkbox.ToggleStateChanged -= new StateChangedEventHandler(checkbox_ToggleStateChanged);
            base.DisposeManagedResources();
        }

        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            checkbox = new RadCheckBoxElement();
            checkbox.ToggleStateChanged += new StateChangedEventHandler(checkbox_ToggleStateChanged);
            this.Children.Add(checkbox);
        }

        protected override SizeF ArrangeOverride(SizeF finalSize)
        {
            SizeF size = base.ArrangeOverride(finalSize);

            RectangleF rect = GetClientRectangle(finalSize);
            this.checkbox.Arrange(new RectangleF((finalSize.Width - this.checkbox.DesiredSize.Width) / 2, (rect.Height - 20) / 2, 20, 20));

            return size;
        }

        public override bool IsCompatible(GridViewColumn data, object context)
        {
            return data.Name == "IsActive" && context is GridTableHeaderRowElement
                && base.IsCompatible(data, context);
        }

        private void checkbox_ToggleStateChanged(object sender, StateChangedEventArgs args)
        {  
            if (this.ColumnInfo is GridViewCheckBoxColumn)
            {
                bool valueState = false;

                if (args.ToggleState == Telerik.WinControls.Enumerations.ToggleState.On)
                {
                    valueState = true;
                }
                for (int i = 0; i < this.ViewTemplate.Rows.Count; i++)
                {
                    this.ViewTemplate.Rows[i].Cells[this.ColumnIndex].Value = valueState;
                }
            }
        }
    }
>

Thanks,
Pinaki
Svett
Telerik team
 answered on 11 Oct 2010
2 answers
171 views
What is the equivalent to use?:

Grid.MasterTemplate.GroupByExpressions (i). SelectFields.Count
  
Dim col As New Telerik.WinControls.UI.GridViewDataColumn()
  
Grid.MasterView.TableHeaderRow.Cells(i).CellElement
  
ByVal Group As Telerik.WinControls.UI.AggregateCollection
  
Dim headerCell As GridCellElement = grid.MasterView.TableHeaderRow.Cells(i).CellElement

In the new version.

Thanks.
Martin Vasilev
Telerik team
 answered on 11 Oct 2010
2 answers
169 views
After opening a new form and return to the window where the grid, this can not change the column size as normal

Video show error Filename "Error Grid":
Error grid.swf

RobertoCorona
Top achievements
Rank 2
 answered on 11 Oct 2010
2 answers
202 views
Hi,
I'm trying to set the tooltiptext of the radbutton with a title (first row in bold style) and a second part where write the description,
for instance like the microsoft word 2010 style.
First of all, I would like to know if is it possible to do, and if yes, how ?

thank you so much
Jean-Marc Windholz
Top achievements
Rank 1
 answered on 11 Oct 2010
1 answer
129 views
Hi All,
I have been working on WebApplication for some time and now I have to work on Windows application..So I installed telerik controls for windows application.But after installation once I opened the VS 2008 IDE,Telerik tool box controls are not getting enabled.

Please help me to solve this.

I have the telerik controls web application still in my machine.Is ther any problem if we have both forms of telerik controls in one machine.

Thanks,
A2H
Richard Slade
Top achievements
Rank 2
 answered on 11 Oct 2010
1 answer
306 views
Hi,

I have a query on the DataBinding of DataGridView to BindingList object.

I have a Class called Customer having a structure decribed as Below.

 

public class Customer

 

{

 

public int CutomerType { get; set; }

 

 

public string CustomerName { get; set; }

 

}

 


public
class LookupData

 

{

 

public int Key

 

{

 

get;

 

 

set;

 

}

 

public string Value

 

{

 

get;

 

 

set;

 

}

 

public override string ToString()

 

{

 

return this.Value;

 

}

}

I have created a BindingList<Customer> and binded with the DataGrid. The Grid has 2 columns

1) GridViewComboBoxColumn - with Data source as List of Lookup data and the FieldName as CustomerType
2) GridViewTextBoxColumn - for CustomerName

Everything works fine , I am able to Add, Update and Delete entries.

But my problem is When I add a new row the , the new customer object is added to the BindingList only after I come out of the Grid row.
 
I want to add a new Customer Item to my BindingList when the user adds a new row and selects a CustomerType.

Note : I checked with Normal Winform Grid and It adds an entry if I select Customer Type alone.

Can you please let me know if there is any option available for this..

Thanks
Abhilash

Emanuel Varga
Top achievements
Rank 1
 answered on 11 Oct 2010
1 answer
188 views
Hi mates,
We are at the end of developing a client application in winforms (of course using Telerik Winforms controls). But application is going to be large and I want to see opportunities to separate in "modules". 
I am interested to know if I can implement MEF (Managed Extensibility Framework) with telerik winforms controls, and if exist any sample out there?

*We are using rad dock as parent for our mdi forms display.
Richard Slade
Top achievements
Rank 2
 answered on 10 Oct 2010
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
SyntaxEditor
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
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
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?