or
<telerik:RadGrid ID="rgStatus" runat="server" AutoGenerateColumns="False" BorderStyle="None" Width="100%"> <HeaderStyle HorizontalAlign="Left" Font-Bold="true" BorderWidth="0" BorderStyle="None" /> <ItemStyle BorderStyle="None" BorderWidth="0" /> <AlternatingItemStyle BorderStyle="None" BorderWidth="0" /> <ClientSettings EnablePostBackOnRowClick="false"></ClientSettings> <MasterTableView> <Columns> <telerik:GridTemplateColumn ItemStyle-Width="250" DataField="StsExternalDesc" UniqueName="StsExternalName" HeaderText="Status"> <ItemTemplate> <asp:Label ID="lblStatus" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.StsExternalDesc") %>' /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn ItemStyle-Width="125" DataField="StsDateTime" HeaderText="Date" /> <telerik:GridBoundColumn ItemStyle-Width="99" DataField="StsDateTime" HeaderText="Time" /> </Columns> <NestedViewTemplate> <table border="0" cellpadding="2" cellspacing="0"> <tr id="trStsDesc1"> <td><asp:Label ID="lblStsDesc1" runat="server" Text='<%# Eval("StsDesc1") %>'></asp:Label></td> </tr> <tr id="trStsDesc2"> <td><asp:Label ID="lblStsDesc2" runat="server" Text='<%# Eval("StsDesc2") %>'></asp:Label></td> </tr> </table> </NestedViewTemplate> </MasterTableView> </telerik:RadGrid>
for (int intAy = 1; intAy < 13; intAy++) { Label17.Text = GridView1.Items[i].Controls[intAy].Controls.Count.ToString(); string strTemp = GridView1.Items[i].Controls[intAy].Controls[1].ID; }at this code , Label17.Text return 0 so , i couldnt get strTemp !
Hi There,
I have a simple grid with a datasource. All ok, except that I dont want the user be able to set
the page size. But setting the AllowCustomPaging to false doesnt do much.... It still shows the page-size
drop down and user is able to use it too. Any tips somebody?
Cheers Peter.
<div class='Kamer_03'>03<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" GridLines="Vertical" AutoGenerateColumns="False" BackColor="#FF3399" PageSize="5" AllowPaging = "True" AllowCustomPaging="false" ><MasterTableView datasourceid="SqlDataSource1" ><RowIndicatorColumn><HeaderStyle Width="20px"></HeaderStyle></RowIndicatorColumn><ExpandCollapseColumn><HeaderStyle Width="30px"></HeaderStyle></ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="TRIA" HeaderText="TRIA" SortExpression="TRIA" UniqueName="TRIA" ReadOnly="True"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="PATIENT" HeaderText="PATIENT" UniqueName="PATIENT" ReadOnly="True" SortExpression="PATIENT"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="SPEC" HeaderText="SPEC" UniqueName="SPEC" ReadOnly="True" SortExpression="SPEC"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="NURSE" HeaderText="NURSE" UniqueName="NURSE" ReadOnly="True" SortExpression="NURSE"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="HB" HeaderText="HB" ReadOnly="True" SortExpression="HB" UniqueName="HB"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="WAIT" HeaderText="WAIT" UniqueName="WAIT" ReadOnly="True" SortExpression="WAIT"> </telerik:GridBoundColumn> </Columns></MasterTableView> <PagerStyle PageSizeLabelText="" ShowPagerText="False" /> </telerik:RadGrid> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SEH-acceptatieConnectionString %>" SelectCommand="usp_ShowPatients" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:Parameter DefaultValue="O3" Name="Ruimte" Type="String" /> </SelectParameters> </asp:SqlDataSource> </div>