I fillin ascx control (in webpart) with a set of questions. Each question has 2 groups with 4 options to answer. I use a ListView control to display this set.
var itemsToShow = from ...
select new
{
MfKey = item[MVListsManager.MF_KEY],
Order = item[MVListsManager.MF_ORDER],
MotivationFactor = item[MVListsManager.MF_MOTIVATION_FACTOR]
};
QuestionaryListView.DataSource = itemsToShow;
QuestionaryListView.DataBind();
//QuestionaryListView.ItemCommand += ...
//QuestionaryListView.ItemUpdated += ... i tried this events but they don't fire
I have template
<LayoutTemplate>
<table width="100%" border="1px" cellspacing="0">
<tr>
<th>Motivation factor</th>
<th>Importance</th>
<th>Satisfaction</th>
</tr>
<asp:PlaceHolder ID="itemPlaceholder" runat="server" />
</table>
</LayoutTemplate>
<ItemTemplate>
<tr>
<td><span><%#Eval("MotivationFactor")%></span></td>
<td><asp:RadioButtonList runat="server" ID="RBLSignificance" CommandName="Significance" CommandArgument='<%#Eval("MfKey")%>'>
<asp:ListItem Selected="True">No answer</asp:ListItem>
<asp:ListItem>Not important</asp:ListItem>
<asp:ListItem>A little bit</asp:ListItem>
<asp:ListItem>Important</asp:ListItem>
<asp:ListItem>Very impoprtant</asp:ListItem>
</asp:RadioButtonList></td>
<td><asp:RadioButtonList runat="server" ID="RBLSatisfaction" CommandName="Satisfaction" CommandArgument='<%#Eval("MfKey")%>'>
<asp:ListItem Selected="True">No answer</asp:ListItem>
<asp:ListItem>Bad</asp:ListItem>
<asp:ListItem>So-so</asp:ListItem>
<asp:ListItem>Good</asp:ListItem>
<asp:ListItem>Very good</asp:ListItem>
</asp:RadioButtonList></td>
</tr>
</ItemTemplate>
So it looks like this
--------------------------------------------
| option1 | option1
1. Question | option2 | option2
| ... | ...
--------------------------------------------
And i don't know (i've tried a lot) how to read user input, after (or during) he fillin the questionary.
Thank you very much for your help.