Telerik Forums
UI for WinForms Forum
1 answer
104 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
190 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
587 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
588 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
101 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
119 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
468 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
411 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
231 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
2 answers
138 views
Hello,
I'm working with a GridView in bound mode. It's bounded with a List which receives new rows during execution time. At a certain point, a new row is added, this row turns to be the selected one and the gridview scrolls. That's my problem: I want it to maintain the line (chosen previously by the user) as the one selected. But, this is not the beahaviour I'm getting, because every row which is added or updated becomes the one selected.
How can I make the selected row stay the same while adding this new rows to the bounded list?

Thanks,
Alexandre
Alexandre
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)
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
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
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?