Hey guys, Is there a way to show some clue on a page that have invalidated controls?
I'm currently using error provider to show errors on controls, I've tried using it on the page but it don't have good location, and I need a generic solution because I use a generic validator to see if the controls has value.
I'm currently using 2015.1.225.40 version and sorry for bad english. Thanks in advance.
I'm not sure if someone will help me with this, considering the version. We are using radcontrols for winforms Q1 2009 SP1 (2009.1.9.414).
I have a MDI Parent, and several mdi children. One MDI Child form with a RadGridView on it. The form works fine, and performs as expected. I use events like CellBeginEdit and CellEndEdit to make changes to the database. The gridview is bound to a BindingList<myCustomClass>. When I edit directly in the grid I update to database on CellEndEdit the entire object. something like this:
myCustomClass objToUpdate = (myCustomClass)RadGridView1.Rows[e.RowIndex].DataBoundItem;
Debug.WriteLine("id: " + objToUpdate.Id);
Debug.WriteLine("Priority: " + objToUpdate.Priority);
db.UpdateCustomClass(objToUpdate);
However here is the problem:
If I do one update, change to another MDI Child form, and change back to the form in question, the objects are not updated correct. I can see in the debug that the Id property is correct, but the priority (Int32) have the old value. Since Priority is Int32, I can change with both keyboard and numeric up/down. But if I change priority using numeric up/down editor it works. If I change priority from 1 to 2 with keyboard and press Enter, the value does not change, but if I try to edit again, the numeric up/down have value 2...
If I just open the form and select a row, change back and forth, and do an update, everything works. It is just if I make a change to the datasource before changin forms the problem occurs.
I have tried to deselect currentRow when form1 is deactivated, so that when I come back I have to select the row again, but does not work.
clearing bindinglist og populating grid again does not work either. I have to restart the form.
Any help greatly appreciated.. :-|
Hello,
Im new into Telerik UI and I have a simple question:
How to remove a "Custom" filter option/element from filters menu on the top of all radGridView columns.
Thanks in advance
Piotr
I have a RadDataFilter linked to a RadDataGrid which is functioning as desired. I have a RadChartView (Bar Chart) that is a summary of what is being displayed in the Grid. When I click a bar in the bar chart, I am populating the filter with a string that will filter the grid on only the rows that are related to the Bar.
Everything in this scenario is working, in that I get the filter looking correctly, based on the bar I clicked and the grid properly filtering. The issue is that the filter item is DataFilterComboDescriptorItem and it is not displaying the correct value in the dropdown for the item specified. It is basically displaying the last value ever selected, regardless of if I clear the filter.
How is the value of a DataFilterComboDescriptorItem set when a RadDataFilter.Expression is manually assigned which affects that item?
Thoughts?
Here is my code:
Building the Filter Nodes Dynamically:
Private Sub SetupFilter(ByRef FilterDT As DataTable)
Dim sFilterHold As String = RadDataFilter1.Expression
RadDataFilter1.Descriptors.Clear()
Me.RadDataFilter1.DataSource = FilterDT
RadDataFilter1.Descriptors.Clear()
Dim sSQL As String = "SELECT FilteredColumnName,DisplayText,FilterDataType FROM dbo.MAPPS_GridFilterDetail WHERE FilterHeaderId = 1 AND ActiveYN = 1"
Dim dr As SqlDataReader = CLIB_MAPPS.Configuration.DBAccess.getSQLDataReader(sSQL)
While dr.Read
If dr("FilterDataType") = "DropDownList" Then
Dim ddItem As New DataFilterComboDescriptorItem()
ddItem.DescriptorName = dr("FilteredColumnName")
ddItem.DescriptorType = GetType(Integer)
ddItem.DataSource = GetTable(dr("FilteredColumnName"))
ddItem.ValueMember = "ID"
ddItem.DisplayMember = "Description"
ddItem.DropDownStyle = RadDropDownStyle.DropDown
ddItem.AutoCompleteMode = AutoCompleteMode.Suggest
ddItem.FilterOperators.Clear()
ddItem.FilterOperators.Add(Telerik.WinControls.Data.FilterOperator.IsEqualTo)
ddItem.FilterOperators.Add(Telerik.WinControls.Data.FilterOperator.IsNotEqualTo)
ddItem.Tag = dr("DisplayText")
RadDataFilter1.Descriptors.Add(ddItem)
Else
Dim DescItem As New DataFilterDescriptorItem()
DescItem.DescriptorName = dr("FilteredColumnName")
DescItem.DescriptorType = Type.GetType(dr("FilterDataType"))
DescItem.Tag = dr("DisplayText")
RadDataFilter1.Descriptors.Add(DescItem)
End If
End While
dr.Close()
dr = Nothing
Me.RadDataFilter1.Expression = sFilterHold
If Me.RadDataFilter1.Expression.Length > 0 Then
Me.ApplyFilter()
End If
End Sub
Private Function GetTable(ByVal sColName As String) As DataTable
Dim sSQL As String = ""
Select Case sColName
Case "Priority_Id"
sSQL = "SELECT Priority_Id ID,convert(varchar(10), Priority_Id) + ' - ' + Priority_Description Description FROM Priority ORDER BY Priority_Id"
Case "Category_Id"
sSQL = "SELECT Category_Id ID, Cat_Description Description FROM Category ORDER BY Category_Id"
Case "EA_Id"
sSQL = "SELECT EA_Id ID, Adequecy_Desc Description FROM Education_Adequecy ORDER BY EA_Id"
Case "Status"
sSQL = "SELECT Status ID, Description Description FROM Deficiency_Assessment_Status_Lookup ORDER BY Status"
Case "System_Id"
sSQL = "SELECT System_Id ID, Systems_Name Description FROM Systems ORDER BY Systems_Order"
Case "Unit_Id"
sSQL = "SELECT Unit_Id ID, Unit Description FROM Unit_Lookup ORDER BY Unit"
End Select
Dim ds As DataSet = CLIB_MAPPS.Configuration.DBAccess.getDataSet(sSQL, "FilterTable")
Return ds.Tables(0)
End Function
Click Event from the Bar Chart to set the filter:
Private Sub radchrtRenoCostBySystem_SelectedPointChanged(sender As Object, args As ChartViewSelectedPointChangedEventArgs)
If args.NewSelectedPoint IsNot Nothing Then
Dim sSystemID As String = DirectCast(args.NewSelectedPoint.DataItem, System.Data.DataRowView).Row.ItemArray(0)
Me.RadDataFilter1.Expression = "[System_Id] = " & sSystemID
'THIS IS WHERE I WOULD WANT TO SET THE VALUE IN THE DROPDOWN TO MATCH THE sSystemID SELECTED
ApplyFilter()
End If
End Sub
I want to develop a WinForms application which is similar with Outlook. For the email list part, I use the custom item in the ListView to display the email information(From, Subject, Receive Time, Body Content). The ListView control is inside a split container(Dock Fill). So that, user can change the width of ListView.
The problem is, when the subject or body content is very long, I don't want the item to auto size. I want the item hidden the text when overflow. When user changes the width of ListView via split container, the text can be shown more or less according to the width of ListView. It likes in the outlook, you can change the width of the email list, the body content and the subject can be automatically displayed to fit the width. How to implement this function by using ListView?
How do I align the text in the header of a ToolWindow - See attached image
I tried following the steps here https://www.telerik.com/forums/problem-by-raddock-a8623cc5b85c but I am not getting the same results.
Note that I am using Telerik with Progress for .NET
Thanks
Any help or insights appreciated. This is for the WinForms library for VS2008.
When I try to create a new Telerick project, or convert an existing project, it fails. I'll paste in the error log below.
Yes I know VS2008 is old and I should be using a newer version, but 2008 has features I really like, esp the MDI editor.
What I've tried (suggested from Progress support folks) :
- Uninstalled, reinstalled
- Uninstalled, manually uninstalled the DLLs from the GAC, reinstalled, rebooted
Thanks for any assistance
Error log:
An error has occured while trying to create a new project.
System.NullReferenceException: Object reference not set to an
instance of an object.
at Telerik.VSX.DistributionListing.GACBasedDistribution.CheckAssemblyNamesEqual(AssemblyName
assemblyName1, AssemblyName assemblyName2)
at
Telerik.VSX.DistributionListing.GACBasedDistribution.PopulateItems(DistributionItemList
items)
at Telerik.VSX.DistributionListing.Distribution.get_Items()
at
Telerik.VSX.Helpers.DesignAssemblyGacHelper.GetDesignerAssembliesMissingFromDistribution()
at
Telerik.VSX.Controls.DesignAssemblyChecker.DetermineViewState(String
mainAssemblyLoadInfo, WizardContext context)
at Telerik.VSX.Controls.DesignAssemblyChecker.UpdateViewState(String
mainAssemblyLoadInfo, WizardContext context)
at
Telerik.VSX.Controls.DesignAssemblyChecker.ReInit(IPropertyDataDictionary
allPropertyValues, WizardContext context)
at Telerik.VSX.WizardEngine.Controls.WizardControlBase.Telerik.WizardFramework.ScenarioDriven.IWizardControl.ReInit(IPropertyDataDictionary
allPropertyValues, IWizardContext context)
at
Telerik.VSX.WizardFramework.Pages.DynamicPageController.Control_SyncNeeded(Object
sender, EventArgs e)
at
Telerik.VSX.WizardFramework.Pages.DynamicPageController.EnsureSync()
at
Telerik.VSX.WizardFramework.Pages.DynamicPageController.Control_SyncNeeded(Object
sender, EventArgs e)
at
Telerik.VSX.WizardFramework.Pages.DynamicPageController.EnsureSync()
at
Telerik.VSX.WizardFramework.Pages.DynamicPageController.Control_SyncNeeded(Object
sender, EventArgs e)
at
Telerik.VSX.WizardFramework.Pages.DynamicPageController.EnsureSync()
at
Telerik.VSX.WizardFramework.Pages.DynamicPageController.Init(IWizardPageDef
pageDefinition, IWizardContext wizardControlContext, IPropertyDataDictionary
allGatheredData)
at
Telerik.WizardFramework.ScenarioDriven.ScenarioWizard.OnBeforeShow(Boolean
movingNext)
at Telerik.WizardFramework.Wizard.EnsureInitialized()
at
Telerik.WizardFramework.ScenarioDriven.ScenarioWizard..ctor(IWizardContext
wizardControlContext, IDispatcher dispatcher, IWizardUI ui, PageCreator
createPage)
at
Telerik.VSX.WizardEngine.ScenarioManagement.ScenarioDefinitionExecutor.CreateWizard(IWizardContext
wizardControlContext, IDispatcher dispatcher, IWizardUI ui)
at
Telerik.VSX.WizardEngine.ScenarioManagement.ScenarioDefinitionExecutor.CollectData(IDispatcher
dispatcher)
at
Telerik.VSX.WizardEngine.ScenarioManagement.ScenarioDefinitionExecutor.CollectData()
at
Telerik.VSX.ProjectConfiguration.DiscontinuousProjectConfiguration.TryCollectData()
I want to develop a WinForms application which is similar with Outlook. For the email list part, I use the custom item in the ListView to display the email information(From, Subject, Receive Time, Body Content). The ListView control is inside a split container(Dock Fill). So that, user can change the width of ListView.
The problem is, when the subject or body content is very long, I don't want the item to auto size. I want the item hidden the text when overflow. When user changes the width of ListView via split container, the text can be shown more or less according to the width of ListView. It likes in the outlook, you can change the width of the email list, the body content and the subject can be automatically displayed to fit the width. How to implement this function by using ListView?
My custom item as below:
private class MailListVisualItem : SimpleListViewVisualItem
{
private LightVisualElement element1;
private LightVisualElement element2;
private StackLayoutPanel layout;
protected override void CreateChildElements()
{
base.CreateChildElements();
this.layout = new StackLayoutPanel();
this.layout.EqualChildrenWidth = false;
this.layout.Margin = new Padding(20, 0, 0, 0);
this.element1 = new LightVisualElement();
element1.TextAlignment = ContentAlignment.TopLeft;
element1.Size = new Size(260, 0);
element1.MinSize = new Size(260, 0);
element1.NotifyParentOnMouseInput = true;
element1.ShouldHandleMouseInput = false;
this.layout.Children.Add(this.element1);
this.element2 = new LightVisualElement();
element2.TextAlignment = ContentAlignment.TopLeft;
element2.Size = new Size(80, 0);
element2.NotifyParentOnMouseInput = true;
element2.ShouldHandleMouseInput = false;
this.layout.Children.Add(this.element2);
this.Children.Add(this.layout);
}
protected override void SynchronizeProperties()
{
base.SynchronizeProperties();
if (this.Data.GetType() != typeof(ListViewDataItemGroup))
{
this.Text = "";
var bodyText = this.Data["BodyText"] == null ? "" : this.Data["BodyText"].ToString().Replace(System.Environment.NewLine, " ");
this.element1.Text = "<
html
><
span
>" +
"<
span
style=\"font-size:12\">" + this.Data["From"] + "</
span
>" +
"<
br
><
span
style=\"color:#13224D;font-family:Segoe UI;font-size:10\">" + this.Data["Subject"] + "</
span
>" +
"<
br
><
span
style=\"color:#13224D;font-family:Segoe UI;font-size:10\">" + bodyText + "</
span
></
span
></
html
>";
this.element2.Text = "<
html
><
span
> </
span
>" +
"<
br
><
span
style =\"color:#13224D;font-family:Segoe UI;font-size:10\">" + this.Data["ReceivedTime"] + "</
span
></
html
>";
this.TextAlignment = ContentAlignment.TopLeft;
}
}
protected override Type ThemeEffectiveType
{
get
{
return typeof(SimpleListViewVisualItem);
}
}
}