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

[Solved] RadGridView -How can I make radiolist for each grid row items.

1 Answer 92 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
ashok
Top achievements
Rank 1
ashok asked on 05 May 2009, 01:24 PM
Hi All,

I am trying to create a Questioner which has Questions and their options I am using RadGridView, I am able to bind Question collection with grid but i am not able to understand how i will bind my Question choices collection to show the choices(RadioList Or CheckboxList) under that question.

I really appricat if any body tell me how can l implement this structure with RadGridView control or any other way in Silverlight 2.0.
This is my Data Objects:

public

 

class QuestionItems

 

{

 

    public QuestionItems()

 

    {

    }

 

    public int QuestionNumber { get; set; }

 

 

    public string QuestionText { get; set; }

 

 

    public string QuestionType { get; set; }  //Whether it's Single choice or Multichoice (Radiolist or CheckboxList)

 

 

    public List<ChoiceItems> QuestionChoices { get; set; }

 

}

 

public class ChoiceItems

 

{

 

    public ChoiceItems()

 

    {

    }

 

    public int ChoiceNumber { get; set; }

 

 

    public string ChoiceText { get; set; }

 

}



Means I need a View like given below:


     No.    Question Text
-    1.      Sample Question Text 1
              O Choice 1      O Choice 2     O Choice 3                           Choices my be Checkbox
              O Choice 4      O Choice 5     O Choice 6

-    2.      Sample Question Text 2
              O Choice 1      O Choice 2     O Choice 3

-    3.      Sample Question Text 3
              O Choice 1      O Choice 2     

-    4.      Sample Question Text 4
              O Choice 1      O Choice 2     O Choice 3
              O Choice 4      O Choice 5     O Choice 6
              O Choice 7      O Choice 8     O Choice 9

+    5.      Sample Question Text 5
+    6.      Sample Question Text 6
+    7.      Sample Question Text 7




             

1 Answer, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 05 May 2009, 04:52 PM
Hi ashok,

RadGridView is a very flexible control so with a few lines of custom code this seems to be an easy task.
Please use the sample project attached as a starting point.  In case you need some assistance adapting it to your scenario, don't hesitate to contact us.

All the best,
Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
ashok
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or