Telerik RadGrid
Idea shared by Administrator - April 8, 2018 at 11:55 AM
Proposed
Employee Post
Change the code to your needs
 
ASP.NET Page
Default.aspx
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="ncToolControls" Namespace="ncToolControls" TagPrefix="nc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <style type="text/css">
    .RadForm_Black div.qsfConfig, 
    .RadForm_BlackMetroTouch div.qsfConfig
    {
        background-color: #474747;
    }
        .RadForm_Office2010Black div.qsfConfig
    {
        background-color: #888888;
    }
    .RadForm_Glow div.qsfConfig
    {
        background-color: #404C54;
    } 
    .rgCommandCell a img
    {
        margin-right: 5px;
    }
    </style>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function RowDblClick(sender, eventArgs) {
                sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
            }
        </script>
    </telerik:RadCodeBlock>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
 <asp:HiddenField ID="hdnId" runat="server" />
 <asp:HiddenField ID="hdnFilter" runat="server" />
 <div id="content">
      <br />
        <div class="themeBar"><asp:Label id="lblPageDescription" Text="Daily Log Listing" CssClass="themetext" runat="server"></asp:Label>
            <asp:ImageButton ID="imgBut" ImageUrl="~/images/icons/close_icon.jpg" CssClass="closepanel" PostBackUrl="~/Home.aspx" runat="server" />
        </div>
         <div>
            <asp:Label ID="Label3" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#FF8080"></asp:Label>
            <asp:Label ID="Label4" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#00C000"></asp:Label>
        </div>
        <div class="ncPanel">
           <asp:Panel ID="panel1" runat="server">           
            <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
            <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="false" />
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxPanel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="Label3"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="Label4"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
            </AjaxSettings> 
            </telerik:RadAjaxManager>
            
             <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" DataSourceID="SqlDataSource2" AllowSorting="True" 
                HeaderStyle-Font-Size="12pt" HeaderStyle-Font-Bold="true"
                PageSize="7" AllowPaging="True" runat="server" OnSortCommand="RadGrid1_SortCommand"
                OnPageIndexChanged="RadGrid1_PageIndexChanged"  OnPageSizeChanged="RadGrid1_PageSizeChanged"
                OnItemCommand="RadGrid1_ItemCommand" OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged" 
                OnDeleteCommand="RadGrid1_OnDeleteCommand" >                
                <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>                
                <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataSourceID="SqlDataSource2"
                    DataKeyNames="logId" AutoGenerateColumns="false" InsertItemDisplay="Top"
                    InsertItemPageIndexAction="ShowItemOnFirstPage">
                    <Columns>                                           
                        <telerik:GridButtonColumn DataTextField="logId" CommandName="Select" HeaderText="ID" UniqueName="SelectColumn" ItemStyle-Font-Size="11pt">
                        </telerik:GridButtonColumn>                          
                        <telerik:GridBoundColumn DataField="log_date" UniqueName="log_date" HeaderText="Date" ItemStyle-Font-Size="11pt">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="log_type" UniqueName="log_type" HeaderText="Type" ItemStyle-Font-Size="11pt">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="client_name" UniqueName="client_name" HeaderText="Client Name" ItemStyle-Font-Size="11pt">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="delivery_method" UniqueName="delivery_method" HeaderText="Method" ItemStyle-Font-Size="11pt">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="entered_by" UniqueName="entered_by" HeaderText="Entered By" ItemStyle-Font-Size="11pt">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="facility_name" UniqueName="facility_name" HeaderText="Facility" ItemStyle-Font-Size="11pt">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="log_status" UniqueName="log_status" HeaderText="Status" ItemStyle-Font-Size="11pt">
                        </telerik:GridBoundColumn>
                        <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" ItemStyle-Font-Size="11pt" ConfirmText="Are you sure you want to delete the selected row?">
                        </telerik:GridButtonColumn>
                    </Columns>
                </MasterTableView>
                
             </telerik:RadGrid>
             <asp:SqlDataSource ID="SqlDataSource2" runat="server"></asp:SqlDataSource>
        </asp:Panel> 
       <asp:Panel ID="panel2" runat="server">
            <table width="100%" id="table13">
            <tr><td colspan="4" align="center">
                <asp:ValidationSummary ID="valSum1" ShowSummary="false" ShowMessageBox="true" ValidationGroup="fldValGrp1" runat="server" />
            </td></tr>
            <tr><td colspan="4" align="center"><nc:MessageBox ID="msgBox1" BoxWidth=320 runat="server" /></td></tr>            
            <tr>
                <td align="right">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="ddlFacility" InitialValue="--- SELECT ---" ValidationGroup="fldValGrp1" runat="server" ErrorMessage="Facility is required"> * </asp:RequiredFieldValidator>Facility:</td>
                <td align="left"><asp:DropDownList ID="ddlFacility" runat="server"></asp:DropDownList></td>
                <td align="right"><asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtLogDate" ValidationGroup="fldValGrp1" runat="server" ErrorMessage="Log date(mm/dd/yyyy) is required"> * </asp:RequiredFieldValidator>Log-Date:</td>
                <td align="left"><asp:TextBox ID="txtLogDate" Width="80px" runat="server"></asp:TextBox>
                         <cc1:CalendarExtender ID="CalendarExtender1" TargetControlID="txtLogDate" runat="server" />
                </td>
            </tr>
            <tr>
                <td align="right"><asp:RequiredFieldValidator ID="RequiredFieldValidator3" ControlToValidate="ddlLogType" InitialValue="SELECT" ValidationGroup="fldValGrp1" runat="server" ErrorMessage="Log type is required"> * </asp:RequiredFieldValidator>Type:</td>
                <td align="left"><asp:DropDownList ID="ddlLogType" runat="server"></asp:DropDownList></td>
                <td align="right"><asp:RequiredFieldValidator ID="RequiredFieldValidator4" ControlToValidate="ddlMethod" InitialValue="--- SELECT ---" ValidationGroup="fldValGrp1" runat="server" ErrorMessage="Delivery Method is required"> * </asp:RequiredFieldValidator>Method:</td>
                <td align="left"><asp:DropDownList ID="ddlMethod" runat="server"></asp:DropDownList></td>
            </tr>
            <tr>
                <td align="right">FollowUp-Date:</td>
                <td align="left"><asp:TextBox ID="txtFollowUpDate" Width="80px" runat="server"></asp:TextBox>
                     <cc1:CalendarExtender ID="CalendarExtender2" TargetControlID="txtFollowUpDate" runat="server" />
                </td>
                <td align="right">FollowUp-By:</td>
                <td align="left"><asp:DropDownList ID="ddlFollowUpName" runat="server"></asp:DropDownList></td>
            </tr>
            <tr>
                <td align="right"><asp:RequiredFieldValidator ID="RequiredFieldValidator5" ControlToValidate="ddlClientName" InitialValue="SELECT" ValidationGroup="fldValGrp1" runat="server" ErrorMessage="Client is required"> * </asp:RequiredFieldValidator>Client-Name:</td>
                <td align="left"><asp:DropDownList ID="ddlClientName" runat="server"></asp:DropDownList></td>
                <td align="right">Date-Entered:</td>
                <td align="left"><asp:Label ID="lblDateEntered" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td align="right">Tracking-Number:</td>
                <td align="left"><asp:TextBox ID="txtTrackingNumber" Width="250px" runat="server"></asp:TextBox>
                    <asp:ImageButton ID="imgbDelivery" CssClass="level_vertical_aligment" runat="server" />
                </td>
                <td align="right"><asp:RequiredFieldValidator ID="RequiredFieldValidator6" ControlToValidate="ddlLogStatus" InitialValue="SELECT" ValidationGroup="fldValGrp1" runat="server" ErrorMessage="State is required"> * </asp:RequiredFieldValidator>Status:</td>
                <td align="left"><asp:DropDownList ID="ddlLogStatus" runat="server">
                    <asp:ListItem>SELECT</asp:ListItem>
                    <asp:ListItem>Complete</asp:ListItem>
                    <asp:ListItem>Received</asp:ListItem>
                    <asp:ListItem>Sent</asp:ListItem>
                </asp:DropDownList></td>
            </tr>
            <tr>
                <td colspan="4" align="center">
                    <asp:Panel ID="pnlComment" GroupingText="<h4>Notes</h4>" Width="640px" runat="server">
                            <asp:TextBox ID="txtLogNote" Wrap="true" TextMode="MultiLine" Width="610px" 
                                Height="90px" runat="server"></asp:TextBox>
                    </asp:Panel>
                </td>
            </tr>
            <tr><td colspan="4" align="center">&nbsp;</td></tr>
            <tr><td colspan="4" align="center"><asp:Button ID="btnSubmit" CssClass="ncButton" Text="Save" OnClick="btnSave_Click" ValidationGroup="fldValGrp1" runat="server" /><asp:Button ID="btnDiscard" CssClass="ncButton" Text="Discard" OnClick="btnDiscard_Click" runat="server" /></td></tr>
            <tr><td colspan="4" align="center">&nbsp;</td></tr>
        </table>
       </asp:Panel> 
     </div>       
 </div>
