Telerik Forums
UI for WinForms Forum
1 answer
80 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
88 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
88 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
65 views
 ListViewDropDownListEditor showpop with any operations
Naresh
Top achievements
Rank 1
Iron
 asked on 24 Jun 2022
0 answers
461 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
304 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
917 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
137 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
74 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
217 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
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
+? 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?