This is a migrated thread and some comments may be shown as answers.

Get the text from the GridViewCell control

1 Answer 78 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stanislav
Top achievements
Rank 1
Stanislav asked on 02 Nov 2012, 12:56 AM
Hello all,

Is this a correct behaviour when I try to get a text from the GridViewCell control, and there is a button there, the Text property returns nothing?
I would have thought that it returns the text from all child controls.

In my case, there is a button in the GridViewCell, so, it is impossible to find a cell by its text, so, I have to find all cells, than a button with the expected text. It is a little bit overwhelming, isn't it? Or, I am doing something wrong. Please, give me some advice.

Thank you.

Kind Regards,
Stanislav Hordiyenko

1 Answer, 1 is accepted

Sort by
0
Accepted
Plamen
Telerik team
answered on 07 Nov 2012, 02:52 PM
Hi Stanislav,

Yes, this is expected behavior. The 'Text' property returns only the text of the first TextBlock by default. In order to get the text content of all child TextBlock elements you need to use the 'TextBlockContent' property. 

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Stanislav
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or