Telerik Forums
UI for WinForms Forum
3 answers
140 views
Hi,

I've been using the RadCarousel for a few months and I love it!

I've just been trying to figure out a way to resize the currently selected index in the carousel.

I understand that the zindex value can help tweak this, but i still would like it to zoom or make the selected index larger (im using movie covers as the elements in the carousel).

I thought about trying to make it zoom when selected, with some C# code, but then i ran into some problems un-resizing it when it is not selected anymore.

Any thoughts on how I can go about doing this?

Thanks!
Peter
Telerik team
 answered on 05 Jan 2010
2 answers
159 views
Hi,

I'm adding a RadButtonElement to a RadListBoxItem and would like it to be right aligned, but can't seem to do it.

Here is my code. The button is there, but stays on the left side.

 

privatevoid lbConnections_ItemDataBound(object sender, Telerik.WinControls.UI.ItemDataBoundEventArgs e)   
{  
    RadListBoxItem listBoxItem = (RadListBoxItem)e.DataBoundItem;  
 
    // Add button   
    RadButtonElement btn = new RadButtonElement();   
    btn.Alignment = ContentAlignment.MiddleRight;   
    btn.StretchHorizontally = false;   
    btn.StretchVertically = false;   
    btn.AutoSize = false;   
    btn.Size = new Size(15, 15);;   
    btn.Click += new EventHandler(btn_Click);   
    listBoxItem.Children.Add(btn);   
}  
 

 

 

 

 

 

Pierre Alain
Top achievements
Rank 1
 answered on 04 Jan 2010
1 answer
216 views
I have a combobox in a menu and I'd like to increase its width ; but setting the size in the designer doesn't work.
I've tried to set the minSize, maxSize and Size in my code, the combobox is then larger, but the text of selected items doesn't fit the whole width...
Victor
Telerik team
 answered on 04 Jan 2010
3 answers
196 views
I recently upgraded my project to RadControls for WinForms Q3 2009 SP1 and now due to the following errors my application will not even open. 

I get the following error whenever I try to set the ValueMember of a GridViewComboBoxColumn. The model I am using has a string for the text Display Member and an integer for the ValueMember. Other GridViewComboBoxColumns where I use a string and a string are not having this issue?

