Telerik Forums
UI for WinForms Forum
11 answers
229 views
Is possible show custom popup window in GridViewBrowseColumn ?
reyhane
Top achievements
Rank 1
 answered on 17 Dec 2019
8 answers
1.0K+ views
Hi,

When I press 'F1' in a cell, I want to show a messagebox that include radGridView1 information. (ex, rows.count, columns.count etc.)

private void ShowMessage()
{
    RadMessageBox.Show(radGridView1.Rows.Count);
    RadMessageBox.Show(radGridView1.Columns.Count);
}

I know that a radGridView has KeyDown event, but I can't find KeyDown event of cells.

Please help me.

Thank you.
reyhane
Top achievements
Rank 1
 answered on 17 Dec 2019
4 answers
1.0K+ views

     hi telerik

i'm use Telerik themes "Fluent" and "FluentDark" in my project. with a "ToggleSwitcher" and below code, change my project theme at runtime without any issue.

but, most controls like button, have image. in "Fluent" i'm use Black image, and must use White image in "FluentDark" theme. Now, have any solution to change all (maybe 100 Controls) image/icon at runtime? or have any solution for switch iamge between Dark and Light theme?

ThemeResolutionService.ApplicationThemeName = "Fluent";

 

Nadya | Tech Support Engineer
Telerik team
 answered on 16 Dec 2019
27 answers
1.0K+ views
i can not set filter (Contains, start with...) in radgrid.

i think radcontrols avanced tutorial is necesary to consolidate this product.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 16 Dec 2019
5 answers
535 views

I have a GridView where I am changing the cell BackColor when the value is changed:

 

void TelerikGridView_CellValueChanged(object sender, GridViewCellEventArgs e)
        {           
               
                    if (e.Row.Tag == null)
                        e.Row.Tag = e.Column.Name;
 
                    if (!e.Row.Tag.ToString().Contains(e.Column.Name))
                        e.Row.Tag += e.Column.Name;
                
        }

 

void TelerikGridView_CellFormatting(object sender, CellFormattingEventArgs e)
        {
            if (e.Row.Tag != null && e.Row.Tag.ToString().Contains(e.Column.Name))
            {
               
                    e.CellElement.DrawFill = true;
                    e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
                    e.CellElement.BackColor = Color.Red;
              
            }
            else
            {
                e.CellElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local);
                e.CellElement.ResetValue(LightVisualElement.GradientStyleProperty, Telerik.WinControls.ValueResetFlags.Local);
                e.CellElement.ResetValue(LightVisualElement.DrawFillProperty, Telerik.WinControls.ValueResetFlags.Local);
            }
        }

 

This is working as expected, now I want to add a "Reset" button, when I click on it I would like to reset or remove the format of all the cells that have been changed, how can I accomplish this?

 

Regards,

Alberto

Aseman
Top achievements
Rank 1
Veteran
 answered on 16 Dec 2019
1 answer
87 views

How I can loop through all row of my grid and detect only row with checkbox column checked ?

i use this solution and got error :  

-------------------------------------------------------------------------------------------------------

Error:

"System.NullReferenceException: 'Object reference not set to an instance of an object.'Telerik.WinControls.UI.GridViewCellInfo.Value.get returned null."
-------------------------------------------------------------------------------------------------------

Code:

IList<GridViewRowInfo> gridRows = new List<GridViewRowInfo>();
foreach (GridViewRowInfo rowInfo in radGridView.ChildRows)
{
    bool isChecked = (bool)rowInfo.Cells["CheckboxColumn"].Value;
    if (isChecked == true)
    {
        gridRows.Add(rowInfo);
    }
}

Nadya | Tech Support Engineer
Telerik team
 answered on 13 Dec 2019
1 answer
845 views

How I can search through all row of my grid and detect only row with checkbox column checked ?  ( Note : user change value and select checkbox at run time ... )

i use this code and got an error : 

------------------------------------------------------------------------------------------------------------------------------------

Error :

System.NullReferenceException: 'Object reference not set to an instance of an object.'

Telerik.WinControls.UI.GridViewCellInfo.Value.get returned null.

------------------------------------------------------------------------------------------------------------------------------------

Code : 

IList<GridViewRowInfo> gridRows = new List<GridViewRowInfo>();
foreach (GridViewRowInfo rowInfo in radGridView.ChildRows)
{
    bool isChecked = (bool)rowInfo.Cells["CheckboxColumn"].Value;
    if (isChecked == true)
    {
        gridRows.Add(rowInfo);
    }
}

------------------------------------------------------------------------------------------------------------------------------------

Nadya | Tech Support Engineer
Telerik team
 answered on 13 Dec 2019
1 answer
100 views

XML sample:

<?xml version="1.0" encoding="utf-8"?>
<TemplateLibrary xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="1.0" xmlns="http://www.example.org/NewXMLSchema">
  <Category name="Decks">
    <Category name="Standard Templates">
      <Category name="Deck Slabs">
        <Template name="Slab with constraints - 2 Lanes" guid="e4d44934-ff00-4c54-9de7-304896e0df45" lastRevisedDate="2015-08-31" lastRevisedBy="Sri.Kanneganti" versionMajor="1" versionMinor="32">
        </Template>
      </Category>
    </Category>
  </Category>
</TemplateLibrary>

 

my expected effect is like the attcached picture.

Nadya | Tech Support Engineer
Telerik team
 answered on 13 Dec 2019
1 answer
93 views

 How can I collapse the Titlebar ?

    this.FormElement.TitleBar.Visibility = ElementVisibility.Collapsed;

    => Not working

Nadya | Tech Support Engineer
Telerik team
 answered on 13 Dec 2019
3 answers
175 views

Code

Public Function NuevoExport(ByVal Grilla As RadGridView, ByVal Grilla2 As RadGridView) As Boolean

 For fila = 0 To Grilla.RowCount - 1
                For col As Integer = 0 To Ncol - 1
                    exHoja.Cells.Item(fila + 2, col + 1) = Grilla.Item(col, fila).Value
                Next
            Next

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Dec 2019
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
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
Rotator
TrackBar
MessageBox
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
ColorBox
Callout
FilterView
PictureBox
VirtualKeyboard
NavigationView
Accessibility
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
Flyout
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
DateOnlyPicker
TimeOnlyPicker
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?