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

[Solved] displaying drop down list and text boxes inside the grid

0 Answers 98 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.
Anjali
Top achievements
Rank 1
Anjali asked on 02 Feb 2011, 10:57 PM

Hi all,

 I want to display the whole row of the table inside a grid as one row. so I have a table that has First name last name Age scores
Inside a Telerik MVC grid I want to display

First Name and the name of the person in the text box, beneath the first name , I want yo display Last name and the name of the person in a text box, same thing with age and I want to display scores in a drop down list box so that users can look at the value and edit at the same time. I only want to display one record at a time.
I can display one record at a time, but i am not sure how to edit the records and show the empty text boxes and drop down list inside the grid.

Thanks.

Any help will be greatly appreciated.

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<sp_getChildView_NewResult>>" %>
<%@ Import Namespace="TelerikMvcApplication1.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
 This is a score page
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

   <<%--%Html.BeginForm(); %>
       <%
           Html.Telerik().Grid(Model)
               .Name("GridDetails")
               .Columns(columns =>
                   {
                       columns.Template(c =>
                           {
                                %>
                                  <input name="Number" type="text" value="<%=c.firstName %>" title="R" />
                                <%
                       
                       
           });
                   })
                   .Pageable()
                   .Render();
                   
      
      
        %>
--%>
</asp:Content>
I tried the above code, but that displays the text boxs in one row. i need to display one text box for name and then directly beneacth it, i want to display lastname and test box and then drop down list box right next to the text box.

If someone has a small example, that would be really helpful.

 

Thanks.

 

Any help will be greatly appreciated.

 

Tags
Grid
Asked by
Anjali
Top achievements
Rank 1
Share this question
or