Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <asp:GridView ID="guestbookGrid" runat="server"
- onprerender="Grid_PreRender"
- onrowdeleting="DeleteComment" ShowHeaderWhenEmpty="True" AllowPaging="True" onrowediting="EditComment"
- onrowupdating="UpdateComment" OnRowCancelingEdit="CancelChanges"
- AutoGenerateColumns="False" OnPageIndexChanging="changedPage"
- BorderWidth="1px" CellPadding="3"
- GridLines="None" BackColor="White"
- BorderColor="#000000" BorderStyle="Solid"
- ForeColor="Black" Width="70%" Font-Names="Calibri"
- RowStyle-CssClass="rows" AlternatingRowStyle-HorizontalAlign="Left"
- AlternatingRowStyle-Width="50" AlternatingRowStyle-Height="50"
- EditRowStyle-HorizontalAlign="Left" EditRowStyle-Width="40"
- AlternatingRowStyle-Wrap="False" PageSize="5">
- <RowStyle CssClass="rows"></RowStyle>
- <Columns>
- <asp:TemplateField HeaderText="ID" SortExpression="ID">
- <ItemTemplate>
- <asp:Label id="label_id" runat="server" Text='<% #Eval("id") %>' ReadOnly="True" Width="10px" Visible="True" Font-Size="Small"></asp:Label>
- </ItemTemplate>
- <EditItemTemplate>
- <asp:TextBox id="txtid" runat="server" Text='<% #Eval("id") %>' Width="10px" ReadOnly="True" Enabled="false" Font-Size="Small"></asp:TextBox>
- </EditItemTemplate>
- </asp:TemplateField>
- <asp:TemplateField HeaderText="Name">
- <ItemTemplate>
- <asp:Label id="label_name" runat="server" Text='<% #Eval("name") %>' Font-Size="Small" Width="10%" Height="10%" Visible="True"></asp:Label>
- </ItemTemplate>
- <EditItemTemplate>
- <asp:TextBox id="txtname" runat="server" Text='<% #Eval("name") %>' Font-Size="Small" Rows="5" TextMode="MultiLine" Width="70"></asp:TextBox>
- </EditItemTemplate>
- </asp:TemplateField>
- <asp:TemplateField HeaderText="Email">
- <ItemTemplate>
- <asp:Label id="label_email" runat="server" Text='<% #Eval("email") %>' TextMode="MultiLine" Font-Size="Small" Width="25%" Visible="False"></asp:Label>
- </ItemTemplate>
- <EditItemTemplate>
- <asp:TextBox id="txtemail" runat="server" Text='<% #Eval("email") %>' TextMode="MultiLine" Font-Size="Small" Rows="5" Width="140" Visible="False"></asp:TextBox>
- </EditItemTemplate>
- </asp:TemplateField>
- <asp:TemplateField HeaderText="Comment">
- <ItemTemplate>
- <asp:Label id="label_comment" runat="server" Text='<% #Eval("comments") %>' TextMode="MultiLine" Font-Size="Small"></asp:Label>
- </ItemTemplate>
- <EditItemTemplate>
- <asp:TextBox id="txtcomment" runat="server" Text='<% #Eval("comments") %>' TextMode="MultiLine" Font-Size="Small" Rows="5" Width="150"></asp:TextBox>
- </EditItemTemplate>
- </asp:TemplateField>
- <asp:commandfield showdeletebutton="true" ShowEditButton="true"
- deletetext="Remove" EditText=" Edit " UpdateText="Update"
- headertext="Edit Controls" SelectText="Select" NewText="New"
- InsertText="Insert" ButtonType="Button" CancelText=" Cancel " />
- </Columns>
- <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
- <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
- <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
- <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
- <EditRowStyle HorizontalAlign="Left" Width="40px"></EditRowStyle>
- <AlternatingRowStyle BackColor="#E4E4E1" />
- </asp:GridView>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement