Telerik Forums
UI for WinForms Forum
10 answers
624 views
hi,

I have a checkboxcolumn in my radgridview, and when the user set to true a cell, the backcolor of the current row changes . That's working fine. But when I scroll in my View, the backcolor of the row is moved to other row. The second row gets the backcolor of the firstrow and so on.

The code is :

        private void radGridView1_ValueChanged(object sender, EventArgs e) 
        { 
            if (this.radGridView1.ActiveEditor is RadCheckBoxEditor) 
            { 
                if ((bool)(this.radGridView1.ActiveEditor.Value)) 
                { 
                    radGridView1.CurrentCell.RowElement.DrawFill = true
                    radGridView1.CurrentCell.RowElement.BackColor = Color.Red; 
                } 
            } 
        } 


 What can the resolve this?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Nov 2018
1 answer
172 views

Hi,

How to make a column or cell read only based on some conditions.

I was exploring the CellFormatting event but cannot find how to achieve that.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Nov 2018
2 answers
70 views

Hi !

Is there a event where it passes over all the rows and display the row ? 

On the display of my data, I would like to change the backcolor of the row.

I tried the RowFormatting event but It only go on the first row...

Thank you ! 

Hristo
Telerik team
 answered on 15 Nov 2018
4 answers
908 views

I have a RadGridView with a GridViewDecimalColumn. I want to allow the user to move up and down to other rows using the up/down arrow keys, but it changes the value instead. This occurs even if I set ShowUpDownButtons to false.

I found an old example on the forum that explains how to change this behavior here: https://www.telerik.com/forums/gridviewdecimalcolumn-up-down-key. However when I try the code there, I can't get it to work. GridSpinEditorElement is not found. I have the Telerik.WinControls and Telerik.WinControls.UI namespaces included.

I looked up GridSpinEditorElement, to see if I needed a different namespace, and it seems it's no longer available. I'm referencing this page:

https://docs.telerik.com/devtools/winforms/api/html/t_telerik_wincontrols_ui_gridspineditorelement.htm

It says it's obsolete and shows version 2018.1.220.40. I'm on version 2018.3.911.40.

How can I implement this code now without GridSpinEditorElement?

Thanks

andi
Top achievements
Rank 1
 answered on 15 Nov 2018
5 answers
158 views

I have 5 Collapsible panels I want to dock to the top of a panel.  When I select them and choose TOP for Dock. the order seems to get randomly re-arranged.

 

What am I missing?

Dimitar
Telerik team
 answered on 14 Nov 2018
8 answers
2.3K+ views
Hi,
Where is the setting in radgridview for wrapping the text inside of the cells?
Dimitar
Telerik team
 answered on 14 Nov 2018
3 answers
44 views

I need to determine if document is empty, even if the document was just created in other parts of the code. The code below throws the exception. If the commented lines are uncommented then the exception is not thrown. I could work around the problem also by carrying a flag to tell me if document was just created (and not call GetStatisticsInfo in that case). Is this exception a bug? Is there a smarter or more elegant way to determine if document is empty?

 

var d = new RadDocument();
 
//var p = new Telerik.WinForms.Documents.FormatProviders.Rtf.RtfFormatProvider();
//d = p.Import(p.Export(d));
 
var s = d.GetStatisticsInfo();

 

 

Dimitar
Telerik team
 answered on 14 Nov 2018
1 answer
187 views

Hi,

I am binding data from a datatable to the VirtualGrid but currently there is no data in it, so I would like to have a blank row appear in the grid which will allow the user to enter new rows.

Currently if there are no data then nothing is showing in the grid, only when some data is there "Click here to add a new row" appears.

AllowAddNewRow is true.

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 14 Nov 2018
0 answers
90 views

hi i tasked to create a multi-button gridview column and how its go:

 

public class GridExtraItemsCell : GridCommandCellElement
{
    public override bool IsEditable => false;
    public override bool IsCurrent => false;
    public override bool IsSelected => false;
    private ExtraElementContents btns;
    add a child and handle Click Events and Delegate
}

 

hi i tasked to create a multi-button gridview column and how its go:
public class GridExtraItemsCell : GridCommandCellElement{public override bool IsEditable => false;public override bool IsCurrent => false;public override bool IsSelected => false;private ExtraElementContents btns;
add a child and handle Click Events and Delegate
}
public class GridExtraItemsColumn : GridViewCommandColumn{public event EventHandler ButtonClick;public void Button_Click(object sender, EventArgs e){this.OnButtonClick(sender, e);}protected virtual void OnButtonClick(object sender, EventArgs e){if (this.ButtonClick != null){this.ButtonClick(sender, e);}}public GridExtraItemsColumn(string fieldName) : base(fieldName){}public override Type GetCellType(GridViewRowInfo row){if (row is GridViewDataRowInfo){return typeof(GridExtraItemsCell);}return base.GetCellType(row);}}

 

and its Work Perfectly but here's a thing when i click on the cell in run time in first click cell is selected and with the nest click Event fire My goal is run My-button_Click on a first click

 
mostafa
Top achievements
Rank 1
 asked on 13 Nov 2018
2 answers
689 views

In my Radgridview I have a combobox column with 3 predifined value.

1. "No Change"

2. "Partial Return"

3. "Full Return"

I want to set "No Change" as my default value. how can I do that?

My existing code

01.'>>>>>Create combobox column "status". Datasource "return_status" table
02.Dim clm_status As New GridViewComboBoxColumn
03.clm_status = CType(dgv_return.Columns("status"), GridViewComboBoxColumn)
04.clm_status.DataSource = ds.Tables("return_status")
05.clm_status.DisplayMember = "status_display"
06.clm_status.ValueMember = "status_value"
07. 
08. 
09.'>>>>>Populate Radgridview "dgv_return". Data source "due_bill_detail" table
10.For Each row As DataRow In ds.Tables("due_bill_detail").Rows
11. 
12.Dim rowInfo As New GridViewDataRowInfo(dgv_return.MasterView)
13. 
14.rowInfo.Cells(dgv_return.Columns("status").Index).Value = "No Change"   'This is the combobox column. Its not working
15.rowInfo.Cells(dgv_return.Columns("item_code").Index).Value = row("item_code") 'This is working fine
16.rowInfo.Cells(dgv_return.Columns("item_name").Index).Value = row("item_name") 'This is working fine
17.dgv_return.Rows.Add(rowInfo)
18.Next row

 

 

LEON
Top achievements
Rank 1
 answered on 13 Nov 2018
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
StatusStrip
CheckedListBox
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
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?