Telerik Forums
UI for WPF Forum
1 answer
76 views
Hi, I have a radgridview with ItemSource as binding and all but one column with DataMemberBinding. The exception column is the one which I would like to get user input. However, after typing some stuffs into a cell of that column and pressing enter, the cell will become blank again. Is there a solution or workaround for this?

Thank you for your attention!
Dexter
Top achievements
Rank 1
 answered on 13 Apr 2014
1 answer
122 views
Hello,

I'm currently doing a POC of the use of the RadGridView in our product and we are quite stopped right now.

Indeed, we are using the RadGridView with a binded DataTable containing raw values, columns are unknown untill data is recieved so we use a grid column binding attached property to setup our columns.
We are formatting the cell values using a datatemplate that uses a converter doing custom formatting for us (we cannot use DataFormatString property since there is some complicated Data to format).

Now, we want to introduce a "Search as you type" feature, based on the Demo sample.
This is very well working but as we understand this, it filters the rows based on the binded DataTable raw values.
But as we are doing UI, the user is not seeing those values, but the formatted ones, so he will expect to filter on formatted values somehow.

We don't know if our current design is allowing that but if you have any solution regarding this problem, we'll be glad to hear that.

Regards,,

BenoƮt
Dimitrina
Telerik team
 answered on 11 Apr 2014
3 answers
124 views
When I printing or Print Previewing of GridView, its takes too much time nearer 15 to 20 minutes for only 250 records of the GridView.

Can you help me?

Regards,
Bharat Mendapara
Dimitrina
Telerik team
 answered on 11 Apr 2014
3 answers
93 views
I have printing problem for GridView when GridView have 15 to 17 columns and more than 300 rows.

(1) When I am printing then it gives error which I atteched image of name with Print1.
(2) When I am previewing of print then its display properly but when I click on Print button then it gives error which I atteched image of name with Print2.

Can you help me?

Regards,
Bharat Mendapara
Dimitrina
Telerik team
 answered on 11 Apr 2014
3 answers
184 views
I have defined two datatemplate:


<DataTemplate x:Key="doubleTemplate">
        <local:DoubleTextBox propertyGrid:AutoBindBehavior.UpdateBindingOnElementLoaded="Text"/>
    </DataTemplate>

and
<DataTemplate x:Key="usrDoubleTemplate">
        <GridName="gridRoot">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <local:DoubleTextBox propertyGrid:AutoBindBehavior.UpdateBindingOnElementLoaded="Text"/>           
            <Label Loaded="LabelUnit_Loaded" Grid.Column="1" Margin="2,0" ContentStringFormat="[{0}]"
                   propertyGrid:AutoBindBehavior.UpdateBindingOnElementLoaded="DataContext"/>
        </Grid>
    </DataTemplate>

When enter in editing mode with keyboard, in the first Datatemplate takes the focus on the TextBox, in the second Datatemplate does not take the focus on the TextBox.

The reason may be the grid?

Any solutions?
Dimitrina
Telerik team
 answered on 11 Apr 2014
1 answer
98 views
My environment
  Visual Studio 2012 Ultimate with Telerik coded UI extension setup
  Telerik UI for WPF 2014 Q1

My question is -- for test automation purpose, can I (how can I) get the data inside a Telerik grid as a whole nested object model?

See the attached picture, it shows how coded UI identify a telerik gridview instance. I put the coded UI identifier on a gridview control. It identify the cell and its property. But that's not what I want. I want to be able to get the data in a grid as in a whole object model way, so I can get the specific row object then cell object.
Yordanka
Telerik team
 answered on 11 Apr 2014
4 answers
87 views
Hi Team,

                I have placed a combo box in a view and inside Rad Pane. Both combo box item source are same. But combo box inside Rad Pane is not supporting Internationalization. To test I18N I used Japanease machine. In Japanease machine '\' is considered as 'ļæ„' symbol.

                I have attached a screen shot. Please let me know the solution.
Vladi
Telerik team
 answered on 11 Apr 2014
5 answers
196 views
Hi,

