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??
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.
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
hello i want example code to select camera with combobox
i use RadWebCam winforms
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!
hello
i use radwebcam
how to chose usb webcam from combobox
and i want when i click in camera show live video in picturebox
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.)
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.