Full edit WebGrid Control Lrcgrid (5)--constructors, variables, and properties

Source: Internet
Author: User
Full edit WebGrid Control Lrcgrid (5)--constructors, variables, and properties
Lrcgrid inherits from System.Web.UI.WebControls.Table, implements INamingContainer interface
Metadata properties and constructors: metadata declares the label and default property of a control, and the constructor specifies a default value for some properties of the control.
[
ToolBoxData ("<{0}:lrcgrid runat=server></{0}:lrcgrid>"),
Defaultproperty ("Selsql")
]
public class Lrcgrid:system.web.ui.webcontrols.table,inamingcontainer
{

Public Lrcgrid (): Base ()
{
Font.Name = "Verdana";
Font.Size = Fontunit.point (8);
BackColor = Color.White;
ForeColor = Color.Black;
BorderStyle = Borderstyle.outset;
BorderWidth = Unit.parse ("1px");
PagerStyle = Pagerstyle.nextprev;
CurrentPageIndex = 0;
ItemsPerPage = 15;
TotalPages =-1;
Ispager = true;
}
......
To declare a private variable:
Private variables related to paging
#region and paging-related private variables
// ***********************************************************************
private string currentpagetext = "<b> </b> {0} <b> page, total </b> {1}<b> page </b>";
private string Nopageselectedtext = "No Selection page."
private String Querypagecommandtext = "SELECT * from" +
"(SELECT top {0} * from" +
"(SELECT top {1} * FROM ({2}) as T0 order by {3} {4}) as T1" +
' ORDER by {3} {5} ' as T2 +
"Order BY {3}";
private String querycountcommandtext = "Select COUNT (*) from ({0}) as T0";
// ***********************************************************************
#endregion

Private variables related to properties:
Char[] Chra = {', '};
Char[] ChrB = {' | '};
Private DataSet _ds;
Private DataTable _dt;
private string tabn;
private string _prikey;
private String _editcol = "1";

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.