I have a table that uses read only ranges for the first cell in each column and row to prevent user input. I have an issue with the tab stopping not entering the last cell of each row but if I tab again it tabs to the next row. This is due to starting my read only ranges in these cells in order to make the first cell in each row completely non-editable, if I remove them it works fine.

Is there any way to bring the tab stop back to these cells or an alternative solution to making my headers read only?

Here's the code I'm using to generate the table using two string arrays for the definition:

01.Table table = new Table();
02.table.StyleName = RadDocumentDefaultStyles.DefaultTableGridStyleName;
03.TableRow headerRow = new TableRow();
04.TableCell cornerCell = new TableCell();
05. 
06.Paragraph readOnlyPara = new Paragraph();
07.ReadOnlyRangeStart range = new ReadOnlyRangeStart();
08.range.AnnotationID = 1;
09.readOnlyPara.Inlines.Add(range);
10.cornercell.Blocks.Add(readOnlyPara);
11.cornerCell.Background = Colors.LightGray;
12.headerRow.Cells.Add(cornerCell);
13.table.AddRow(headerRow);
14. 
15.//Add the column headers, which are an array of strings
16.foreach (string header in headers)
17.{
18.    TableCell cell = new TableCell();
19.    cell.Background = Colors.LightGray;
20.    Paragraph p = new Paragraph();
21.    Span text;
22. 
23.    //telerik paragraph cannot take empty span
24.    if(String.IsNullOrEmpty(header))
25.        text = new Span(" ");
26.    else
27.        text = new Span(header);
28.    text.FontWeight = FontWeights.Bold;
29. 
30.    p.Inlines.Add(text);
31.    cell.Blocks.Add(p);
32.    headerRow.Cells.Add(cell);
33.}
34. 
35.//questions are an array of strings
36.for (int i = 0; i < questions.Length; i++)
37.{
38.    //Add the first cell of each Row
39.    string question = questions[i];
40.    TableRow row = new TableRow();
41.    TableCell cell = new TableCell();
42.    cell.Background = Colors.LightGray;
43.    Paragraph p = new Paragraph();
44. 
45.    Span text = new Span(question);
46.    text.FontWeight = FontWeights.Bold;
47. 
48.    p.Inlines.Add(text);
49.    cell.Blocks.Add(p);
50.    row.Cells.Add(cell);
51. 
52.    //Add the remaining cells of the row for each header
53.    for (int y = 0; y < headers.Length; y++)
54.    {
55.        string header = headers[y];
56.        TableCell answerCell = new TableCell();
57.        Paragraph answerP = new Paragraph();
58.        //End the read only at the start of each answering row
59.        if (y == 0)
60.        {
61.            ReadOnlyRangeEnd rangeEnd = new ReadOnlyRangeEnd();
62.            rangeEnd.AnnotationID = i + 1;
63.            answerP.Inlines.Add(rangeEnd);
64.        }
65. 
66.        //Start the read only range at the end of the answering row.
67.        if (y == headers.Length - 1 && i != questions.Length - 1)
68.        {
69.            ReadOnlyRangeStart rangestart = new ReadOnlyRangeStart();
70.            rangestart.AnnotationID = (i + 2);
71.            answerP.Inlines.Add(rangestart);
72.        }
73. 
74.        answerCell.Blocks.Add(answerP);
75.        row.Cells.Add(answerCell);
76.    }
77. 
78.    table.AddRow(row);
79.}
80. 
81.section.Blocks.Add(table);

Many Thanks,
Chris

Boby
Telerik team
 answered on 11 Apr 2014
3 answers
120 views
Hi,

I am looking for a way to get a TimePicker which looks like the standard one with spinbuttons to increase/decrease time.
Does Telerik provide this?
If not, how can this be achieved?

Of course I could build my own from scratch, but I expect this is not neccessary with a library like this.

Best Regards, Matthias
Konstantina
Telerik team
 answered on 11 Apr 2014
3 answers
152 views
I have a WPF application with GridView which has a button for each row:
<telerik:RadGridView x:Name="radGridView" Margin="8" ItemsSource="{Binding Quotes, Mode=TwoWay}" ShowGroupPanel="False" AutoGenerateColumns="False" Height="250">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn>
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<Button Content="Download Quote"></Button>
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewDataColumn>
<telerik:GridViewDataColumn DataMemberBinding="{Binding QuoteId}"/>
<telerik:GridViewDataColumn DataMemberBinding="{Binding ProductModelId}"/>
<telerik:GridViewDataColumn DataMemberBinding="{Binding TechnicalPrice}"/>
<telerik:GridViewDataColumn DataMemberBinding="{Binding ModelPrice}"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>

After using record and playback of actions to click the button, when replaying back the test, I get an error in regards to "Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details: "
Is GridView supported even?
According to this page, it should have been by now http://www.telerik.com/help/wpf/coded-ui-support.html

Is RadGridView able to support Coded UI Testing and any suggestions on how to fix it?



Full error:
Test Name: CodedUITestMethod1
Test FullName: CodedUITestConcepts.CodedUITest3.CodedUITestMethod1
Test Source: c:\TFS\DOTNETConcepts\Code\CodedUITestConcepts\CodedUITestConcepts\CodedUITest3.cs : line 27
Test Outcome: Failed
Test Duration: 0:01:44.527071Result Message:
Test method CodedUITestConcepts.CodedUITest3.CodedUITestMethod1 threw exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details:
TechnologyName: 'UIA'
ControlType: 'Cell'
ColumnHeader: ' '
AutomationId: 'Cell_0_0'
Search may have failed at 'Test List' Tree as it may have virtualized children. If the control being searched is descendant of 'Test List' Tree then including it as the parent container may solve the problem. ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
Result StackTrace:
at Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IScreenElement.FindAllDescendants(String bstrQueryId, Object& pvarResKeys, Int32 cResKeys, Int32 nMaxDepth)
at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindAllScreenElement(String queryId, Int32 depth, Boolean singleQueryId, Boolean throwException, Boolean resetSkipStep)
at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindScreenElement(String queryId, Int32 depth, Boolean resetSkipStep)
at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId, Int32 maxDepth, Int32& timeLeft)
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapControlNotFoundException(COMException ex, IPlaybackContext context)
at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowComException(COMException innerException, IPlaybackContext context)
at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, IPlaybackContext context)
at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String queryId)
at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId, Int32 maxDepth, Int32& timeLeft)
at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetUITestControlRecursive(Boolean useCache, Boolean alwaysSearch, ISearchArgument searchArg, IList`1 windowTitles, Int32& timeLeft)
at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetElement(Boolean useCache, ISearchArgument searchArg)
at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.Search(ISearchArgument searchArg)
at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindInternal()
at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<Find>b__d()
at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.Find()
at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetPropertyPrivate(String propertyName)
at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<>c__DisplayClass11.<GetProperty>b__10()
at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetProperty(String propertyName)
at Microsoft.VisualStudio.TestTools.UITesting.ALUtility.GetTechElementFromUITestControl(UITestControl uiTestControl)
at Microsoft.VisualStudio.TestTools.UITesting.ActionExecutorManager.GetActionExecutor(UITestControl uiControl)
at Microsoft.VisualStudio.TestTools.UITesting.Mouse.ClickImplementation(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)
at Microsoft.VisualStudio.TestTools.UITesting.Mouse.<>c__DisplayClass6.<Click>b__5()
at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
at Microsoft.VisualStudio.TestTools.UITesting.Mouse.Click(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)
at Microsoft.VisualStudio.TestTools.UITesting.Mouse.Click(UITestControl control, Point relativeCoordinate)
at CodedUITestConcepts.UIMap.DownloadQuote() in c:\TFS\DOTNETConcepts\Code\CodedUITestConcepts\CodedUITestConcepts\UIMap.Designer.cs:line 91
at CodedUITestConcepts.CodedUITest3.CodedUITestMethod1() in c:\TFS\DOTNETConcepts\Code\CodedUITestConcepts\CodedUITestConcepts\CodedUITest3.cs:line 30
Yordanka
Telerik team
 answered on 11 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?