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

[Solved] problem with grid Header & Footer Templates

0 Answers 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Acinmavi
Top achievements
Rank 1
Acinmavi asked on 29 Aug 2012, 02:57 AM
http://i211.photobucket.com/albums/bb39/acinmavi/telerikask-1.png
This is my index,i must custom header and footer templates,i followed this link :
http://demos.telerik.com/aspnet-mvc/razor/grid/headerfootertemplates
But when i add dropdownlist inside grid,it's nothing happend,so i must add by tag select:
columns.Template(
                         @<text>                                                       
                            <table cellspacing="0" class="data-row">
                                <tr>
                                  <td style="color:Black;text-align:center;">
                            <select id="ForwardedClassID" style="width:100px" onchange="ForwardedClassComboBoxOnChange()">
                            @foreach (var single in item.ListForwardedClass)
                            {
                                <option value="@single.ID">@single.Name</option>
                            }
                            </select>
                                 </td>
                                    <td style="color:Black;padding-left:50px;text-align:center;">@item.TotalForwardedPupil</td>
                                </tr>
                            </table>
                        </text>)
                     .HeaderTemplate(
                         @<text>       
                        <table cellspacing="0" class="data-header">
                            <tr>
                                <td colspan="2" style="text-align:center";><strong>@Res.Get("ClassForwarding_Label_ForwardedClass")</strong></td>
                            </tr>
                            <tr>
                               <td>@Res.Get("ClassForwarding_Label_ForwardedClassName")</td>
                                <td>@Res.Get("ClassForwarding_Label_TotalForwardedPupil")</td>
                            </tr>
                        </table>
                        </text>)
                     .Width(200);

but how to take value of each dropdownlist in grid to my model??
Anyhelp will be appreciate,and sorry for my poor English.
Tags
Grid
Asked by
Acinmavi
Top achievements
Rank 1
Share this question
or