Telerik Forums
UI for WinForms Forum
1 answer
132 views

After binding the data to GridView, the background color of a specific row was changed through row formatting.
But there are two problems.
First, I can only see the changed background color if I click on the row.
I want the background color of the row to remain changed by the cell value even if it is not focused.
Second, when I scroll, the changed color remains where the background color of the row has changed.

ex) 1step -> 3 row

                     1column

1row                 x                         >> backColor : red(changed)

2row                o                          >> backColor : white

3row                o                           >> backColor : white

 

>>>>> down scoll

                      1column

4row                o                            >>backColor : red ???

5row                o                             >>backColor : white

6row                x                             >>backColor : red(changed)

 

>>>>> up scroll

                      1column

1row                 x                         >> backColor : red(changed)

2row                o                          >> backColor : white

3row                o                           >> backColor : red??

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 28 Jun 2022
2 answers
145 views

Hi.

How can i customize the textbox inside the filter cell? 

I want the borders of this textbox to appear all the time, not just when in edit mode.

The filter row and filter cell are easy to customize. 
 

private void rgvCompanyList_ViewRowFormatting(object sender, RowFormattingEventArgs e) { if (e.RowElement is GridFilterRowElement) { e.RowElement.RowInfo.Height = 40; e.RowElement.BorderBoxStyle = BorderBoxStyle.FourBorders; e.RowElement.BorderWidth = 4; e.RowElement.BorderColor = Color.Red; } }

 


private void rgvCompanyList_ViewCellFormatting(object sender, CellFormattingEventArgs e)
        {
            if (e.CellElement is GridFilterCellElement)
            {
                e.CellElement.DrawBorder = true;
                e.CellElement.BorderBoxStyle = BorderBoxStyle.FourBorders;
                e.CellElement.BorderWidth = 2;
                e.CellElement.BorderColor = Color.Red;
                Font font = new Font(e.CellElement.Font.Name, 9, FontStyle.Bold);
                e.CellElement.Font = font;
                e.CellElement.TextAlignment = ContentAlignment.MiddleCenter;
            }
        }


But I couldn't find how to access the text box inside the cell. 

I want the borders of this text box to be always visible, as seen in the image below.

private void rgvCompanyList_ViewCellFormatting(object sender, CellFormattingEventArgs e)
        {
            if (e.CellElement is GridFilterCellElement)
            {
                
                e.CellElement.DrawBorder = true;
                e.CellElement.BorderBoxStyle = BorderBoxStyle.FourBorders;
                e.CellElement.BorderWidth = 2;
                e.CellElement.BorderColor = Color.Red;
                Font font = new Font(e.CellElement.Font.Name, 9, FontStyle.Bold);
                e.CellElement.Font = font;
                e.CellElement.TextAlignment = ContentAlignment.MiddleCenter;
            }
        }
levenzer
Top achievements
Rank 1
Iron
 answered on 27 Jun 2022
1 answer
156 views
First of all, I link with Oracle db and receive datalist as object through linq.
And
> source :
> IEnumerable<object> func(){ var a = linq... return a; }
> object list = func().ToList();
> radGridView.datasource = list;
Apply it like this.

However, changing the GridView Decimal Column value in RadGridView does not apply.
The value disappears when entered...

If you add newRow, you get an error such as "RadListSource needs a parameterless Constructor for <>f__AnonymousType41`5~~~~".

What I wrote above is all I coded.
I haven't solved it for two weeks.
Please help me...
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Jun 2022
0 answers
140 views
 ListViewDropDownListEditor showpop with any operations
Naresh
Top achievements
Rank 1
Iron
 asked on 24 Jun 2022
0 answers
608 views

Hi

Please Help

Language: VB.Net (VS2017)

Telerik Version: 2017.3.1017

Application Type: Windows Desktop

Looking for a solution to read the PDF file stored in SqlServer as varbinary(MAX). \

I have saved the pdf file as follows.

Private Sub Save_File() Dim fd As OpenFileDialog = New OpenFileDialog() fd.Filter = "pdf file|*.pdf"