</asp:Content>
Code Behind C#
Default.aspx.cs
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ncLegalTrack;
using Telerik.Web.UI;

public partial class MailLog_Default2 : System.Web.UI.Page
{
    private ncAuthentication oAuth = new ncAuthentication();
    private udfTools oObj1 = new udfTools();
    private oMailLog oLog = new oMailLog();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {   
            TurnMasterPanelOFF(false);
            LogDailyLogDataListing();
        }
    }
    protected void btnAddNew_Click(object sender, EventArgs e)
    {
        //-this.lit_content.Text = "Adding New Record";
        TurnMasterPanelOFF(true);
    }
    protected void btnCancel_Click(object sender, EventArgs e)
    {
        //LogDailyLogDataListing();
        TurnMasterPanelOFF(false);
        Response.Redirect("Default2.aspx");
    }
    protected void LogDailyLogDataListing()
    {
        string sDataFilter = "";
        if (hdnFilter.Value != "") { sDataFilter = hdnFilter.Value; }
        //- 20160827 - Validate Facility        
        int iFacilityId = oAuth.AuthenticatedFacilityId;
        if (oAuth.IsAdministratorUser())
        {
            iFacilityId = 0;
        }
        SqlDataSource2.ConnectionString = oLog.oDbConnectionString;
        SqlDataSource2.SelectCommand = oLog.GetSqlCommadStr(0, iFacilityId, sDataFilter);
        this.RadGrid1.DataBind();
    } 
    /*
    protected void RadGrid_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
    {
        if (e.Column.HeaderText == "ID" || e.Column.HeaderText == "Date")
        {
            e.Column.FilterControlWidth = Unit.Pixel(40);
            e.Column.HeaderStyle.Width = Unit.Pixel(90);
        }
        else if (e.Column is GridBoundColumn)
        {
            e.Column.FilterControlWidth = Unit.Pixel(120);
        }
    }
    */ 
    protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        /*
        var products = Cache["products"] as DataTable;
        if (products == null)
        {
            products = obj_Dataset.Tables["Products"];
            Cache.Insert("products", products, null, DateTime.Now.AddHours(6), TimeSpan.Zero);
        }
        RadGrid1.DataSource = products;
        */
        //string sDataFilter = "";
        //if (hdnFilter.Value != "") { sDataFilter = hdnFilter.Value; }
        //SqlDataSource2.ConnectionString = oLog.oDbConnectionString;
        //SqlDataSource2.SelectCommand = oLog.GetSqlCommadStr(0, 0, sDataFilter);
        //-this.RadGrid1.DataSource = GetDataTable();
        //this.RadGrid1.DataBind();
    }    
    protected void useLinkButton_Command(object sender, CommandEventArgs e)
    {
        int iLogId = oObj1.CTOI((String)(e.CommandArgument));
        //TurnMasterPanelOFF(true);
        /*
        hdnId.Value = iLogId.ToString();
        PopulateAllDropDownListingOnThisCurrentForm(sender, e);
        oLog.LoadDailyLogDataFor(iLogId, 0, "");
        this.lblDateEntered.Text = oLog.Date_Entered.ToShortDateString();
        this.txtLogDate.Text = oLog.Log_Date;
        this.ddlLogType.SelectedValue = oLog.Log_type;
        if (oLog.Delivery_Method.Trim() != "")
        {
            this.ddlMethod.SelectedValue = oLog.Delivery_Method.Trim();
        }
        this.ddlClientName.SelectedValue = oLog.Client_Name;
        this.ddlFacility.Text = oLog.Facility_Location.Trim();
        this.txtLogNote.Text = oLog.Log_Note;
        this.txtTrackingNumber.Text = oLog.Tracking_Number.Trim();
        this.ddlLogStatus.SelectedValue = oLog.Log_Status;
        Delivery_Tracking(oLog.Tracking_Number.Trim());
        panel1.Visible = false;
        panel2.Visible = true;
         */ 
    }
    protected void useDeleteLinkButton_Command(object sender, GridSelectCommandEventArgs e)
    {
        int iLogId = oObj1.CTOI((String)(e.CommandArgument));
        oLog.DeleteMailLogData(iLogId);
        LogDailyLogDataListing();
    }
    protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
        if (e.CommandName == RadGrid.SelectCommandName)
        {
            string sSelectedRowValue = "Primary key for the clicked item from ItemCommand: " + (e.Item as GridDataItem).GetDataKeyValue("logId").ToString();
            //oObj1.PopAlert(sSelectedRowValue, source);
        }
        if (e.CommandName == "InitInsert")
        {
            //- Add a new record
            btnAddNew_Click(source, e);
        }
        if (e.CommandName == "RebindGrid")
        {
            //-LogDailyLogDataListing();
            //-this.RadGrid1.DataBind();
            Response.Redirect("Default2.aspx");
        }
        if (e.CommandName == "Cancel")
        {
            btnCancel_Click(source, e);
        }
    }
    protected void RadGrid1_SelectedIndexChanged(object sender, System.EventArgs e)
    {
        //-Response.Write("Primary key for the clicked item from SelectedIndexChanged: "
        string sSelectedValue = "Primary key for the clicked item from SelectedIndexChanged: "        
        + (RadGrid1.SelectedItems[0] as GridDataItem).GetDataKeyValue("logId").ToString();
        string sSelectedRowId = (RadGrid1.SelectedItems[0] as GridDataItem).GetDataKeyValue("logId").ToString();
        int iLogId = oObj1.CTOI(sSelectedRowId);
        //-oObj1.PopAlert(sSelectedValue, sender);
        hdnId.Value = iLogId.ToString();        
        oLog.LoadDailyLogDataFor(iLogId, 0, "");
        hdnId.Value = iLogId.ToString();
        PopulateAllDropDownListingOnThisCurrentForm(sender, e);
        oLog.LoadDailyLogDataFor(iLogId, 0, "");
        this.lblDateEntered.Text = oLog.Date_Entered.ToShortDateString();
        this.txtLogDate.Text = oLog.Log_Date;
        this.ddlLogType.SelectedValue = oLog.Log_type;
        if (oLog.Delivery_Method.Trim() != "")
        {
            this.ddlMethod.SelectedValue = oLog.Delivery_Method.Trim();
        }
        this.ddlClientName.SelectedValue = oLog.Client_Name;
        this.ddlFacility.Text = oLog.Facility_Location.Trim();
        this.txtLogNote.Text = oLog.Log_Note;
        this.txtTrackingNumber.Text = oLog.Tracking_Number.Trim();
        this.ddlLogStatus.SelectedValue = oLog.Log_Status;
        Delivery_Tracking(oLog.Tracking_Number.Trim());
        TurnMasterPanelOFF(true);
    }
    protected void RadGrid1_OnDeleteCommand(object sender, GridCommandEventArgs  e)
    {
        string sSelectedRowValueToDelete = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["logId"].ToString();
        int iDeleteLogId = oObj1.CTOI(sSelectedRowValueToDelete);     
        if (iDeleteLogId > 0)
        {   
            oLog.LoadDailyLogDataFor(iDeleteLogId, 0, "");
            //lit_content.Text = oLog.Client_Name + " - " + iDeleteLogId.ToString() + " Deleted";
            //-TurnMasterPanelOFF(true);
            oObj1.PopAlert(oLog.Client_Name + " - " + iDeleteLogId.ToString() + " Deleted", sender);
            btnCancel_Click(sender, e);
        }
    }
    protected void RadGrid1_PageSizeChanged(object sender, GridPageSizeChangedEventArgs e)
    {
        LogDailyLogDataListing();
    }

    protected void RadGrid1_PageIndexChanged(object sender, Telerik.Web.UI.GridPageChangedEventArgs e)
    {
        LogDailyLogDataListing();
    }

    protected void RadGrid1_SortCommand(object sender, Telerik.Web.UI.GridSortCommandEventArgs e)
    {
        LogDailyLogDataListing();
    }
    private void DisplayMessage(bool isError, string text)
    {
        if (isError)
        {
            //this.Label1.Text = text;
            this.Label3.Text = text;
        }
        else
        {
            //this.Label2.Text = text;
            this.Label4.Text = text;
        }
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        int iLogId = oObj1.CTOI(hdnId.Value);
        //- int iFacilityId = oObj1.CTOI(this.ddlFacility.Text.Trim());

        oLog.Log_Date = this.txtLogDate.Text.Trim();
        oLog.Log_type = this.ddlLogType.Text.Trim();
        oLog.Client_Name = this.ddlClientName.Text.Trim();
        oLog.Delivery_Method = this.ddlMethod.Text.Trim();
        oLog.FollowUp_Date = this.txtFollowUpDate.Text.Trim();
        oLog.FollowUp_Name = this.ddlFollowUpName.SelectedItem.Text.Trim();
        oLog.Facility_Location = this.ddlFacility.SelectedItem.Text.Trim();
        oLog.Log_Note = this.txtLogNote.Text.Trim().Replace("'", "");
        oLog.Tracking_Number = this.txtTrackingNumber.Text.Trim().Replace("'", "");
        oLog.Entered_By = oAuth.AuthenticatedUserName.Trim();
        oLog.Log_Status = this.ddlLogStatus.Text.Trim();
        oLog.SaveDailyLogData(iLogId);
        if (oLog.Record_Affected > 0)
        {
            this.msgBox1.ContentMessageText = "Successfully Saved";
            if (iLogId == 0)
            {
                hdnId.Value = oLog.GetTheLastLogEntered(this.ddlFacility.SelectedItem.Text.Trim()).ToString();
            }
            LogDailyLogDataListing();
        }
        else
        {
            this.msgBox1.ContentMessageText = "Sorry, could not save your entry at this time, please try again later.";
        }
    }
    protected void btnDiscard_Click(object sender, EventArgs e)
    {
        ResetAllControlOnThisCurrentForm(true);
        PopulateAllDropDownListingOnThisCurrentForm(sender, e);
        LogDailyLogDataListing();
        hdnFilter.Value = "";
        TurnMasterPanelOFF(false);
        Response.Redirect("Default2.aspx");
    }
    protected void ResetAllControlOnThisCurrentForm(bool bNew)
    {
        oObj1.ResetAllControlOnForm(this);
        hdnId.Value = "";
        if (bNew)
        {
            this.txtLogDate.Text = DateTime.Now.ToShortDateString();
            this.lblDateEntered.Text = DateTime.Now.ToShortDateString();
        }
        this.ddlLogStatus.SelectedValue = "SELECT";
        this.ddlFacility.SelectedIndex = oObj1.GetSelectedItemIndex(ddlFacility, oAuth.AuthenticatedLocation, false);
    }    
    protected void Delivery_Tracking(string pTrackingNumber)
    {
        this.imgbDelivery.Visible = false;
        if (pTrackingNumber.Trim().Length > 0)  //- https://
        {
            if (pTrackingNumber.Trim().ToUpper() != "NA" & pTrackingNumber.Trim().ToUpper() != "N/A")
            {
                this.imgbDelivery.Visible = true;
            }
        }
        ncTrackingDelivery oTrack = new ncTrackingDelivery();
        oTrack.GetTrackingInformation(pTrackingNumber);
        this.imgbDelivery.ImageUrl = "~/images/icons/shipping_icon.png";
        this.imgbDelivery.OnClientClick = oTrack.Window_Url;
        //-this.imgbDelivery.PostBackUrl = oTrack.PostBackUrl;
        oTrack.Dispose();
    }
    protected void PopulateAllDropDownListingOnThisCurrentForm(object sender, EventArgs e)
    {
        oFacilities oFacil = new oFacilities();
        oFacil.StoreLocationDropDownListing(ddlFacility);
        this.ddlFacility.SelectedIndex = oObj1.GetSelectedItemIndex(ddlFacility, oAuth.AuthenticatedLocation.Trim(), false);

        //-this.ddlFacility.Items.Clear();
        //-this.ddlFacility.Items.Add("--- SELECT ---");
        //-this.ddlFacility.Items.Add("Orlando");
        //-this.ddlFacility.Items.Add("Tampa");

        //- IN OR OUT Bound mail
        this.ddlLogType.Items.Clear();
        this.ddlLogType.Items.Add("SELECT");
        this.ddlLogType.Items.Add("Inbound");
        this.ddlLogType.Items.Add("Outbound");
        //- Method
        this.ddlMethod.Items.Clear();
        this.ddlMethod.Items.Add("--- SELECT ---");
        this.ddlMethod.Items.Add("DHL Regular");
        this.ddlMethod.Items.Add("FedEx Ground");
        this.ddlMethod.Items.Add("FedEx Overnight");
        this.ddlMethod.Items.Add("UPS Regular");
        this.ddlMethod.Items.Add("UPS Overnight");
        this.ddlMethod.Items.Add("Other");
        this.ddlMethod.Items.Add("USPS Regular");
        this.ddlMethod.Items.Add("USPS Priority");
        this.ddlMethod.Items.Add("USPS Overnight");
        //- Clients
        oLog.DropDownCustomerListing(this.ddlClientName);
        //- Staff
        oEmployee oEmp = new oEmployee();
        oEmp.EmployeeDropDownListing(ddlFollowUpName, 0);
    }
    protected void TurnMasterPanelOFF(bool pTurnOFF)
    {
        if (pTurnOFF)
        {
            panel1.Visible = false;
            panel2.Visible = true;
        }
        else
        {
            panel2.Visible = false;
            panel1.Visible = true;            
        }
    }
}
 

Reply to Thread