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

the filter icons in the colunms

0 Answers 28 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.
georges
Top achievements
Rank 1
georges asked on 22 Dec 2010, 02:03 PM
i am having issues with the grid filter icons they keep showing up on the right lower side of the colunms making the colunms look big and thick.
i want them to be in horizental to the colunm names? whats the best way to do that? i have provided code below. one more question? is there a reason the selectable does not work when i make the grid editable, it seems like i cannot select anymore a record if that happens? thanks in advance.

@using Telerik.Web.Mvc.UI;
@model IEnumerable<TPRO.Models.ActivitiesModel>
@using TPRO;
@{
    View.Title = "Activity Selection";
    Layout = "~/Views/Shared/Master.cshtml";
}

 

<table width="100%" cellpadding="0"  border="0" cellspacing="0">
       <tr><td colspan="4" style="background:#FFF8C6"  align="center"><label runat="server" id="lbltitle" class="HeaderLabels">@CommonStrings.frmMainActivities</label></td></tr>
       <tr><td colspan="4">&nbsp;</td></tr>
     
        <tr><td style="width:22px">&nbsp;</td><td align="left"><label runat="server" class="controlsLabels" id="lblProjId">Project ID</label>&nbsp;@Html.TextBox("TxtProj","0000265")</td><td align="right"><label runat="server" id="lblAcctNumber" class="controlsLabels">Project Accounting Number</label>&nbsp;@Html.TextBox("TxtAcct","HPP00-0000-00(265)")</td><td  style="width:22px">&nbsp;</td></tr>
   
       <tr><td style="height:300px" colspan="4" align="center">
     
      @(
     
         Html.Telerik().Grid(Model)
         .Name("Grid")
         .HtmlAttributes(new { style = "font-size:12px;width:950px;" })
         .ToolBar(commands => commands.Insert().ButtonType(GridButtonType.ImageAndText))
         .DataKeys(keys => keys.Add(c => c.Activity))
         .DataBinding(dataBinding => dataBinding
             .Ajax()
             .Select("EditingServerSide", "Grid")
             .Insert("Insert", "Grid")
             .Update("Save", "Grid")
             .Delete("Delete", "Grid"))
             .Columns(columns =>
              {
                  columns.Bound(m => m.Activity).Title("Activity ID").HtmlAttributes(new { style = "font-size:12px" });
                  columns.Bound(m => m.Description).Title("Description").HtmlAttributes(new { style = "font-size:12px" });
                  columns.Bound(m => m.ActualStartDate).Title("Actual Start Date").Format("{0:dd/MM/yyyy}").HtmlAttributes(new { style = "font-size:12px" });
                  columns.Bound(m => m.ActualFinishDate).Title("Actual Finish Date").Format("{0:dd/MM/yyyy}").HtmlAttributes(new { style = "font-size:12px" });
                  columns.Bound(m => m.PctComplete).Title("Percent Complete").HtmlAttributes(new { style = "font-size:12px" });
                  columns.Command(commands => { commands.Edit().ButtonType(GridButtonType.ImageAndText); commands.Delete().ButtonType(GridButtonType.ImageAndText); }).Width(200).Title("Commands");
                 
              }
            )
            .Sortable()
            .Selectable()
            .Filterable()
            .Resizable(resizing => resizing.Columns(true))
                    .Editable(e => e.DisplayDeleteConfirmation(true)
                    .Mode(GridEditMode.PopUp))
           
            .Pageable(paging =>
                {
                    paging.Enabled(true);
                    paging.PageSize(50);
                }
            )
            .Groupable()
            .Scrollable(scrolling => scrolling.Height(285))
           // .PrefixUrlParameters(false)
    
      
)
      
      
       </td></tr>
       <tr><td colspan="4"></td></tr>
           
</table>
 

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