If fd.ShowDialog = System.Windows.Forms.DialogResult.OK Then

Dim filebyte AsByte() = Nothing

Dim con As SqlConnection = New SqlConnection(ConnStr) Dim cmd As SqlCommand = Nothing filebyte = File.ReadAllBytes(fd.FileName) cmd = New SqlCommand("Insert into tbl_Doc (LYR_Doc) Values(@pdf)", con) cmd.Parameters.Add("@pdf", SqlDbType.Binary).Value = filebyte con.Open() cmd.ExecuteNonQuery() con.Close() Interaction.MsgBox("File saved into database", MsgBoxStyle.Information) EndIf

EndSub

Now I need to read this data and load in the pdfviewer.

I tried as follows. But no result.

 Dim eXactConnection As New SqlClient.SqlConnection(ConnStr)
        Dim eXactCommand As New SqlClient.SqlCommand("SELECT LYR_Doc from tbl_Doc where LYR_Name =  'Arun'", eXactConnection)
        eXactConnection.Open()
        If Not IsDBNull(eXactCommand.ExecuteScalar()) Then
            Dim Docdata As Byte() = DirectCast(eXactCommand.ExecuteScalar(), Byte())
            Using stream As New IO.MemoryStream(Docdata)
                RadPdfViewer1.LoadDocument(stream)
            End Using
        End If

 

Thanks in advance.

Arun Madhav


Arun
Top achievements
Rank 2
Iron
 updated question on 15 Jun 2022
1 answer
427 views

hello i want example code to select camera with combobox 

i use RadWebCam winforms 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Jun 2022
1 answer
1.2K+ views

Hello,

I have five buttons on a custom dockable control window. When I set the dock property for the buttons to top I want there to be padding between each button. I tried changing the buttons' margins, but that does not seem to do anything.

Thank you for your help!

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Jun 2022
2 answers
211 views

 

hello

i use radwebcam

how to chose usb webcam from combobox

 

and i want when i click in camera show live video  in picturebox

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Jun 2022
1 answer
205 views

The radgrid view has many different context menus it can show depending on what row you are on.

 

Header

Column Header

Column Filter Row (Contains, Begins With ....)

FilterRow (Type and highlights Yellow if found in Grid Results)

DataRow 

 

private void gvResults_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
        {

     // How to tell which row I am in so I can change if needed the context menu?

}

 

// This is how I can tell if it is a Data Row

GridDataCellElement dataCell = e.ContextMenuProvider as GridDataCellElement;
            if (dataCell == null)
                return;

 

// What about the others? 

//How can I tell  (Column Header, Column Filter, Row Filter etc.)

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Jun 2022
3 answers
303 views

Hi. 

I have a class that has other classes as property in it.
I want to create a list from this class and display the list in the grid (as in the attached excel example).
Which tool should I use?

The "Incentive" class I want to use.

namespace Models.Domain
{
    public class Incentive
    {
        public string Tckn { get; set; } = string.Empty;
        public Ysys Ysys { get; set; } = new Ysys();
        public Abyob Aybob { get; set; } = new Abyob();
        public Oybyu Oybyu { get; set; } = new Oybyu();
        public Yybyu Yybyu { get; set; } = new Yybyu();
        public Yuoa Yuoa { get; set; } = new Yuoa();
        public Uidd Uidd { get; set; } = new Uidd();
    }
    public class Kanunlar 
    {
        public string ts { get; set; } = string.Empty;
        public string ios { get; set; } = "0";
    }
    public class Ysys : Kanunlar { } // 2828
    public class Abyob : Kanunlar { } //6111
    public class Oybyu : Kanunlar { } // 17103
    public class Yybyu : Kanunlar { } // 27103
    public class Yuoa : Kanunlar { } // 7316
    public class Uidd : Kanunlar { } // 3294
}

I want to create a view like this in GridView:

Can I do this with GridView or is there another tool I can use? Thank you in advance for your help.

 

özer
Top achievements
Rank 2
Veteran
Iron
 answered on 04 Jun 2022
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
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
CollapsiblePanel
TextBoxControl
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
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?