Value of '-2' is not valid for 'LargeChange'. 'LargeChange' must be greater than or equal to 0.
Parameter name: LargeChange
   at Telerik.WinControls.UI.RadScrollBarElement.set_LargeChange(Int32 value)
   at Telerik.WinControls.UI.GridTableElement.UpdateVScrollBarVisibility(SizeF bodySize)
   at Telerik.WinControls.UI.GridTableElement.UpdateChildViewHeight(Int32 delta)
   at Telerik.WinControls.UI.GridTableElement.Update_OperationChanged(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
   at Telerik.WinControls.UI.GridTableElement.UpdateCore(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
   at Telerik.WinControls.UI.GridViewTemplate.UpdateUI(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
   at Telerik.WinControls.Data.DataAccessComponent.FilterExpressionChanged2()
   at Telerik.WinControls.UI.GridViewDataColumn.set_DataType(Type value)
   at Telerik.WinControls.UI.GridViewLookUpColumn.SetFieldDescriptors()
   at LeaseTracker.Views.TrackerGrid.InitializeIsSBAN() in F:\Projects\LeaseTracker\LeaseTrackerProj\LeaseTracker\Views\TrackerGrid.cs:line 1004
   at LeaseTracker.Views.TrackerGrid.InitializeGridDropDowns() in F:\Projects\LeaseTracker\LeaseTrackerProj\LeaseTracker\Views\TrackerGrid.cs:line 956
   at LeaseTracker.MainForm.PopulateGrid(String name) in F:\Projects\LeaseTracker\LeaseTrackerProj\LeaseTracker\MainForm.cs:line 448
   at LeaseTracker.MainForm.OnTabSelected(Object sender, TabEventArgs args) in F:\Projects\LeaseTracker\LeaseTrackerProj\LeaseTracker\MainForm.cs:line 436
   at Telerik.WinControls.UI.TabEventHandler.Invoke(Object sender, TabEventArgs args)
   at Telerik.WinControls.UI.RadTabStripElement.RaiseTabSelected(RadElement tab)
   at Telerik.WinControls.UI.RadTabStripElement.SetIsSelected(RadElement childElement, Boolean value)
   at Telerik.WinControls.UI.RadTabStripElement.SetSelectedTab(RadElement tabElement)
   at Telerik.WinControls.UI.TabItem.set_IsSelected(Boolean value)
   at LeaseTracker.MainForm.InitializeComponent() in F:\Projects\LeaseTracker\LeaseTrackerProj\LeaseTracker\MainForm.Designer.cs:line 514
   at LeaseTracker.MainForm..ctor() in F:\Projects\LeaseTracker\LeaseTrackerProj\LeaseTracker\MainForm.cs:line 39
 

Pseudo Code below shows the lines where this is occur and sample model I refer to above : 
 
private void InitializeTechnology () { 
    IList<DropDownIntItem> ddList = ListTechnology(); 
    this.TechnologyColumn.DataSource = ddList; 
    this.TechnologyColumn.DisplayMember = "Name"
    this.TechnologyColumn.ValueMember = "ID"// ERRORS HERE 
 
// ~~~ // 
 
public class DropDownIntItem { 
    private string _name; 
    private int _id; 
 
    public DropDownIntItem(int id, string nam) { 
        this._name = nam; 
        this._id = id; 
    } 
 
    public string Name { 
        get { return _name; } 
    } 
 
    public int ID { 
        get { return _id; } 
    } 


======================================================================

Even if I comment out all the ValueMember items being set for the various combobox columns I still receive the same error on the following line of code later in the process:

this.gridView.MasterGridViewTemplate.GroupByExpressions.Clear(); 

   
Value of '-2' is not valid for 'LargeChange'. 'LargeChange' must be greater than or equal to 0.
Parameter name: LargeChange
   at Telerik.WinControls.UI.RadScrollBarElement.set_LargeChange(Int32 value)
   at Telerik.WinControls.UI.GridTableElement.UpdateVScrollBarVisibility(SizeF bodySize)
   at Telerik.WinControls.UI.GridTableElement.UpdateChildViewHeight(Int32 delta)
   at Telerik.WinControls.UI.GridTableElement.Update_GroupingChanged(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
   at Telerik.WinControls.UI.GridTableElement.UpdateCore(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
   at Telerik.WinControls.UI.GridViewTemplate.UpdateUI(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
   at Telerik.WinControls.Data.ExpressionHelper.GroupByExpressionsChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.WinControls.Data.ExpressionFieldCollection`1.NotifyListenersCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.WinControls.Data.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.WinControls.Data.ObservableCollection`1.OnCollectionReset(IList oldItems)
   at Telerik.WinControls.Data.ObservableCollection`1.ClearItems()
   at Telerik.WinControls.Data.ItemObservableCollection`1.ClearItems()
   at System.Collections.ObjectModel.Collection`1.Clear()
   at LeaseTracker.Views.TrackerGrid.LoadGridData() in F:\Projects\LeaseTracker\LeaseTrackerProj\LeaseTracker\Views\TrackerGrid.cs:line 1057


   
   
NOTE : I was having similar errors with LargeChange here -> http://www.telerik.com/community/forums/winforms/forms-and-dialogs/minimizing-radform-largechange-error.aspx
I have not had time to reproduce this in a smaller application as yet, but they may be linked so I am referencing it here just in case.
Svett
Telerik team
 answered on 04 Jan 2010
3 answers
410 views
I've bound my RadGrid to a data reader, and added a GridViewCommandColumn.  How do I set the value of this button, so that when I catch the _OnClick_ event, I'll know a unique id for that row (and not the row # or column #)?

I've tried setting:
.FieldName = "db_field_with_value"

Thanks!
Nikolay
Telerik team
 answered on 04 Jan 2010
2 answers
122 views
I have created a new windows application c# project, and all I have done is to drag a RadRibbonBar control onto the default form. The only other thing I have done is to add the following debug statements into the form method:

            Debug.WriteLine(DateTime.Now);
            InitializeComponent();
            Debug.WriteLine(DateTime.Now);

When I run the project it takes 8 seconds to show the form - a form with a standard MS toolbar is instantaneous.

System is as follows:
Windows 7 Ultimate x 64
Visual Studio 8 SP1
AMD Phenom II 965

Anyone offer any advice?

Thanks.
Craig Booth
Top achievements
Rank 1
 answered on 04 Jan 2010
13 answers
473 views
Hello,

I'm trying to do the following.

I've got a gridview that is triggered depending on which button you click (active and inactive button). So when active is clicked the gridview is loaded with all the active items and vice versa.

Now in my gridview I've got one combobox column filled with 3 states (values: import, active, inactive). What I want to do is if the active items are loaded then in the combobox you can't select the active value and visa versa for inactive. the import values is always enabled.

Next what I thought of doing is to have a combobox in my header of the grid. So if I select for example "import" in the header all items in the gridview will be set to be imported. A little like the checkbox in the header I guess.

I looked for both things on the telerik forum and knowledge base but can't seem to find anything useful.

Thanks in advanced.
Gerbrand
Jack
Telerik team
 answered on 04 Jan 2010
16 answers
257 views
Hi,

I have a requirement and need to evaluate if RadGridView can support this.

I need to display hierarchical data in the grid. The data can span unto 4 levels. To clarify it further, say I have Manufacturer, Retailer and consumer. Here the consumer can directly purchase from a manufacturer. Or he can consume from a retailer. Also retailer can purchase from the manufacturer. I am interested in showing up the data in a user friendly format. I have tried these 2 options

1. Group by feature and realized that even when the consumer purchases directly from Manufacturer, the data for the consumer is displayed at 3rd level. Since the data is grouped on Manufacturer and then the Retailer. So here the consumer is shown as Manufacturer1-> Retailer (EMPTY)-> Consumer.
2. The other option was showing the data establishing relationship between tables. This served the purpose but the view is unfriendly. The user has to scroll up and down too much to view the data.

Please let me know if there is a possibility with RadGridView to support this requirement. To summarize it, I need to display data hierarch ally where I have Manufacturer, Retailer and Consumer. The Consumer can purchase from both Retailer and Manufacturer. And Retailer can buy only from Manufacturer. So the hierarchy can be

-Manufacturer1
    -Retailer1
        -Consumer2
        -Consumer3
    -Consumer1
-Manufactuer2
    -Consumer4
    -Retailer2
        -Consumer5
    Retailer2

Regards,
Reshu
 
Nick
Telerik team
 answered on 04 Jan 2010
3 answers
153 views
RadButtonElement text disappears after window is restored from minimised state (to system tray).

Attachment 01 shows state prior to minimising.

Attachment 02 shows state after restoring from minimised state.

Only this RibbonTab is affected (not Windows, or Create).

If another tab is selected, then window is minimised, and restored, text re-appears on Task List tab.

If window is minimised and restored without selecting another tab, text still does not appear.

Tried calling RepaintElements(). No change in behaviour.
Nikolay
Telerik team
 answered on 04 Jan 2010
2 answers
98 views
Forgive the cross-post, but I didn't realize until afterwards that GridViewLookUpColumn should be asked here instead.
I have a GridView that has three columns. The first is read only and named RuleKeyGuid. The second is called RuleKey, and the last is called KeyValue. I'd like for the second column to be a drop-down that suggests what the user might be looking for based on a data source. Here's what I entered:

System.Collections.IDictionaryEnumerator iterator = sortedRuleKeys.GetEnumerator();
while (iterator.MoveNext())
{
    GridViewRowInfo rowInfo = radGridView_RuleKeys.Rows.AddNew();
    rowInfo.Cells[0].Value = ((RuleKey)iterator.Value).RuleKeyGuid.ToString();
    rowInfo.Cells[1].Value = ((RuleKey)iterator.Value).keyName;
    rowInfo.Cells[2].Value = ((RuleKey)iterator.Value).keyValue;
}

((GridViewLookUpColumn)radGridView_RuleKeys.Columns[1]).AutoCompleteMode = AutoCompleteMode.SuggestAppend; 
((GridViewLookUpColumn)radGridView_RuleKeys.Columns[1]).DropDownStyle = RadDropDownStyle.DropDown; 
 
DataTable dt = new DataTable(); 
dt.Columns.Add("RuleKey"typeof(string)); 
dt.Rows.Add("Mobile"); 
dt.Rows.Add("Business"); 
dt.Rows.Add("Fax"); 
((GridViewLookUpColumn)radGridView_RuleKeys.Columns[1]).DataSource = dt; 

If I make changes in the grid to cells in the third column, it works just fine. But I can't change the second column. When I type, it seems to be accepting whatever I'm typing, but when I hit enter, it goes away.

I have two problems here.
1) The value that I've manually set the cell to doesn't show up unless it's a member of the DataSource.
2) The user cannot enter any value other than what is in the DataSource. If they type something in, it doesn't "stick". You hit Enter and the value reverts to whatever it was before.

How do I go about addressing this? They both seem to be related. Is there a setting I'm missing or am I approaching this problem incorrectly?
Svett
Telerik team
 answered on 04 Jan 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)
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
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
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
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?