Hi Admin,
I want to know how to change font for dropdownlist and I put valuemember and displaymember for dropdownlist but after I choose gridview column show valuemember but I don't want . I want dispalymember. One column will be datatime column or textbox column or dropdownlist.
Below My coding .
Imports System
Imports System.Collections.Generic
Imports System.Data
Imports Telerik.WinControls.UI
Public Class RadForm1
Private Sub RadForm1_Load(sender As Object, e As System.EventArgs) Handles MyBase.Load
With RadGridView1.Columns
.Add(New GridViewTextBoxColumn("EntityFilingDetailsID") With {.HeaderText = "EntityFilingDetailsID", .IsVisible = False, .VisibleInColumnChooser = False})
.Add(New GridViewTextBoxColumn("ReportHeading") With {.HeaderText = "Report Heading"})
.Add(New GridViewTextBoxColumn("FilingDetail") With {.HeaderText = "Filing Detail"})
.Add(New GridViewTextBoxColumn("EntityFilingValue") With {.HeaderText = "EntityFilingValue"})
.Add(New GridViewTextBoxColumn("Editor") With {.HeaderText = "EntityFilingValue", .IsVisible = False})
.Add(New GridViewTextBoxColumn("FieldDataType") With {.HeaderText = "FieldDataType", .IsVisible = False, .VisibleInColumnChooser = False})
.Add(New GridViewTextBoxColumn("DropDownListData") With {.HeaderText = "DropDownListData", .IsVisible = False, .VisibleInColumnChooser = False})
.Add(New GridViewTextBoxColumn("IsReadOnly") With {.HeaderText = "IsReadOnly", .IsVisible = False, .VisibleInColumnChooser = False})
End With
Dim listofEntityFilingDetails As New List(Of EntityFilingDetails)
Dim entityFilingDetails As New EntityFilingDetails
entityFilingDetails.EntityFilingDetailsID = 1
entityFilingDetails.ReportHeading = "Directed and managed in BVI (Y/N)"
entityFilingDetails.FilingDetail = "Is the activity directed and managed in the Virgin Islands?"
entityFilingDetails.EntityFilingValue = "Y"
entityFilingDetails.FieldDataType = "DropDownList"
entityFilingDetails.DropdownListData = "Y | N"
entityFilingDetails.IsReadonly = False
listofEntityFilingDetails.Add(entityFilingDetails)
entityFilingDetails = New EntityFilingDetails
entityFilingDetails.EntityFilingDetailsID = 2
entityFilingDetails.ReportHeading = "Num Board Meetings"
entityFilingDetails.FilingDetail = "Number of board meetings the entity held during the financial period with relation to this activity."
entityFilingDetails.EntityFilingValue = ""
entityFilingDetails.FieldDataType = "TextBox"
entityFilingDetails.DropdownListData = ""
entityFilingDetails.IsReadonly = False
listofEntityFilingDetails.Add(entityFilingDetails)
entityFilingDetails = New EntityFilingDetails
entityFilingDetails.EntityFilingDetailsID = 3
entityFilingDetails.ReportHeading = "Financial Period Start Date (DD/MM/YYYY)"
entityFilingDetails.FilingDetail = "Financial Period Start Date"
entityFilingDetails.EntityFilingValue = ""
entityFilingDetails.FieldDataType = "DateTimePicker"
entityFilingDetails.DropdownListData = ""
entityFilingDetails.IsReadonly = False
listofEntityFilingDetails.Add(entityFilingDetails)
entityFilingDetails = New EntityFilingDetails
entityFilingDetails.EntityFilingDetailsID = 4
entityFilingDetails.ReportHeading = "Num Board Meetings"
entityFilingDetails.FilingDetail = "Number of board meetings the entity held during the financial period with relation to this activity."
entityFilingDetails.EntityFilingValue = "1"
entityFilingDetails.FieldDataType = "DropDownList"
entityFilingDetails.DropdownListData = "Countries"
entityFilingDetails.IsReadonly = True
listofEntityFilingDetails.Add(entityFilingDetails)
RadGridView1.DataSource = listofEntityFilingDetails
End Sub
Private Sub RadGridView1_EditorRequired(sender As Object, e As EditorRequiredEventArgs) Handles RadGridView1.EditorRequired
Dim dataRow As GridViewDataRowInfo = TryCast(Me.RadGridView1.CurrentRow, GridViewDataRowInfo)
If dataRow Is Nothing Then
Return
End If
Dim editor As String = Convert.ToString(dataRow.Cells("FieldDataType").Value)
Dim DropdownListData As String = Convert.ToString(dataRow.Cells("DropdownListData").Value)
Dim editorType As Type = e.EditorType
Select Case editor
Case "TextBox"
editorType = GetType(RadTextBoxEditor)
Case "DateTimePicker"
editorType = GetType(RadDateTimeEditor)
Case "DropDownList"
editorType = GetType(RadDropDownListEditor)
End Select
e.EditorType = editorType
End Sub
Private Sub radGridView1_CellEditorInitialized(sender As Object, e As GridViewCellEventArgs) Handles RadGridView1.CellEditorInitialized
If TypeOf e.ActiveEditor Is RadDropDownListEditor Then
Dim editor As RadDropDownListEditor = TryCast(e.ActiveEditor, RadDropDownListEditor)
Dim element As RadDropDownListEditorElement = TryCast(editor.EditorElement, RadDropDownListEditorElement)
Dim DropdownListData As String = Convert.ToString(RadGridView1.CurrentRow.Cells("DropdownListData").Value)
If DropdownListData = "Y | N" Then
Dim dt As DataTable = New DataTable()
dt.Columns.Add("Question")
dt.Rows.Add("Y")
dt.Rows.Add("N")
element.DataSource = dt
element.DisplayMember = "Question"
element.ValueMember = "Question"
Else
Dim dt As DataTable = New DataTable()
dt.Columns.Add("CountryName")
dt.Columns.Add("CountryID")
dt.Rows.Add("Myanmar", "1")
dt.Rows.Add("Singapore", "2")
element.DisplayMember = "CountryID"
element.ValueMember = "CountryName"
element.DataSource = dt
End If
End If
End Sub
Private Sub radGridView1_CellFormatting(ByVal sender As Object, ByVal e As CellFormattingEventArgs) Handles RadGridView1.CellFormatting
If TypeOf e.CellElement.RowInfo Is GridViewDataRowInfo AndAlso e.Column.Name = "EntityFilingValue" Then
Dim dateformat As DateTime
If e.CellElement.RowInfo.Cells("EntityFilingValue").Value IsNot Nothing Then
If DateTime.TryParse(e.CellElement.RowInfo.Cells("EntityFilingValue").Value.ToString(), dateformat) Then
e.CellElement.Text = dateformat.ToString("d MMMM yyyy")
End If
If CType(e.Row.Cells("IsReadonly").Value, Boolean) Then
e.CellElement.RowInfo.Cells("EntityFilingValue").ReadOnly = True
Else
e.CellElement.RowInfo.Cells("EntityFilingValue").ReadOnly = False
End If
End If
End If
End Sub
End Class
Public Class EntityFilingDetails
Property EntityFilingDetailsID As Integer
Property ReportHeading As String
Property FilingDetail As String
Property EntityFilingValue As String
Property FieldDataType As String
Property DropdownListData As String
Property IsReadonly As Boolean
End Class
Is there also a JSON tagger for the SyntaxEditor available?
Thanks,
Ben
Hi,
I'm trying to implement a behavior that will enable me to "check" each page of a pageview. The purpose of this is to define witch pages an user can access.
Basically I want to replace the close button with a checkbox, and then somehow be able to write to the console what pages are checked.
Thanks in advance!
Hello Guys,
I'm using Telerik in my winForm Application. I have a RadDatePicker in Form1 and I'm Using Below Code To Chang RadDatePicker Calendar and Format To Persian.
When I Started the Application in windows 10, every thing was normal and worked correctly but the problem shown when I Started Application in windows 7.
---------------------------------------------------------------------------------------
radDatePicker.Culture = new System.Globalization.CultureInfo("fa-IR");
radDatePicker.Format = DateTimePickerFormat.Custom;
radDatePicker.CustomFormat = "yyyy/MM/dd";
radDatePicker.Value = DateTime.Now;
---------------------------------------------------------------------------------------
I Can't figure out why this problem happens.
I'll be glade if you can help me.
thx.
Hi there!
I can't seem to be able to fill a radpivotgrid with data without getting a multi-thread error.
I believe the problem is that the object is multi-thread and I am using ABL which is single-thread.
Can't seem to find a proper solution anywhere.
Is there anything i can do to use this object with ABL?
Regards,
Hugo Ferreira.
P.S: I'll attach the error, however, the main line is in Portuguese. Roughly translated it says "You're trying to using a .NET multi-threaded object in a way that it's not supported. ABL cannot be called in a thread that it's not its main one."
Is it possible to resize the image of the Treeview node ?.
I have a 16px x 16px size icon, but I want it to look smaller than it does by default.
I add each node by programmatically.
Thank you
Best regards
When I set a command bar button image at design time, it looks correct. Its the 16x16 image I am using. However, when I set it programmatically, it appears to be 32x32. I'm setting it from an imageList. I made sure that the image list is 16x16 as well.
Hi
I have a RadGridview that contains some data columns and some image columns and images are in different sizes (refer to attached image). I want to export it to excel. what is the best way to adjust row height and column width (based on image sizes)?
Note1: I think that i should put some conditions on "ExcelexportRenderer_WorkbookCreated" event but can't find the way.
Note2: My images are in binary format ("System.Byte[]").
Hi
I wanted to disable the border of a radSplitContainer. With the theme: office2013Light the following code is working:
this.radSplitContainer1.RootElement.EnableElementShadow = false;
this.radSplitContainer1.RootElement.MinSize = new System.Drawing.Size(25, 25);
this.radSplitContainer1.Size = new System.Drawing.Size(428, 318);
this.radSplitContainer1.SplitterWidth = 8;
this.radSplitContainer1.TabIndex = 0;
this.radSplitContainer1.TabStop = false;
this.radSplitContainer1.ThemeName = "Office2013Light";
With the theme MaterialBlueGrey, there is still a border on the display.
Do you have any other ideas on how I can disable the border?
Thank you in advance.
Kind Regards
Dominik