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

Radiobutton column & text box column

2 Answers 226 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Smitha Test
Top achievements
Rank 1
Smitha Test asked on 17 Nov 2009, 07:17 AM
Hi,

I am in a fix right  now.
I want a column to have radio buttons yes or no depending upon the questions in the previous column.

For eg if question is do you want coffee in the prev column the ans would be yes or no.

Again if the question is how much creme> the radio button cell now becomes a text box cell .

So I want the column to be radio button or text box cell depending upon the prev column.

I have used the code provided in the radiobuttoncolumn in prev telerik posts ... It works fine if i just want radio button. But what if i want to have a single column as radiobutton or text box...Please explain. If there is a snippet that would help too.. 


More over how do i make the text box column enter multiline text and have accept return in it..

Thanks,



2 Answers, 1 is accepted

Sort by
0
Accepted
Martin Vasilev
Telerik team
answered on 20 Nov 2009, 10:37 AM
Hello Smitha Test,

Thank you for writing.

If you want to dynamically place radio button cells, you have to use a slightly different approach than described in this KB article. That is because RadGridView does not support different type of CellElements in one and the same column. In this case you have to use CellFormatting event to add and remove RadRadioButtonElements depending from an other cell's value. I have prepared a simple example that demonstrates this approach. Please, find it as attachment to this message.

You can find answer for your questions about multiline text in the TextBoxEditor in the other forum topic that you have created for the same question.

Do not hesitate to contact me again if you have any other questions.

Greetings,
Martin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Smitha Test
Top achievements
Rank 1
answered on 20 Nov 2009, 05:10 PM
Thanks this is excatly what i want
Tags
GridView
Asked by
Smitha Test
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Smitha Test
Top achievements
Rank 1
Share this question
or