Telerik Forums
UI for WinForms Forum
2 answers
119 views
hi,
How can i changing the selected color of tooltabstrip caption?
Ivan Todorov
Telerik team
 answered on 22 Mar 2011
1 answer
71 views
I know you have issues with the scale values changing when I click Show Weekends, or change views. It's been noted in a few other threads. So, the questions are

Is it fixed in the new realease (2011Q1)?

What's the workaround?

Later
Art
Dobry Zranchev
Telerik team
 answered on 22 Mar 2011
8 answers
132 views
Hello,

I just upgraded the newest release for winforms using the upgrade wizard and now i can't place any radcontrols on to the form nor can i select radcontrols already existing on my forms before the upgrade.

Please help,
francis
KawaUser
Top achievements
Rank 2
 answered on 22 Mar 2011
5 answers
542 views
When populating a dropdownlist control the selected index changes, which triggers the action I have setup for the index changing... however when I initially populate the dropdownlist by setting a datatable as its datasource and defining the display and value members, the radDropDownList.SelectedItem.Value is a DataRowView object.  After it's populated, though, the radDropDownList.SelectedItem.Value is an integer as it should be.  Can this be explained to me why this is happening and the best way to work with it?

My code currently is this, and it will only work when I initially set the datasource:
private void someOtherMethod ()
{
       sysParentDropDown.DataSource = dt;
       sysParentDropDown.DisplayMember = "name";
       sysParentDropDown.ValueMember = "panelid";
 
       sysParentDropDown.SelectedIndex = -1;
 
}
 
 
private void sysParentDropDown_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
        {
            if (this.sysParentDropDown.SelectedIndex > -1)
            {
                sysDeviceDropDown.Enabled = true;
                try
                {
                    sysDeviceDropDown.DataSource = null;
                    sysDeviceDropDown.Text = null;
                    sysInputDropDown.DataSource = null;
                    sysInputDropDown.Text = null;
 
                    DataRowView drv = (DataRowView)this.sysParentDropDown.SelectedItem.Value;
 
                    string s = "(panelid = " + drv.Row["panelid"].ToString() + ") AND (devid <> 0) AND (inputdevid = 0)";
                    DataRow[] foundRows = deviceNames.Select(s, "name asc");
 
                    DataTable dt = new DataTable("temp");
                    dt.Columns.Add("name");
                    dt.Columns.Add("devid");
 
                    foreach (DataRow dr in foundRows)
                    {
                        dt.ImportRow(dr);
                    }
 
                    DataRow row = dt.NewRow();
                    row["name"] = "";
                    row["devid"] = " ";
                    dt.Rows.InsertAt(row, 0);
 
                    sysDeviceDropDown.DisplayMember = "name";
                    sysDeviceDropDown.ValueMember = "devid";
                    sysDeviceDropDown.DataSource = dt;
 
 
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            else
            {
                sysDeviceDropDown.Enabled = false;
                sysDeviceDropDown.SelectedText = null;
                sysInputDropDown.Enabled = false;
                sysInputDropDown.SelectedText = null;
            }
        }

Thanks for your time
Peter
Telerik team
 answered on 22 Mar 2011
16 answers
489 views
hi,
I have a RadTextBox in MultiLine mode with a NullText. I add text with my code, but I have always a empty line at the end.
How can I remove that? Sounds as a pretty easy task, but for some reason it doesnot work for me, the empty line at the end is never removed.
Regards, Andreas
Ivan Petrov
Telerik team
 answered on 22 Mar 2011
1 answer
88 views
Hello,

I have a scenario where I need to have cell text to display one databound field from an entity property, but when in edit mode I would like to use a dropdownlist to change the underlying entity itself and not the value being displayed.

For example my entity in simple terms is as follows:

Vehicle (Main databound entity)
-- Vehicle.Make (relates to Make entity)
-- Vehicle.Model (relates to Make entity)
-- Vehicle.Year (relates to Year entity)
-- Vehicle.Region (relates to Region entity)

Make
-- Make.MakeID
-- Make.MakeName

Model
-- Model.ModelID
-- Model.ModelName

Year
-- Year.YearID

Region
-- RegionID
-- RegionAbbr
-- RegionFullName

I would like to have for example a Region column that displays Region.RegionAbbr in the cell text, but when entering edit mode give a list bound to Region enities.  These entries should be bound to a List<Region> and displaymember should be set to RegionAbbr for display purposes.  When an entity is selected from the dropdown, instead of altering Region.RegionAbbr I would like to intercept the change and assign the Dropdownlist DataBoundItem to the Vehicle.Region entity.

Can this be done?
Martin Vasilev
Telerik team
 answered on 22 Mar 2011
1 answer
92 views
Greetings,

After adding a new row, how can I place the cursor in the first column in the new row position?  I have tried the following but it doesn't work:

private void gv_UserAddedRow(object sender, GridViewRowEventArgs e)
       {
           gv.CurrentRow = gv.MasterView.TableAddNewRow;
           gv.CurrentColumn = gv.Columns[0];
           gv.BeginEdit();
       }
Martin Vasilev
Telerik team
 answered on 22 Mar 2011
7 answers
334 views
Hello, 
I am trying to change color of the header cell in currently selected column. I tried to achieve this as it is done in this post Change of back color, however the header cells will start to react only if the user hovers with mouse over specified columns before he starts clicking into the grid. 

Here is the code snippet I use
        void electionChanged(object sender, EventArgs e)
        {
            if (SelectedCells.Count == 0)
                return;
            int index = SelectedCells[0].ColumnInfo.Index;

            if (MasterGridViewInfo.TableHeaderRow.Cells[index].CellElement == null)
                return;

           for (int i = 0; i < Columns.Count; i++ )
                MasterGridViewInfo.TableHeaderRow.Cells[i].CellElement.ResetValue(LightVisualElement.BackColorProperty);

            MasterGridViewInfo.TableHeaderRow.Cells[index].CellElement.SetValue(
                LightVisualElement.BackColorProperty, Color.Blue);
        }

Can you please pinpoint where is the problem?
Richard Slade
Top achievements
Rank 2
 answered on 21 Mar 2011
4 answers
360 views

Hi

 

Users of my app some time ago reported issue with memory leak, so I started investigation and it looks that there is problem with RadGridView.

 

 

This is my sample code:

 

 

 

public partial class Form1 : Form
{
    BindingList<Package> _packages = new BindingList<Package>();
    BindingList<PackageItem> _items = new BindingList<PackageItem>();
    public Form1()
    {
        InitializeComponent();
        radGridView1.DataSource = _packages;
        radGridView1.ReadOnly = true;       
     
        GridViewTemplate viewItemsTemplate = new GridViewTemplate();
        viewItemsTemplate.DataSource = _items;
        this.radGridView1.MasterTemplate.Templates.Add(viewItemsTemplate);
 
        GridViewRelation relation = new GridViewRelation(radGridView1.MasterTemplate);
        relation.RelationName = "myRelation";
        relation.ChildTemplate = viewItemsTemplate;

        relation.ParentColumnNames.Add("Id");
        relation.ChildColumnNames.Add("PackageId");

        this.radGridView1.Relations.Add(relation);
        _packages.Add(new Package() { Id = "1", Name = "Package1" });
        _items.Add(new PackageItem() { Id = "1", PackageId = "1", Name = "Item1 in package1" });
        _items.Add(new PackageItem() { Id = "2", PackageId = "1", Name = "Item2 in package1" });
        _packages.Add(new Package() { Id = "2", Name = "Package2" });
        _items.Add(new PackageItem() { Id = "3", PackageId = "2", Name = "Item1 in package2" });
        _items.Add(new PackageItem() { Id = "4", PackageId = "2", Name = "Item2 in package2" });
        radGridView1.BestFitColumns();
    }
    private void btnDelete_Click(object sender, EventArgs e)
    {
        radGridView1.BeginUpdate();
        PackageItem pi = _items[0];
        _items.Remove(pi);
        radGridView1.EndUpdate();
    }
}

 

 

 

 

 

 

 

When I delete row I call BeingUpdate() and EndUpdate(), this is needed – without these calls row is not deleted and after click on row exception is thrown.

 

The problem for sure is missing unhooking event RadGridView.ThemeNameChanged (I do not know if there are other missing unhooks).

 

 

 

TO SEE this problem before deleting row YOU HAVE TO expand child rows!

 

 

I used profiler and I have seen that there are types that hook this event and do not unhook after disposing! These types are: GridDetailViewCellElement, GridDetailViewRowElement, GridTableElement. You can check details in screen shots.

How can I solve this problem? This is really urgent issue for me – I have a lot of updates in my grid and after couple hours there is always out of memory exception caused by my app.

Regards

 

 

Jack
Telerik team
 answered on 21 Mar 2011
3 answers
201 views
We use the Desktop Alerts quite extensive now, but something annoys me:
When RadDesktopAlerts became visible while i am editing in a RadTextBox it seems to steal the focus. I can still type letters but delete and return keys are disabled. When the RadDesktopAlert disappears (we use the autoclose property) the keyboard works again and i can continue with the TextBox. Is there something you can do to fix this in the next version? Or is there already a setting to keep the Alert in the background?

You can see the problem in your samples: Desktop Alert->Settings
Preview the Alert and edit in the "Delay" text box. You can add numbers but delete and return keys are redirected to the desktop alerts.

Best regards

Bernd
Bernd Mueller
Top achievements
Rank 1
 answered on 21 Mar 2011
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?