Telerik Forums
UI for WinForms Forum
15 answers
595 views
I need to create a gridview (winforms) that has two comboboxes where one of the comboboxes' available values are determined by the selection in the first combobox. This seems straightforward but I have run into problems with all the approaches I have tried so far.

I tried the following:
1) In the Cell Value Changed event I tried rebinding the  dependent combobox in the based on the selection in the first. The problem that I encounter is that while the combobox is is rebound with the data I am looking for it rebinds the combobox in all of the rows in the grid blanking out selections whose value is no longer one of the combobox values.

2) I also tried capturing the cell formatting event and adding a new RadComboBoxElement to the cell and populating the the combobox element by adding items to it.  While this does work, the grid's theme doesn't flow through and the grid appears be acting buggy. I've run into a problem when populating this combobox element when it is scrolled off the screen (row isnt visible because the user has to scroll to see it). When part of a row is scrolled off the screen the combobox is painted half in the grid and half on top of the horizantal scroll bar which doesn't look professional. This approach also yields a combobox that has a different look and feel than the other comboboxs in the grid because it doesnt have a distinct edit mode, its always in edit mode, always shows the drop down arrow image.

Is there any way to do this? I need to populate the values of one combobox based on the selection of another combobox in a RadGridView. At this point I'm becoming very frustrated with these components.
Hristo
Telerik team
 answered on 12 Jan 2015
1 answer
228 views
In Q3 2014 control, i can not find the "CanUserFreezeColumns" method in the "RadGridView". I want to show the effect like the demo. 
http://demos.telerik.com/silverlight/#GridView/Scroll

'Telerik.WinControls.UI.RadGridView' does not contain a definition for 'CanUserFreezeColumns' and no extension method 'CanUserFreezeColumns' accepting a first argument of type 'Telerik.WinControls.UI.RadGridView' could be found (are you missing a using directive or an assembly reference?) 


Stefan
Telerik team
 answered on 12 Jan 2015
1 answer
262 views
Hi,

Can you please let me know if the BandedGridView functionality has been implemented in the RadGridView under UI for WinForms.

Attaching an image for your understanding.

Thanks
Revanth
Stefan
Telerik team
 answered on 12 Jan 2015
9 answers
351 views
Hi,
we have check box in header cell of acheck box column and it is working fine for the version (2009.3.9.1203)
when we upgrade the dlls to new version (2010.2.10.713) its not working.

/// Class to Display check box Header cell
    public class CheckBoxHeaderCell : GridHeaderCellElement
    {
    }
I am getting some problem in the above class.

please give the work around for the new dlls.

Thank you,
Shashi


Stefan
Telerik team
 answered on 12 Jan 2015
1 answer
179 views
I'm playing around with the Ribbon bar and have multiple tabs which displays user controls for different sections of the program i'm playing around with. One section is products that is basically a datagrid with add, edit and delete functionality, this is all on a single user control. Normally I'd put the add, edit and update buttons in this user control so the main view doesn't get cluttered with code.

What is the best or most proper way to access the ribbon buttons from a user control?

  

Stefan
Telerik team
 answered on 12 Jan 2015
1 answer
222 views
I have GridView with ContextMenu, i added to this ContextMenu several options after the user click right click on item from my GridView  and i want to know how can i change the color of the item that the mouse is in, you can see he default color in the attach screenshot
Stefan
Telerik team
 answered on 12 Jan 2015
1 answer
115 views
I set the datasource of multicolumncombobox everytime dropdown opening event is fired.
But on the first instance, it only show the header and a vertical scroll like 1st.png attachment. It did have rows since if I press downbutton, a row will be selected
while on the second instance and later, it works like 2nd.png attachment.

private void combobox_DropDownOpening(object sender, System.ComponentModel.CancelEventArgs args)
        {
            combobox.DataSource = datatable;
        }

Any suggestions?
Dimitar
Telerik team
 answered on 09 Jan 2015
1 answer
416 views
Hi,
I have a radGridView control with two columns, the second one should contain string values in every cell except for the last one which should be a checkbox. I'm not able to put the checkbox inside the cell. I've tried using the "CreateCell" event of the gridview in this way:

private void radGridView1_CreateCell(object sender, GridViewCreateCellEventArgs e)
{
    if (e.Column.Index==1 && e.Row.RowInfo.Index==18)
      {
         e.CellElement = new GridCheckBoxCellElement(e.Column, e.Row);
      }
}

The problem is that e.Row.RowInfo.Index is not the "absolute" row index but it's relative to the displayed cells. So, if I have a resized form the result of e.Row.RowInfo.Index could be any number between 0 and rows.Count.
Can anyone help me? Thanks.
Hristo
Telerik team
 answered on 09 Jan 2015
1 answer
87 views
Hello

I'am trying tu use the spreasheet example, but when i tried to run it, i found 256 errors only with the data.xml , i don't know what to do
XML: Unexpected /
XML: Unexpected
...
..
Can you please help me to resolve this issue ?
Thank you 
Dimitar
Telerik team
 answered on 08 Jan 2015
3 answers
493 views
Hello everyone

I'm trying to sort a RadGridView by clicking a header cell. The name of the column which should be sorted is "priority" and it's type is double. I have some other column which has different values. All these columns together build a "priority number" like 1.0, 2.0, 2.1 etc. And this "priority number" is in column called "priority". And now I'm trying to sort the priority column. It shouldn't matter which column header i click, it just have to sort the priority column. I tried this code:

private void radGridView1_CellClick(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
    if (e.RowIndex == -1)
    {
        if (e.Column.Name == "va")
        {
            if (radGridView1.Columns["priority"].SortOrder == RadSortOrder.Ascending)
            {
                radGridView1.Columns["priority"].Sort(RadSortOrder.Descending, false);
            }

            else if (radGridView1.Columns["priority"].SortOrder == RadSortOrder.Descending)
            {
                radGridView1.Columns["priority"].Sort(RadSortOrder.Ascending, false);
            }

            else
            {
                radGridView1.Columns["priority"].Sort(RadSortOrder.Ascending, false);
            }
        }
    }
}

But it doesn't work. When I hit "va" column header, it sorts the "va" column and not the "priority" column. But in debugging mode I can see it goes through this code. Can anyone please tell me why it's not sorting "priority" column?

Thank you

Regards,
Danilo
Danilo
Top achievements
Rank 1
 answered on 08 Jan 2015
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
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
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
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?