Hello Telerik,
I linked a radPivotFieldList with a radPivotGrid. All of my radPivotFieldList's Controls used the CustomName expect the FieldList.
Is there any way to use Custom Name instead of Property Name ?
I try this code too but it doesn't work
radPivotFieldList1.FieldsControl.Nodes[0].RootNode.Text="my text0";
Finally I try to remove a Node and adding another but it doesn't work because of the FielList is automaticaly updating after :
Telerik.WinControls.UI.RadTreeNode test = new RadTreeNode(){Value =radPivotFieldList1.FieldsControl.Nodes[0].Value, Text="test" } ;
radPivotFieldList1.FieldsControl.Nodes.Remove(radPivotFieldList1.FieldsControl.Nodes[0]);
radPivotFieldList1.FieldsControl.Nodes.Add(test);
Best regards
Hi guys,
Is it possible to change the RadFormTitleBarElement default context menu (Minimize, Maximize, Restore, etc.) for a customized one? I have seen that RadTitleBar has a ContextMenuProperty property exposed, but I cannot find it in my RadForm embebed title bar.
Thank you very much.
Hi,
How can I do to have a simple RadRichTextEditor. See attached image please.
Best regards.
Eusebio.
I accidentally deleted a top level menu item in the RadMenu control on the main form of the project. This action could not be undone. Attempts to add the menu element back resulted in errors about duplicate entries. VS2019 subsequently crashed and restarted. Further attempts to open the main form of the application resulted in errors upon opening the form.
With all efforts to recover the form proving futile, I deleted the form and attempted to add a new RadForm to replace it. However, instead of a new form being added only a VB code module is created. It is now impossible to add any new type of RadForm to this project, though it is possible to create a new project.
Is there a known solution to this problem? If not, then I will create a new project and main form and import the other project modules.
The grid does not seem to be subscribing to PropertyChanged on INotifyPropertyChanged. All the bound data objects provide INotifyPropertyChanged, but when they go to fire this event the event handler is null; meaning no one is listening. The grid keeps showing the old data until I select the row.
Here is code to reproduce it:
public
partial
class
RadForm1 : RadForm
{
private
Timer _timer;
private
ObservableCollection<GridData> _data;
public
static
bool
GridBound =
false
;
public
RadForm1()
{
InitializeComponent();
}
protected
override
void
OnLoad( EventArgs e )
{
base
.OnLoad( e );
var gv =
new
RadGridView();
gv.Dock = DockStyle.Fill;
Controls.Add( gv );
_data =
new
ObservableCollection<GridData>()
{
new
GridData { First =
"A"
, Second =
"B"
, Third =
"C"
},
new
GridData { First =
"AA"
, Second =
"BB"
, Third =
"CC"
},
new
GridData { First =
"AAA"
, Second =
"BBB"
, Third =
"CCC"
}
};
gv.DataSource = _data;
GridBound =
true
;
_timer =
new
Timer();
_timer.Tick += _timer_Tick;
_timer.Interval = 1000;
_timer.Start();
}
private
void
_timer_Tick(
object
sender, EventArgs e )
{
_data[0].First =
"D"
;
_data[1].Second =
"EE"
;
_data[2].Third =
"FFF"
;
_timer.Stop();
}
private
class
GridData : INotifyPropertyChanged
{
public
event
PropertyChangedEventHandler PropertyChanged;
private
void
OnPropertyChanged(
string
name )
{
if
( PropertyChanged ==
null
&& RadForm1.GridBound )
{
Debug.WriteLine( $
"PropertyChanged is null, grid has not subscribed! Name = '{name}'"
);
}
PropertyChanged?.Invoke(
this
,
new
PropertyChangedEventArgs( name ) );
}
private
string
_first;
private
string
_second;
private
string
_third;
public
string
First {
get
=> _first;
set
{ _first = value; OnPropertyChanged(
"First"
); } }
public
string
Second {
get
=> _second;
set
{ _second = value; OnPropertyChanged(
"Second"
); } }
public
string
Third {
get
=> _third;
set
{ _third = value; OnPropertyChanged(
"Third"
); } }
}
}
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!