Compact source aspx from Grid

4 posts, 0 answers
  1. Tung
    Tung avatar
    9 posts
    Member since:
    Mar 2008

    Posted 11 Jul 2009 Link to this post

    Hi All!

    I have a grid without AllowSorting

    <telerik:RadGrid ID='RgP66'  CssClass='grid' GridLines='none' runat='server' Skin='Hay'
               AllowSorting   Width='100%' AllowPaging='True' PageSize='10' AutoGenerateColumns='False' >
       <PagerStyle AlwaysVisible='true' Mode='NextPrevAndNumeric'/>
       <ClientSettings>
           <Selecting AllowRowSelect='True' ></Selecting>
           <ClientEvents OnCommand='RgP66_Command'  OnRowSelected='RgP66RowSelected'  OnRowDataBound='RgP66_RowDataBound'/>
       </ClientSettings>
       <MasterTableView  Width='100%' TableLayout='Fixed'  CommandItemDisplay='None' HorizontalAlign='NotSet'>
            <Columns>
            <telerik:GridTemplateColumn UniqueName='delP66' HeaderText='Xóa' HeaderStyle-Width='30px'  >
                <ItemStyle HorizontalAlign='Center' />
                <ItemTemplate >
                  <input type='button' id='bDelP66' runat='server'  class='gcBtnDel'  onclick='DelP66(this.title);' />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <%-- -------------------------------------------------------------------------------------- --%>
            <telerik:GridBoundColumn  DataField='Id' HeaderText='Id' Visible='false'
                         DataFormatString='{0:n0}' UniqueName='Id' >
            </telerik:GridBoundColumn>
            <%-- -------------------------------------------------------------------------------------- --%>
            <%-- -------------------------------------------------------------------------------------- --%>
            <telerik:GridBoundColumn  DataField='PhieuChiTienMatId_Ten1' HeaderText='Phiếu chi tiền mặt ' Visible='true'
                         DataFormatString='{0:n0}' UniqueName='PhieuChiTienMatId_Ten1' >
            </telerik:GridBoundColumn>
            <%-- -------------------------------------------------------------------------------------- --%>
            <%-- -------------------------------------------------------------------------------------- --%>
            <telerik:GridBoundColumn  DataField='SoLuong' HeaderText='Số lượng ' Visible='true'
                         DataFormatString='{0:n0}' UniqueName='SoLuong' >
            </telerik:GridBoundColumn>
            <%-- -------------------------------------------------------------------------------------- --%>
            <%-- -------------------------------------------------------------------------------------- --%>
            <telerik:GridBoundColumn  DataField='DonViTinh' HeaderText='ĐVT ' Visible='true'
                          UniqueName='DonViTinh' >
            </telerik:GridBoundColumn>
            <%-- -------------------------------------------------------------------------------------- --%>
            <%-- -------------------------------------------------------------------------------------- --%>
            <telerik:GridBoundColumn  DataField='DonGia' HeaderText='Đơn giá ' Visible='true'
                         DataFormatString='{0:n0}' UniqueName='DonGia' >
            </telerik:GridBoundColumn>
            <%-- -------------------------------------------------------------------------------------- --%>
            <%-- -------------------------------------------------------------------------------------- --%>
            <telerik:GridBoundColumn  DataField='ThanhTien' HeaderText='Thành tiền ' Visible='true'
                         DataFormatString='{0:n0}' UniqueName='ThanhTien' >
            </telerik:GridBoundColumn>
            <%-- -------------------------------------------------------------------------------------- --%>
            <%-- -------------------------------------------------------------------------------------- --%>
            <telerik:GridBoundColumn  DataField='BoPhanId_Name6' HeaderText='Bộ phận ' Visible='true'
                         DataFormatString='{0:n0}' UniqueName='BoPhanId_Name6' >
            </telerik:GridBoundColumn>
            <%-- -------------------------------------------------------------------------------------- --%>
            <%-- -------------------------------------------------------------------------------------- --%>
            <telerik:GridBoundColumn  DataField='DichvuId_Name7' HeaderText='Dich vụ ' Visible='true'
                         DataFormatString='{0:n0}' UniqueName='DichvuId_Name7' >
            </telerik:GridBoundColumn>
            <%-- -------------------------------------------------------------------------------------- --%>
            <%-- -------------------------------------------------------------------------------------- --%>
            <telerik:GridBoundColumn  DataField='NhanvienId_HoTen8' HeaderText='Nhân viên ' Visible='true'
                         DataFormatString='{0:n0}' UniqueName='NhanvienId_HoTen8' >
            </telerik:GridBoundColumn>
            <%-- -------------------------------------------------------------------------------------- --%>
            <%-- -------------------------------------------------------------------------------------- --%>
            <telerik:GridBoundColumn  DataField='DoiTuongId_Name9' HeaderText='Đối tượng ' Visible='true'
                         DataFormatString='{0:n0}' UniqueName='DoiTuongId_Name9' >
            </telerik:GridBoundColumn>
            <%-- -------------------------------------------------------------------------------------- --%>
            <%-- -------------------------------------------------------------------------------------- --%>
            <telerik:GridBoundColumn  DataField='VAT' HeaderText='Thuế VAT ' Visible='true'
                         DataFormatString='{0:n0}' UniqueName='VAT' >
            </telerik:GridBoundColumn>
            <%-- -------------------------------------------------------------------------------------- --%>
            <%-- -------------------------------------------------------------------------------------- --%>
            <telerik:GridBoundColumn  DataField='DienGiai' HeaderText='Diễn giải ' Visible='true'
                          UniqueName='DienGiai' >
            </telerik:GridBoundColumn>
            <%-- -------------------------------------------------------------------------------------- --%>
            <telerik:GridTemplateColumn UniqueName='printP66' HeaderText='In' HeaderStyle-Width='30px'  >
                <ItemStyle HorizontalAlign='Center' />
                <ItemTemplate >
                  <input type='button' id='bPrintP66' runat='server' value='' class='gcBtnPrint'  onclick='PrintP66(this.title);' />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            </Columns>
         </MasterTableView>
    </telerik:RadGrid>


    When i view source page, the code generate here:
    <div id="P189U_RgP189" class="RadGrid RadGrid_Hay grid" style="width:100%;">

            <table class="MasterTable_Hay" cellspacing="0" border="0" id="P189U_RgP189_ctl00" style="width:100%;border-collapse:collapse;table-layout:fixed;empty-cells:show;">
        <colgroup>
            <col width="30px"  />
            <col />
            <col />
            <col />
            <col />
            <col />
            <col />
            <col />
            <col />
            <col />
            <col />
            <col />
            <col />
            <col />
            <col />
            <col />
            <col width="30px"  />
        </colgroup>
    <thead>
            <tr>
                <th scope="col" class="GridHeader_Hay">Xóa<input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl04" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00____SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl05" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00____SortDesc" style="display:none;" /></th><th scope="col" class="GridHeader_Hay">Phiếu thu <input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl08" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00__PhieuThuTienMatId_Ten1__SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl09" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00__PhieuThuTienMatId_Ten1__SortDesc" style="display:none;" /></th><th scope="col" class="GridHeader_Hay">Thẻ khách hàng <input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl10" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00__TheKHId_Ten2__SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl11" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00__TheKHId_Ten2__SortDesc" style="display:none;" /></th><th scope="col" class="GridHeader_Hay">Ngày gạch <input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl12" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00__NgayGachPhieu__SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl13" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00__NgayGachPhieu__SortDesc" style="display:none;" /></th><th scope="col" class="GridHeader_Hay">Dịch Vụ <input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl14" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00__DichVuId_Name4__SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl15" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00__DichVuId_Name4__SortDesc" style="display:none;" /></th><th scope="col" class="GridHeader_Hay">BoPhanId<input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl16" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00__BoPhanId__SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl17" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00__BoPhanId__SortDesc" style="display:none;" /></th><th scope="col" class="GridHeader_Hay">Nhân Viên Làm<input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl18" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00__NhanVienId_HoTen6__SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl19" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00__NhanVienId_HoTen6__SortDesc" style="display:none;" /></th><th scope="col" class="GridHeader_Hay">Chiết Khấu<input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl20" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00__CKNhanVien__SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl21" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00__CKNhanVien__SortDesc" style="display:none;" /></th><th scope="col" class="GridHeader_Hay">Tiền Dịch vụ<input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl22" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00__TienDV__SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl23" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00__TienDV__SortDesc" style="display:none;" /></th><th scope="col" class="GridHeader_Hay">Số lần gạch <input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl24" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00__SoLanGach__SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl25" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00__SoLanGach__SortDesc" style="display:none;" /></th><th scope="col" class="GridHeader_Hay">Thành Tiền <input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl26" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00__ThanhTien__SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl27" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00__ThanhTien__SortDesc" style="display:none;" /></th><th scope="col" class="GridHeader_Hay">Phụ thu <input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl28" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00__PhuThu__SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl29" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00__PhuThu__SortDesc" style="display:none;" /></th><th scope="col" class="GridHeader_Hay">Quên thẻ <input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl30" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00__KHQuenThe__SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl31" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00__KHQuenThe__SortDesc" style="display:none;" /></th><th scope="col" class="GridHeader_Hay">NvLam2<input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl32" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00__NvLam2_HoTen13__SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl33" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00__NvLam2_HoTen13__SortDesc" style="display:none;" /></th><th scope="col" class="GridHeader_Hay">NvLam3<input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl34" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00__NvLam3_HoTen14__SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl35" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00__NvLam3_HoTen14__SortDesc" style="display:none;" /></th><th scope="col" class="GridHeader_Hay">NvLam4<input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl36" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00__NvLam4_HoTen15__SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl37" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00__NvLam4_HoTen15__SortDesc" style="display:none;" /></th><th scope="col" class="GridHeader_Hay">In<input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl38" value=" " onclick="return false;" title="Sorted asc" class="rgSortAsc" id="P189U_RgP189_ctl00____SortAsc" style="display:none;" /><input type="submit" name="P189U$RgP189$ctl00$ctl02$ctl01$ctl39" value=" " onclick="return false;" title="Sorted desc" class="rgSortDesc" id="P189U_RgP189_ctl00____SortDesc" style="display:none;" /></th>
            </tr>
        </thead><tfoot>
            <tr class="GridPager_Hay">
                <td colspan="17"><div class="PagerLeft_Hay">
                    Chuyển trang: <span><input type="submit" name="P189U$RgP189$ctl00$ctl03$ctl01$ctl02" value=" " onclick="$find('P189U_RgP189_ctl00').page('Prev'); return false;" title="Previous Page" class="rgPagePrev" /></span>&nbsp;<a onclick="if(!$find('P189U_RgP189_ctl00').page('1')) return false;" href="javascript:__doPostBack('P189U$RgP189$ctl00$ctl03$ctl01$ctl03','')">1</a>&nbsp;<input type="submit" name="P189U$RgP189$ctl00$ctl03$ctl01$ctl04" value=" " onclick="if(!$find('P189U_RgP189_ctl00').page('Next')) return false;" title="Next Page" class="rgPageNext" />
                </div><div class="PagerRight_Hay">
                     &nbsp;Trang đang hiển thị <span id='P189U_RgP189_ctl00CPI'>1</span> trên <span id='P189U_RgP189_ctl00PCN'>1</span> trang, hàng từ <span id='P189U_RgP189_ctl00FIP'>1</span> đến <span id='P189U_RgP189_ctl00LIP'>10</span> trên <span id='P189U_RgP189_ctl00DSC'>10</span> hàng.
                </div></td>
            </tr>
        </tfoot><tbody>
        <tr class="GridRow_Hay" id="P189U_RgP189_ctl00__0">
            <td align="center">
                  <input name="P189U$RgP189$ctl00$ctl04$bDelP189" type="button" id="P189U_RgP189_ctl00_ctl04_bDelP189" class="gcBtnDel" onclick="DelP189(this.title);" />
                </td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="center">
                  <input name="P189U$RgP189$ctl00$ctl04$bPrintP189" type="button" id="P189U_RgP189_ctl00_ctl04_bPrintP189" class="gcBtnPrint" onclick="PrintP189(this.title);" />
                </td>
        </tr><tr class="GridAltRow_Hay" id="P189U_RgP189_ctl00__1">
            <td align="center">
                  <input name="P189U$RgP189$ctl00$ctl06$bDelP189" type="button" id="P189U_RgP189_ctl00_ctl06_bDelP189" class="gcBtnDel" onclick="DelP189(this.title);" />
                </td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="center">
                  <input name="P189U$RgP189$ctl00$ctl06$bPrintP189" type="button" id="P189U_RgP189_ctl00_ctl06_bPrintP189" class="gcBtnPrint" onclick="PrintP189(this.title);" />
                </td>
        </tr><tr class="GridRow_Hay" id="P189U_RgP189_ctl00__2">
            <td align="center">
                  <input name="P189U$RgP189$ctl00$ctl08$bDelP189" type="button" id="P189U_RgP189_ctl00_ctl08_bDelP189" class="gcBtnDel" onclick="DelP189(this.title);" />
                </td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="center">
                  <input name="P189U$RgP189$ctl00$ctl08$bPrintP189" type="button" id="P189U_RgP189_ctl00_ctl08_bPrintP189" class="gcBtnPrint" onclick="PrintP189(this.title);" />
                </td>
        </tr><tr class="GridAltRow_Hay" id="P189U_RgP189_ctl00__3">
            <td align="center">
                  <input name="P189U$RgP189$ctl00$ctl10$bDelP189" type="button" id="P189U_RgP189_ctl00_ctl10_bDelP189" class="gcBtnDel" onclick="DelP189(this.title);" />
                </td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="center">
                  <input name="P189U$RgP189$ctl00$ctl10$bPrintP189" type="button" id="P189U_RgP189_ctl00_ctl10_bPrintP189" class="gcBtnPrint" onclick="PrintP189(this.title);" />
                </td>
        </tr><tr class="GridRow_Hay" id="P189U_RgP189_ctl00__4">
            <td align="center">
                  <input name="P189U$RgP189$ctl00$ctl12$bDelP189" type="button" id="P189U_RgP189_ctl00_ctl12_bDelP189" class="gcBtnDel" onclick="DelP189(this.title);" />
                </td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="center">
                  <input name="P189U$RgP189$ctl00$ctl12$bPrintP189" type="button" id="P189U_RgP189_ctl00_ctl12_bPrintP189" class="gcBtnPrint" onclick="PrintP189(this.title);" />
                </td>
        </tr><tr class="GridAltRow_Hay" id="P189U_RgP189_ctl00__5">
            <td align="center">
                  <input name="P189U$RgP189$ctl00$ctl14$bDelP189" type="button" id="P189U_RgP189_ctl00_ctl14_bDelP189" class="gcBtnDel" onclick="DelP189(this.title);" />
                </td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="center">
                  <input name="P189U$RgP189$ctl00$ctl14$bPrintP189" type="button" id="P189U_RgP189_ctl00_ctl14_bPrintP189" class="gcBtnPrint" onclick="PrintP189(this.title);" />
                </td>
        </tr><tr class="GridRow_Hay" id="P189U_RgP189_ctl00__6">
            <td align="center">
                  <input name="P189U$RgP189$ctl00$ctl16$bDelP189" type="button" id="P189U_RgP189_ctl00_ctl16_bDelP189" class="gcBtnDel" onclick="DelP189(this.title);" />
                </td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="center">
                  <input name="P189U$RgP189$ctl00$ctl16$bPrintP189" type="button" id="P189U_RgP189_ctl00_ctl16_bPrintP189" class="gcBtnPrint" onclick="PrintP189(this.title);" />
                </td>
        </tr><tr class="GridAltRow_Hay" id="P189U_RgP189_ctl00__7">
            <td align="center">
                  <input name="P189U$RgP189$ctl00$ctl18$bDelP189" type="button" id="P189U_RgP189_ctl00_ctl18_bDelP189" class="gcBtnDel" onclick="DelP189(this.title);" />
                </td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="center">
                  <input name="P189U$RgP189$ctl00$ctl18$bPrintP189" type="button" id="P189U_RgP189_ctl00_ctl18_bPrintP189" class="gcBtnPrint" onclick="PrintP189(this.title);" />
                </td>
        </tr><tr class="GridRow_Hay" id="P189U_RgP189_ctl00__8">
            <td align="center">
                  <input name="P189U$RgP189$ctl00$ctl20$bDelP189" type="button" id="P189U_RgP189_ctl00_ctl20_bDelP189" class="gcBtnDel" onclick="DelP189(this.title);" />
                </td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="center">
                  <input name="P189U$RgP189$ctl00$ctl20$bPrintP189" type="button" id="P189U_RgP189_ctl00_ctl20_bPrintP189" class="gcBtnPrint" onclick="PrintP189(this.title);" />
                </td>
        </tr><tr class="GridAltRow_Hay" id="P189U_RgP189_ctl00__9">
            <td align="center">
                  <input name="P189U$RgP189$ctl00$ctl22$bDelP189" type="button" id="P189U_RgP189_ctl00_ctl22_bDelP189" class="gcBtnDel" onclick="DelP189(this.title);" />
                </td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="center">
                  <input name="P189U$RgP189$ctl00$ctl22$bPrintP189" type="button" id="P189U_RgP189_ctl00_ctl22_bPrintP189" class="gcBtnPrint" onclick="PrintP189(this.title);" />
                </td>
        </tr>
        </tbody>

    </table><input id="P189U_RgP189_ClientState" name="P189U_RgP189_ClientState" type="hidden" />
                </div>

    In this example i don't want sort header in grid, but the </thead> generate more code.
    How to declare radgrid that generate compact code?

    I want here generate code:
    <thead>
            <tr>
                <th scope="col" class="GridHeader_Hay">Xóa</th>
                <th scope="col" class="GridHeader_Hay">Phiếu thu </th>
                <th scope="col" class="GridHeader_Hay">Thẻ khách hàng </th>
                <th scope="col" class="GridHeader_Hay">Ngày gạch </th>
                <th scope="col" class="GridHeader_Hay">Dịch Vụ </th>
                <th scope="col" class="GridHeader_Hay">BoPhanId</th>
                <th scope="col" class="GridHeader_Hay">Nhân Viên Làm</th>
                <th scope="col" class="GridHeader_Hay">Chiết Khấu</th>
                <th scope="col" class="GridHeader_Hay">Tiền Dịch vụ</th>
                <th scope="col" class="GridHeader_Hay">Số lần gạch </th>
                <th scope="col" class="GridHeader_Hay">Thành Tiền </th>
                <th scope="col" class="GridHeader_Hay">Phụ thu </th>
                <th scope="col" class="GridHeader_Hay">Quên thẻ </th>
                <th scope="col" class="GridHeader_Hay">NvLam2</th><
                th scope="col" class="GridHeader_Hay">NvLam3</th>
                <th scope="col" class="GridHeader_Hay">NvLam4</th>
                <th scope="col" class="GridHeader_Hay">In</th>
            </tr>
        </thead>



  2. Tung
    Tung avatar
    9 posts
    Member since:
    Mar 2008

    Posted 11 Jul 2009 Link to this post

    and the RadGrid init here:

    Sys.Application.add_init(function() {
        $create(Telerik.Web.UI.RadGrid, {"ClientID":"P189U_RgP189","ClientSettings":{"PostBackFunction":"__doPostBack(\u0027{0}\u0027,\u0027{1}\u0027)","AllowExpandCollapse":true,"AllowGroupExpandCollapse":true,"ColumnsReorderMethod":0,"ShouldCreateRows":true,"Selecting":{"AllowRowSelect":true,"EnableDragToSelectRows":true},"Scrolling":{"SaveScrollPosition":true,"ScrollHeight":"300px"},"Resizing":{"ClipCellContentOnResize":true},"ClientMessages":{"DragToGroupOrReorder":"Drag to group or reorder","DragToResize":"Drag to resize","DropHereToReorder":"Drop here to reorder","PagerTooltipFormatString":"Page: \u003cb\u003e{0}\u003c/b\u003e out of \u003cb\u003e{1}\u003c/b\u003e pages"}},"Skin":"Hay","UniqueID":"P189U$RgP189","_activeRowIndex":"","_clientKeyValues":{},"_currentPageIndex":0,"_editIndexes":"[]","_embeddedSkin":true,"_gridTableViewsData":"[{\"ClientID\":\"P189U_RgP189_ctl00\",\"UniqueID\":\"P189U$RgP189$ctl00\",\"PageSize\":10,\"PageCount\":1,\"CurrentPageIndex\":0,\"VirtualItemCount\":0,\"AllowMultiColumnSorting\":false,\"sliderClientID\":\"\",\"sliderLabelClientID\":\"\",\"Name\":\"\",\"IsItemInserted\":false,\"clientDataKeyNames\":[],\"_selectedItemStyle\":\"\",\"_selectedItemStyleClass\":\"SelectedRow_Hay\",\"_renderActiveItemStyle\":\"\",\"_renderActiveItemStyleClass\":\"ActiveRow_Hay\",\"_columnsData\":[{\"UniqueName\":\"delP189\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"\",\"Display\":true},{\"UniqueName\":\"PhieuThuTienMatId_Ten1\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"DataFormatString\":\"{0:n0}\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"PhieuThuTienMatId_Ten1\",\"Display\":true},{\"UniqueName\":\"TheKHId_Ten2\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"DataFormatString\":\"{0:n0}\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"TheKHId_Ten2\",\"Display\":true},{\"UniqueName\":\"NgayGachPhieu\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"DataFormatString\":\"{0:dd/MM/yyyy}\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"NgayGachPhieu\",\"Display\":true},{\"UniqueName\":\"DichVuId_Name4\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"DataFormatString\":\"{0:n0}\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"DichVuId_Name4\",\"Display\":true},{\"UniqueName\":\"BoPhanId\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"DataFormatString\":\"{0:n0}\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"BoPhanId\",\"Display\":true},{\"UniqueName\":\"NhanVienId_HoTen6\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"DataFormatString\":\"{0:n0}\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"NhanVienId_HoTen6\",\"Display\":true},{\"UniqueName\":\"CKNhanVien\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"DataFormatString\":\"{0:n0}\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"CKNhanVien\",\"Display\":true},{\"UniqueName\":\"TienDV\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"DataFormatString\":\"{0:n0}\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"TienDV\",\"Display\":true},{\"UniqueName\":\"SoLanGach\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"DataFormatString\":\"{0:n0}\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"SoLanGach\",\"Display\":true},{\"UniqueName\":\"ThanhTien\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"DataFormatString\":\"{0:n0}\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"ThanhTien\",\"Display\":true},{\"UniqueName\":\"PhuThu\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"DataFormatString\":\"{0:n0}\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"PhuThu\",\"Display\":true},{\"UniqueName\":\"KHQuenThe\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"KHQuenThe\",\"Display\":true},{\"UniqueName\":\"NvLam2_HoTen13\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"DataFormatString\":\"{0:n0}\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"NvLam2_HoTen13\",\"Display\":true},{\"UniqueName\":\"NvLam3_HoTen14\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"DataFormatString\":\"{0:n0}\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"NvLam3_HoTen14\",\"Display\":true},{\"UniqueName\":\"NvLam4_HoTen15\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"DataFormatString\":\"{0:n0}\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"NvLam4_HoTen15\",\"Display\":true},{\"UniqueName\":\"printP189\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.String\",\"FilterListOptions\":0,\"CurrentFilterFunction\":0,\"CurrentFilterFunctionName\":\"NoFilter\",\"DataField\":\"\",\"Display\":true}]}]","_imagesPath":"","_loadingText":"Loading...","_masterClientID":"P189U_RgP189_ctl00","_popUpIds":"[]","_popUpSettings":{"ScrollBars":0,"Modal":false,"ZIndex":3500,"Height":{"IsEmpty":true,"Type":1,"Value":0},"Width":{"IsEmpty":false,"Type":1,"Value":400},"ViewState":{}},"_readyText":"Ready","_statusLabelID":"","allowMultiRowSelection":false,"clientStateFieldID":"P189U_RgP189_ClientState"}, {"command":RgP189_Command,"rowDataBound":RgP189_RowDataBound,"rowSelected":RgP189RowSelected}, null, $get("P189U_RgP189"));
    });

    When i using RadTab with 10 page, one tab have one grid and some control.

    It's very slow to show form.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Prangadj
    Prangadj avatar
    174 posts
    Member since:
    Jan 2008

    Posted 15 Jul 2009 Link to this post

    Tung, if you do not want to have css classes rendered for the column header cells and other grid elements, simply set Skin="" for the grid to disable skinning.

    The Sys.Application.add_init line is necessary to initialize the grid client object for the ASP.NET AJAX framework - this cannot be stripped (I see it for other ASP.NET AJAX controls when rendered).

     

    Prangadj

  5. Tung
    Tung avatar
    9 posts
    Member since:
    Mar 2008

    Posted 15 Jul 2009 Link to this post

    I want to compact code, it's using skin. If you have a tabtrip that contain 20 or more radgrid , you can see it loads page very slowly.
Back to Top