I have a requirement which uses a popup launched from a grid which resides in a tool window. Default state of the tool window is auto hide.
Now, when the tool window expands and the grid is shown, the end user can click a grid command button which launches a lookup dialog. The dialog returns the selected value with an event which is handled by the eventhandler from the tool window grid.
Here's the problem: when the dialog is shown, the tool window closes. I want the window to remain expanded while the dialog is shown.
Is there a way to keep it expanded _without_ changing the tool window state (e.g. to docked)?
Any thoughts on this?
Hi All,
I have a problem referecing 'Telerik.WinControls.UI.dll' in a project. The problem message is in portuguese, but the context is the same:
Error14'Não foi possível carregar arquivo ou assembly 'Telerik.WinControls.UI, Version=2015.1.225.40, Culture=neutral, PublicKeyToken=<xxxx>' ou uma de suas dependências. Ponteiro inválido (Exceção de HRESULT: 0x80004003 (E_POINTER))'<projet with dir>
Is there a solution? I've read http://www.telerik.com/forums/could-not-load-file-or-assembly-telerik-wincontrols-ui topic, but the messages are differents.
Any suggestions?
Reggards
Hello Telerik,
I want to export a file.txt to Pdf, I´m using GridViewPdfExport component but this line does not work:
Telerik.WinControls.Export.PdfExportRenderer renderer = new Telerik.WinControls.Export.PdfExportRenderer();
This is my code , taken from Export to PDF
Telerik.WinControls.Export.GridViewPdfExport pdfExporter =
new
Telerik.WinControls.Export.GridViewPdfExport(radGrid1);
pdfExporter.FileExtension =
".pdf"
;
pdfExporter.ShowHeaderAndFooter =
true
;
pdfExporter.HeaderHeight = 30;
pdfExporter.HeaderFont =
new
Font(
"Arial"
, 22);
pdfExporter.Logo = System.Drawing.Image.FromFile(@
"C:\temp\logo.png"
);
pdfExporter.LeftHeader =
"[Logo]"
;
pdfExporter.LogoAlignment = ContentAlignment.MiddleLeft;
pdfExporter.LogoLayout = Telerik.WinControls.Export.LogoLayout.Fit;
pdfExporter.MiddleHeader =
"Middle header"
;
pdfExporter.RightHeader =
"Right header"
;
pdfExporter.ReverseHeaderOnEvenPages =
true
;
pdfExporter.FooterHeight = 30;
pdfExporter.FooterFont =
new
Font(
"Arial"
, 22);
pdfExporter.LeftFooter =
"Left footer"
;
pdfExporter.MiddleFooter =
"Middle footer"
;
pdfExporter.RightFooter =
"Right footer"
;
pdfExporter.ReverseFooterOnEvenPages =
true
;
pdfExporter.SummariesExportOption = SummariesOption.ExportAll;
pdfExporter.FitToPageWidth =
true
;
pdfExporter.Scale = 1.2;
pdfExporter.ExportSettings.Title =
"Prueba"
;
string
exportFile = @
"..\..\exportedData.pdf"
;
using
(System.IO.MemoryStream ms =
new
System.IO.MemoryStream())
{
Telerik.WinControls.Export.GridViewPdfExport exporter =
new
Telerik.WinControls.Export.GridViewPdfExport(radGrid1);
Telerik.WinControls.Export.PdfExportRenderer renderer =
new
Telerik.WinControls.Export.PdfExportRenderer();
exporter.RunExport(ms, renderer);
using
(System.IO.FileStream fileStream =
new
System.IO.FileStream(exportFile, FileMode.Create, FileAccess.Write)){
ms.WriteTo(fileStream);}
}
Thanks in advance.
Hello, i am working with radgridview in c#..
I want to change the language from the complement complete, but i cant
Is possible? or any idea?
Thx
Hello,
When I try to copy a row with a hidden column the clipboard only get visible columns, i need the value of hidden column because it get the ID of the record.
How can i get this value from clipboard?
Thank you
I am trying to use CodedUI, but it's not working with RadTextBox.
I created a test app with 5 textboxes, and recorded a test that fills out all those textbox.
When I try to run the test, it fails, claiming the element is no longer available.
Since I cannon attach my entire solution, I'll just paste come code below.
The form itself is trivial, it just contains 5 RadTextBox elements
The interesting pars in the testing code, so I am pasting it below.
CodedUiTest1.cs
using
Microsoft.VisualStudio.TestTools.UITesting;
using
Microsoft.VisualStudio.TestTools.UnitTesting;
namespace
CodedUITestProject1
{
[CodedUITest]
public
class
CodedUITest1
{
public
CodedUITest1()
{
}
[TestMethod]
public
void
CodedUITestMethod1()
{
var aut = ApplicationUnderTest.Launch(@
"C:\Users\pg2\Documents\visual studio 2015\Projects\Solution2\TelerikWinFormsApp1\bin\Debug\TelerikWinFormsApp1.exe"
);
this
.UIMap.RecordedMethod1();
}
public
TestContext TestContext
{
get
{
return
testContextInstance;
}
set
{
testContextInstance = value;
}
}
private
TestContext testContextInstance;
public
UIMap UIMap
{
get
{
if
((
this
.map ==
null
))
{
this
.map =
new
UIMap();
}
return
this
.map;
}
}
private
UIMap map;
}
}
UIMap.Designer.cs
namespace
CodedUITestProject1
{
using
Microsoft.VisualStudio.TestTools.UITest.Extension;
using
Microsoft.VisualStudio.TestTools.UITesting;
using
Microsoft.VisualStudio.TestTools.UITesting.WinControls;
using
System.CodeDom.Compiler;
using
System.Drawing;
using
Mouse = Microsoft.VisualStudio.TestTools.UITesting.Mouse;
[GeneratedCode(
"Coded UITest Builder"
,
"14.0.23107.0"
)]
public
partial
class
UIMap
{
/// <summary>
/// RecordedMethod1 - Use 'RecordedMethod1Params' to pass parameters into this method.
/// </summary>
public
void
RecordedMethod1()
{
#region Variable Declarations
WinEdit uIItemEdit =
this
.UIRadForm1Window.UIRadForm1Client.UIRadTextBox1Edit.UIItemEdit;
WinEdit uIItemEdit1 =
this
.UIRadForm1Window.UIItemEdit;
WinEdit uIItemEdit2 =
this
.UIRadForm1Window.UIRadForm1Client.UIRadTextBox2Edit.UIItemEdit;
WinEdit uIItemEdit11 =
this
.UIRadForm1Window.UIItemEdit1;
WinEdit uIItemEdit3 =
this
.UIRadForm1Window.UIRadForm1Client.UIRadTextBox3Edit.UIItemEdit;
WinEdit uIItemEdit21 =
this
.UIRadForm1Window.UIItemEdit2;
WinWindow uIItemWindow =
this
.UIRadForm1Window.UIRadForm1Client.UIRadTextBox4Window.UIItemWindow;
WinEdit uIItemEdit4 =
this
.UIRadForm1Window.UIRadForm1Client.UIRadTextBox4Edit.UIItemEdit;
WinEdit uIItemEdit31 =
this
.UIRadForm1Window.UIItemEdit3;
WinEdit uIItemEdit5 =
this
.UIRadForm1Window.UIRadForm1Client.UIRadTextBox5Edit.UIItemEdit;
WinEdit uIItemEdit41 =
this
.UIRadForm1Window.UIItemEdit4;
WinClient uIRadForm1Client =
this
.UIRadForm1Window.UIRadForm1Client;
#endregion
// Click text box
Mouse.Click(uIItemEdit,
new
Point(62, 1));
// Type 'aaa' in text box
uIItemEdit1.Text =
this
.RecordedMethod1Params.UIItemEditText;
// Click text box
Mouse.Click(uIItemEdit2,
new
Point(18, 14));
// Type 'bbb' in text box
uIItemEdit11.Text =
this
.RecordedMethod1Params.UIItemEdit1Text;
// Click text box
Mouse.Click(uIItemEdit3,
new
Point(17, 10));
// Type 'ccc' in text box
uIItemEdit21.Text =
this
.RecordedMethod1Params.UIItemEdit2Text;
// Click window
Mouse.Click(uIItemWindow,
new
Point(17, -1));
// Click text box
Mouse.Click(uIItemEdit4,
new
Point(20, 1));
// Type 'ddd' in text box
uIItemEdit31.Text =
this
.RecordedMethod1Params.UIItemEdit3Text;
// Click text box
Mouse.Click(uIItemEdit5,
new
Point(38, 9));
// Type 'eee' in text box
uIItemEdit41.Text =
this
.RecordedMethod1Params.UIItemEdit4Text;
// Click 'RadForm1' client
Mouse.Click(uIRadForm1Client,
new
Point(88, 149));
}
#region Properties
public
virtual
RecordedMethod1Params RecordedMethod1Params
{
get
{
if
((
this
.mRecordedMethod1Params ==
null
))
{
this
.mRecordedMethod1Params =
new
RecordedMethod1Params();
}
return
this
.mRecordedMethod1Params;
}
}
public
UIRadForm1Window UIRadForm1Window
{
get
{
if
((
this
.mUIRadForm1Window ==
null
))
{
this
.mUIRadForm1Window =
new
UIRadForm1Window();
}
return
this
.mUIRadForm1Window;
}
}
#endregion
#region Fields
private
RecordedMethod1Params mRecordedMethod1Params;
private
UIRadForm1Window mUIRadForm1Window;
#endregion
}
/// <summary>
/// Parameters to be passed into 'RecordedMethod1'
/// </summary>
[GeneratedCode(
"Coded UITest Builder"
,
"14.0.23107.0"
)]
public
class
RecordedMethod1Params
{
#region Fields
/// <summary>
/// Type 'aaa' in text box
/// </summary>
public
string
UIItemEditText =
"aaa"
;
/// <summary>
/// Type 'bbb' in text box
/// </summary>
public
string
UIItemEdit1Text =
"bbb"
;
/// <summary>
/// Type 'ccc' in text box
/// </summary>
public
string
UIItemEdit2Text =
"ccc"
;
/// <summary>
/// Type 'ddd' in text box
/// </summary>
public
string
UIItemEdit3Text =
"ddd"
;
/// <summary>
/// Type 'eee' in text box
/// </summary>
public
string
UIItemEdit4Text =
"eee"
;
#endregion
}
[GeneratedCode(
"Coded UITest Builder"
,
"14.0.23107.0"
)]
public
class
UIRadForm1Window : WinWindow
{
public
UIRadForm1Window()
{
#region Search Criteria
this
.SearchProperties[WinWindow.PropertyNames.Name] =
"RadForm1"
;
this
.SearchProperties.Add(
new
PropertyExpression(WinWindow.PropertyNames.ClassName,
"WindowsForms10.Window"
, PropertyExpressionOperator.Contains));
this
.WindowTitles.Add(
"RadForm1"
);
#endregion
}
#region Properties
public
UIRadForm1Client UIRadForm1Client
{
get
{
if
((
this
.mUIRadForm1Client ==
null
))
{
this
.mUIRadForm1Client =
new
UIRadForm1Client(
this
);
}
return
this
.mUIRadForm1Client;
}
}
public
WinEdit UIItemEdit
{
get
{
if
((
this
.mUIItemEdit ==
null
))
{
this
.mUIItemEdit =
new
WinEdit(
this
);
#region Search Criteria
this
.mUIItemEdit.WindowTitles.Add(
"RadForm1"
);
#endregion
}
return
this
.mUIItemEdit;
}
}
public
WinEdit UIItemEdit1
{
get
{
if
((
this
.mUIItemEdit1 ==
null
))
{
this
.mUIItemEdit1 =
new
WinEdit(
this
);
#region Search Criteria
this
.mUIItemEdit1.WindowTitles.Add(
"RadForm1"
);
#endregion
}
return
this
.mUIItemEdit1;
}
}
public
WinEdit UIItemEdit2
{
get
{
if
((
this
.mUIItemEdit2 ==
null
))
{
this
.mUIItemEdit2 =
new
WinEdit(
this
);
#region Search Criteria
this
.mUIItemEdit2.WindowTitles.Add(
"RadForm1"
);
#endregion
}
return
this
.mUIItemEdit2;
}
}
public
WinEdit UIItemEdit3
{
get
{
if
((
this
.mUIItemEdit3 ==
null
))
{
this
.mUIItemEdit3 =
new
WinEdit(
this
);
#region Search Criteria
this
.mUIItemEdit3.WindowTitles.Add(
"RadForm1"
);
#endregion
}
return
this
.mUIItemEdit3;
}
}
public
WinEdit UIItemEdit4
{
get
{
if
((
this
.mUIItemEdit4 ==
null
))
{
this
.mUIItemEdit4 =
new
WinEdit(
this
);
#region Search Criteria
this
.mUIItemEdit4.WindowTitles.Add(
"RadForm1"
);
#endregion
}
return
this
.mUIItemEdit4;
}
}
#endregion
#region Fields
private
UIRadForm1Client mUIRadForm1Client;
private
WinEdit mUIItemEdit;
private
WinEdit mUIItemEdit1;
private
WinEdit mUIItemEdit2;
private
WinEdit mUIItemEdit3;
private
WinEdit mUIItemEdit4;
#endregion
}
[GeneratedCode(
"Coded UITest Builder"
,
"14.0.23107.0"
)]
public
class
UIRadForm1Client : WinClient
{
public
UIRadForm1Client(UITestControl searchLimitContainer) :
base
(searchLimitContainer)
{
#region Search Criteria
this
.SearchProperties[WinControl.PropertyNames.Name] =
"RadForm1"
;
this
.WindowTitles.Add(
"RadForm1"
);
#endregion
}
#region Properties
public
UIRadTextBox1Edit UIRadTextBox1Edit
{
get
{
if
((
this
.mUIRadTextBox1Edit ==
null
))
{
this
.mUIRadTextBox1Edit =
new
UIRadTextBox1Edit(
this
);
}
return
this
.mUIRadTextBox1Edit;
}
}
public
UIRadTextBox2Edit UIRadTextBox2Edit
{
get
{
if
((
this
.mUIRadTextBox2Edit ==
null
))
{
this
.mUIRadTextBox2Edit =
new
UIRadTextBox2Edit(
this
);
}
return
this
.mUIRadTextBox2Edit;
}
}
public
UIRadTextBox3Edit UIRadTextBox3Edit
{
get
{
if
((
this
.mUIRadTextBox3Edit ==
null
))
{
this
.mUIRadTextBox3Edit =
new
UIRadTextBox3Edit(
this
);
}
return
this
.mUIRadTextBox3Edit;
}
}
public
UIRadTextBox4Window UIRadTextBox4Window
{
get
{
if
((
this
.mUIRadTextBox4Window ==
null
))
{
this
.mUIRadTextBox4Window =
new
UIRadTextBox4Window(
this
);
}
return
this
.mUIRadTextBox4Window;
}
}
public
UIRadTextBox4Edit UIRadTextBox4Edit
{
get
{
if
((
this
.mUIRadTextBox4Edit ==
null
))
{
this
.mUIRadTextBox4Edit =
new
UIRadTextBox4Edit(
this
);
}
return
this
.mUIRadTextBox4Edit;
}
}
public
UIRadTextBox5Edit UIRadTextBox5Edit
{
get
{
if
((
this
.mUIRadTextBox5Edit ==
null
))
{
this
.mUIRadTextBox5Edit =
new
UIRadTextBox5Edit(
this
);
}
return
this
.mUIRadTextBox5Edit;
}
}
#endregion
#region Fields
private
UIRadTextBox1Edit mUIRadTextBox1Edit;
private
UIRadTextBox2Edit mUIRadTextBox2Edit;
private
UIRadTextBox3Edit mUIRadTextBox3Edit;
private
UIRadTextBox4Window mUIRadTextBox4Window;
private
UIRadTextBox4Edit mUIRadTextBox4Edit;
private
UIRadTextBox5Edit mUIRadTextBox5Edit;
#endregion
}
[GeneratedCode(
"Coded UITest Builder"
,
"14.0.23107.0"
)]
public
class
UIRadTextBox1Edit : WinEdit
{
public
UIRadTextBox1Edit(UITestControl searchLimitContainer) :
base
(searchLimitContainer)
{
#region Search Criteria
this
.SearchConfigurations.Add(SearchConfiguration.VisibleOnly);
this
.WindowTitles.Add(
"RadForm1"
);
#endregion
}
#region Properties
public
WinEdit UIItemEdit
{
get
{
if
((
this
.mUIItemEdit ==
null
))
{
this
.mUIItemEdit =
new
WinEdit(
this
);
#region Search Criteria
this
.mUIItemEdit.WindowTitles.Add(
"RadForm1"
);
#endregion
}
return
this
.mUIItemEdit;
}
}
#endregion
#region Fields
private
WinEdit mUIItemEdit;
#endregion
}
[GeneratedCode(
"Coded UITest Builder"
,
"14.0.23107.0"
)]
public
class
UIRadTextBox2Edit : WinEdit
{
public
UIRadTextBox2Edit(UITestControl searchLimitContainer) :
base
(searchLimitContainer)
{
#region Search Criteria
this
.SearchConfigurations.Add(SearchConfiguration.VisibleOnly);
this
.WindowTitles.Add(
"RadForm1"
);
#endregion
}
#region Properties
public
WinEdit UIItemEdit
{
get
{
if
((
this
.mUIItemEdit ==
null
))
{
this
.mUIItemEdit =
new
WinEdit(
this
);
#region Search Criteria
this
.mUIItemEdit.WindowTitles.Add(
"RadForm1"
);
#endregion
}
return
this
.mUIItemEdit;
}
}
#endregion
#region Fields
private
WinEdit mUIItemEdit;
#endregion
}
[GeneratedCode(
"Coded UITest Builder"
,
"14.0.23107.0"
)]
public
class
UIRadTextBox3Edit : WinEdit
{
public
UIRadTextBox3Edit(UITestControl searchLimitContainer) :
base
(searchLimitContainer)
{
#region Search Criteria
this
.SearchConfigurations.Add(SearchConfiguration.VisibleOnly);
this
.WindowTitles.Add(
"RadForm1"
);
#endregion
}
#region Properties
public
WinEdit UIItemEdit
{
get
{
if
((
this
.mUIItemEdit ==
null
))
{
this
.mUIItemEdit =
new
WinEdit(
this
);
#region Search Criteria
this
.mUIItemEdit.WindowTitles.Add(
"RadForm1"
);
#endregion
}
return
this
.mUIItemEdit;
}
}
#endregion
#region Fields
private
WinEdit mUIItemEdit;
#endregion
}
[GeneratedCode(
"Coded UITest Builder"
,
"14.0.23107.0"
)]
public
class
UIRadTextBox4Window : WinWindow
{
public
UIRadTextBox4Window(UITestControl searchLimitContainer) :
base
(searchLimitContainer)
{
#region Search Criteria
this
.SearchProperties[WinWindow.PropertyNames.ControlName] =
"radTextBox4"
;
this
.SearchConfigurations.Add(SearchConfiguration.VisibleOnly);
this
.WindowTitles.Add(
"RadForm1"
);
#endregion
}
#region Properties
public
WinWindow UIItemWindow
{
get
{
if
((
this
.mUIItemWindow ==
null
))
{
this
.mUIItemWindow =
new
WinWindow(
this
);
#region Search Criteria
this
.mUIItemWindow.SearchProperties.Add(
new
PropertyExpression(WinWindow.PropertyNames.ClassName,
"WindowsForms10.EDIT"
, PropertyExpressionOperator.Contains));
this
.mUIItemWindow.SearchConfigurations.Add(SearchConfiguration.VisibleOnly);
this
.mUIItemWindow.WindowTitles.Add(
"RadForm1"
);
#endregion
}
return
this
.mUIItemWindow;
}
}
#endregion
#region Fields
private
WinWindow mUIItemWindow;
#endregion
}
[GeneratedCode(
"Coded UITest Builder"
,
"14.0.23107.0"
)]
public
class
UIRadTextBox4Edit : WinEdit
{
public
UIRadTextBox4Edit(UITestControl searchLimitContainer) :
base
(searchLimitContainer)
{
#region Search Criteria
this
.SearchConfigurations.Add(SearchConfiguration.VisibleOnly);
this
.WindowTitles.Add(
"RadForm1"
);
#endregion
}
#region Properties
public
WinEdit UIItemEdit
{
get
{
if
((
this
.mUIItemEdit ==
null
))
{
this
.mUIItemEdit =
new
WinEdit(
this
);
#region Search Criteria
this
.mUIItemEdit.WindowTitles.Add(
"RadForm1"
);
#endregion
}
return
this
.mUIItemEdit;
}
}
#endregion
#region Fields
private
WinEdit mUIItemEdit;
#endregion
}
[GeneratedCode(
"Coded UITest Builder"
,
"14.0.23107.0"
)]
public
class
UIRadTextBox5Edit : WinEdit
{
public
UIRadTextBox5Edit(UITestControl searchLimitContainer) :
base
(searchLimitContainer)
{
#region Search Criteria
this
.SearchConfigurations.Add(SearchConfiguration.VisibleOnly);
this
.WindowTitles.Add(
"RadForm1"
);
#endregion
}
#region Properties
public
WinEdit UIItemEdit
{
get
{
if
((
this
.mUIItemEdit ==
null
))
{
this
.mUIItemEdit =
new
WinEdit(
this
);
#region Search Criteria
this
.mUIItemEdit.WindowTitles.Add(
"RadForm1"
);
#endregion
}
return
this
.mUIItemEdit;
}
}
#endregion
#region Fields
private
WinEdit mUIItemEdit;
#endregion
}
}
Hello,
I have a RadGridView built with a relationship like that
GridViewTemplate childTemplate = CreateChildTemplate();
m_testAlarmLibRelation = new GridViewRelation(this.gridTest.MasterTemplate, childTemplate);
m_testAlarmLibRelation.ChildTemplate = m_alarmTemplate;
m_testAlarmLibRelation.RelationName = "TestName";
m_testAlarmLibRelation.ParentColumnNames.Add("Name");
m_testAlarmLibRelation.ChildColumnNames.Add("TestName");
gridTest.Relations.Add(m_testAlarmLibRelation);
RadDragDropService svcTest = gridTest.GridViewElement.GetService<RadDragDropService>();
svcTest.PreviewDragStart += svcTest_PreviewDragStart;
svcTest.PreviewDragDrop += svcTest_PreviewDragDrop;
svcTest.PreviewDragOver += svcTest_PreviewDragOver;
I get the service on the main grid . But it doesn't work.
How can i access to service on childGrid ?
Thanks.