<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/FiniqAppMasterPage.Master" CodeBehind="FinIQ_Dashboard_Setup.aspx.vb" Inherits="FinIQWebApp.FinIQ_Dashboard_Setup" %>


<asp:Content ID="Content200" ContentPlaceHolderID="MainContent" runat="server">

    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>

    <link href="Dashboard_main.css" rel="Stylesheet" type="text/css" id="CssLink" runat="server" />
    <script src="../FinIQJS/SortFilter_Grid.js" type="text/javascript"></script>
    <link href="../FinIQJS/FreezeGrid.css" type="text/css" rel="stylesheet">
    <script src="../FinIQJS/FreezeGrid.js" type="text/javascript"></script>


    <style type="text/css">
        .lblBlotterPaddingRight1 {
            padding-right: 5px !important;
            white-space: nowrap !important;
        }

        .ctlBlotterPaddingRight1 {
            padding-right: 10px !important;
            white-space: nowrap !important;
        }


        .MultiddlpanelBox {
            background-color: #f7f7f7;
            height: auto;
            overflow-x: auto;
            /*width: 174px;*/
            border-radius: 5px;
            border: 1px solid #f7f7f7;
            padding: 4px;
            position: absolute;
            z-index: 999999;
        }

        .txtbox1 {
            width: 182px;
        }


        .AsChart {
            height: 100%;
            background-color: #0099cc;
            border-radius: 5px;
            box-sizing: border-box;
        }

        .maindiv {
            /*height: 7px;
            width: 350px;*/
            background-color: #dddddd;
            border-radius: 5px;
        }

        .tblcontrol td, .tblcontrol th {
            font: normal 12px verdana;
            text-align: center;
            padding: 10px;
            border: 1px solid #dddddd;
            width: auto;
        }

        .tblcontrol {
            border: 1px solid #dddddd;
            border-collapse: collapse;
            margin-top: 15px;
            width: auto;
        }

        .footerRow td {
            font: bold 12px verdana !important;
            text-align: left !important;
        }

        .usercontroldiv {
            height: 600px;
            width: 266px;
        }

        /*  .MultiddlSubmit {
            width: 40%;
            margin-left: 5px;
            margin-top: 5px;
        }

        .MultiddlClear {
            width: 40%;
        }
*/
        .GridItem td > input, .GridItem td > select {
            width: 100%;
        }

        .GridItem td > span:visible {
            width: 100%;
            padding: 5px;
            display: block;
        }

        .loader {
            position: absolute;
            z-index: 9999;
            left: 31%;
            top: 6%;
        }


        /*.GridHeader th:not(:empty):empty) {
            min-width: 100px !important;
            max-width:350px;
        }

        .Grid td {
            white-space: nowrap !important;
        }*/

        .commandfield {
            text-align: center !important;
        }
    </style>

    <asp:UpdateProgress ID="UpdateProgress1" runat="server" Visible="true" DisplayAfter="1">
        <ProgressTemplate>
            <div class="loader">
                <img alt="Loading" src="../App_Resources/loading.gif" /><span class="lbl">Loading... </span>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>


    <asp:UpdatePanel ID="uPnlMain" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional" RenderMode="Block">
        <Triggers>

           
        </Triggers>
        <ContentTemplate>
            <table style="width: auto;" cellpadding="5" cellspacing="0">
                <tr>
                    <td class="lblBlotterPaddingRight1">
                        <label class="lbl">Group </label>
                    </td>
                    <td class="ctlBlotterPaddingRight1">
                        <asp:DropDownList ID="selectviewddl" runat="server" CssClass="ddl" Width="110px" AutoPostBack="true" EnableViewState="true">
                        </asp:DropDownList>
                    </td>

                    <td class="ctlBlotterPaddingRight1">
                        <asp:TextBox ID="txtSearch" runat="server" Width="250px" onkeydown="javascript:return FetchData_Enter(event);" CssClass="ddl leftText search_icon" placeholder="Scenario Search..." TabIndex="3" AutoPostBack="false"></asp:TextBox>
                    </td>
                    <td>
                        <asp:Button ID="btnLoad" runat="server" Text="Load" CssClass="btn" Style="width: 80px;" />
                    </td>
                    <td>
                        <asp:Button ID="btnAddScenario" runat="server" Text="Add Scenario" CssClass="btn" Style="width: 96px;" />
                    </td>
                    <td class="ctlBlotterPaddingRight1">
                        <asp:Button ID="btnExportToExcel" runat="server" Text="Export To Excel" CssClass="btn" ToolTip="Export To Excel" />
                    </td>
                    <td class="lblBlotterPaddingRight1">
                        <asp:Label ID="Label1" runat="server" CssClass="lbl" Text="Record(s) Per Page "></asp:Label>
                        <asp:TextBox ID="txt_RowsPerPage" runat="server" Width="38px" MaxLength="3" CssClass="ddl rightText" TabIndex="3" AutoPostBack="true" onkeydown="javascript:return FetchData_Enter(event);" OnKeyPress="return AllowNumericOnly(this);"></asp:TextBox>

                    </td>
                    <td class="ctlBlotterPaddingRight1">
                        <asp:Button ID="btnSetPageSize" runat="server" Style="display: none" CssClass="rowPerPageMargin"></asp:Button>
                    </td>
                    <td>
                        <asp:Label ID="LblTotalRecords" runat="server" CssClass="lbl" Text="Total Record(s): "></asp:Label><asp:Label ID="lblcountrecords" CssClass="lbl" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td colspan="20">
                        <asp:Label ID="lblError" runat="server" CssClass="lblError"></asp:Label>
                        <asp:Label ID="lblInfo" runat="server" CssClass="lblInfo"></asp:Label>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="updDashboardGrid" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional" RenderMode="Inline">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="selectviewddl" EventName="SelectedIndexChanged" />
            <asp:AsyncPostBackTrigger ControlID="btnLoad" EventName="click" />
            <asp:AsyncPostBackTrigger ControlID="btnAddScenario" EventName="click" />
             <asp:PostBackTrigger ControlID="btnExportToExcel" />
        </Triggers>
        <ContentTemplate>
            <table style="width: auto;" cellpadding="5" cellspacing="0">
                <tr>
                    <td>
                        <asp:GridView ID="gvDashboardMaster" runat="server" AutoGenerateColumns="false" CssClass="Grid DashboardMaster" DataKeyNames="LinkName"
                            OnPageIndexChanging="gvDashboardMaster_PageIndexChanging" OnRowCancelingEdit="gvDashboardMaster_RowCancelingEdit"
                            OnRowDeleting="gvDashboardMaster_RowDeleting" OnRowEditing="gvDashboardMaster_RowEditing" OnRowUpdating="gvDashboardMaster_RowUpdating"
                            AllowPaging="true" Style="margin-top: 5px; width: auto" ShowHeaderWhenEmpty="true" EmptyDataText="No records found.">

                            <SelectedRowStyle CssClass="GridItemSelect" />
                            <RowStyle CssClass="GridItem" />
                            <AlternatingRowStyle CssClass="GridItem" />
                            <HeaderStyle CssClass="GridHeader" />
                            <FooterStyle CssClass="GridFooter" />
                            <PagerStyle CssClass="GridPager" />
                            <Columns>
                                <asp:CommandField ShowEditButton="true" ItemStyle-CssClass="commandfield edit" HeaderStyle-Width="100px" />
                                <asp:CommandField ShowDeleteButton="true" ItemStyle-CssClass="commandfield delete" HeaderStyle-Width="40px" />
                                <asp:TemplateField HeaderText="Scenario Number" HeaderStyle-Width="120" ItemStyle-Width="120" ItemStyle-Wrap="false">
                                    <ItemStyle HorizontalAlign="Left" />
                                    <HeaderStyle Wrap="true" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblLinkName" runat="server" Text='<%# Eval("LinkName")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox runat="server" ID="txtboxLinkName" ValidationGroup="Insert"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="validateInputFields" runat="server" ControlToValidate="txtboxLinkName"
                                            ErrorMessage="*" ValidationGroup="Insert" ForeColor="red"></asp:RequiredFieldValidator>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--  <asp:BoundField DataField="LinkName" HeaderText="Scenario No." ItemStyle-Wrap="false" HeaderStyle-Wrap="false" />--%>
                                <%--<asp:BoundField DataField="ScenarioHeader" HeaderText="Scenario Header" />--%>
                                <asp:TemplateField HeaderText="Scenario Name" ItemStyle-Width="400px" HeaderStyle-Width="400px">
                                    <ItemStyle HorizontalAlign="Left" />
                                    <HeaderStyle Wrap="true" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblScenarioHeader" runat="server" Text='<%# Eval("ScenarioHeader")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox runat="server" ID="txtboxScenarioHeader" ValidationGroup="Insert"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Panel Width" ItemStyle-Width="40px" HeaderStyle-Width="40px">
                                    <ItemStyle HorizontalAlign="Right" />
                                    <HeaderStyle Wrap="true" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblPanelWidth" runat="server" Text='<%# Eval("PanelWidth")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox runat="server" ID="pnlwidth" ValidationGroup="Insert"></asp:TextBox>
                                    </EditItemTemplate>

                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Panel Height" ItemStyle-Width="40px" HeaderStyle-Width="40px">
                                    <ItemStyle HorizontalAlign="Right" />
                                    <HeaderStyle Wrap="true" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblPanelHeight" runat="server" Text='<%# Eval("PanelHeight")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox runat="server" ID="pnlheight" ValidationGroup="Insert"></asp:TextBox>
                                    </EditItemTemplate>

                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Group" ItemStyle-Width="80px" HeaderStyle-Width="80px">
                                    <ItemStyle HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblUserType" runat="server" Text='<%# Eval("UserType")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlUserType" runat="server" CssClass="ddl">
                                            <asp:ListItem Text="GT_View" Value="GT_View"></asp:ListItem>
                                            <asp:ListItem Text="RM_View" Value="RM_View"></asp:ListItem>
                                            <asp:ListItem Text="WM_View" Value="WM_View"></asp:ListItem>
                                            <%-- <asp:ListItem Text="Private" Value="Private"></asp:ListItem>
                                    <asp:ListItem Text="Public" Value="Public"></asp:ListItem>--%>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>


                                <asp:TemplateField HeaderText="Active YN" ItemStyle-Width="50px" HeaderStyle-Width="50px">
                                    <ItemStyle HorizontalAlign="Center" />
                                    <HeaderStyle Wrap="true" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblActiveYN" runat="server" Text='<%# Eval("ActiveYN")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlActiveYN" runat="server" CssClass="ddl">
                                            <asp:ListItem Text="Y" Value="Y"></asp:ListItem>
                                            <asp:ListItem Text="N" Value="N"></asp:ListItem>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Control Type" ItemStyle-Width="130px" HeaderStyle-Width="130px">
                                    <ItemTemplate>
                                        <asp:Label ID="lblControlType" runat="server" Text='<%# Eval("ControlType")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlcontroltype" runat="server" CssClass="ddl">

                                            <asp:ListItem Text="Area" Value="Area"></asp:ListItem>
                                            <asp:ListItem Text="Bar" Value="Bar"></asp:ListItem>
                                            <asp:ListItem Text="BoxPlot" Value="BoxPlot"></asp:ListItem>
                                            <asp:ListItem Text="Bubble" Value="Bubble"></asp:ListItem>
                                            <asp:ListItem Text="Candlestick" Value="Candlestick"></asp:ListItem>
                                            <asp:ListItem Text="Column" Value="Column"></asp:ListItem>
                                            <asp:ListItem Text="Doughnut" Value="Doughnut"></asp:ListItem>
                                            <asp:ListItem Text="Funnel" Value="Funnel"></asp:ListItem>
                                            <asp:ListItem Text="Line" Value="Line"></asp:ListItem>
                                            <asp:ListItem Text="Pie" Value="Pie"></asp:ListItem>
                                            <asp:ListItem Text="Polar" Value="Polar"></asp:ListItem>
                                            <asp:ListItem Text="Pyramid" Value="Pyramid"></asp:ListItem>
                                            <asp:ListItem Text="Radar" Value="Radar"></asp:ListItem>
                                            <asp:ListItem Text="Range" Value="Range"></asp:ListItem>
                                            <asp:ListItem Text="Spline" Value="Spline"></asp:ListItem>
                                            <asp:ListItem Text="StackedArea" Value="StackedArea"></asp:ListItem>
                                            <asp:ListItem Text="StackedArea100" Value="StackedArea100"></asp:ListItem>
                                            <asp:ListItem Text="StackedBar" Value="StackedBar"></asp:ListItem>
                                            <asp:ListItem Text="StackedBar100" Value="StackedBar100"></asp:ListItem>
                                            <asp:ListItem Text="StackedColumn" Value="StackedColumn"></asp:ListItem>
                                            <asp:ListItem Text="StackedColumn100" Value="StackedColumn100"></asp:ListItem>


                                            <asp:ListItem Text="Calendar" Value="Calendar"></asp:ListItem>
                                            <asp:ListItem Text="Grid" Value="Grid"></asp:ListItem>
                                            <asp:ListItem Text="Grid_With_Summary" Value="Grid_With_Summary"></asp:ListItem>
                                            <asp:ListItem Text="Grid_With_LineChart" Value="Grid_With_LineChart"></asp:ListItem>
                                            <asp:ListItem Text="Poster" Value="Poster"></asp:ListItem>
                                            <asp:ListItem Text="3DSurface" Value="3DSurface"></asp:ListItem>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>


                                <asp:TemplateField HeaderText="From And To Date Filter"   ItemStyle-Width="140px" HeaderStyle-Width="140px">
                                    <HeaderStyle Wrap="true" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblFromAndToDateFilter" runat="server" Text='<%# Eval("FromAndToDateFilter")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlfromandtodate" runat="server" CssClass="ddl">
                                            <asp:ListItem Text="" Value=""></asp:ListItem>
                                            <asp:ListItem Text="FromAndToDate" Value="FromAndToDate"></asp:ListItem>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--  <asp:BoundField DataField="entity_name" HeaderText="entity" />--%>

                                <asp:TemplateField HeaderText="Entity" ItemStyle-Width="140px" HeaderStyle-Width="140px">
                                    <ItemTemplate>
                                        <asp:Label ID="lblentity_name" runat="server" Text='<%# Eval("entity_name")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlEntity" runat="server" CssClass="ddl">
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="StoreProcName" HeaderText="Store Procedure" ItemStyle-Width="400px" HeaderStyle-Width="400px" />
                                <asp:TemplateField HeaderText="Year Filter" ItemStyle-Width="140px" HeaderStyle-Width="140px">
                                    <HeaderStyle Wrap="true" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblYearFilter" runat="server" Text='<%# Eval("YearFilter")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlyear" runat="server" CssClass="ddl">
                                            <asp:ListItem Text="" Value=""></asp:ListItem>
                                            <asp:ListItem Text="Year" Value="Year"></asp:ListItem>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Date Filter" ItemStyle-Width="140px" HeaderStyle-Width="140px">
                                    <HeaderStyle Wrap="true" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblDateFilter" runat="server" Text='<%# Eval("DateFilter")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddldate" runat="server" CssClass="ddl">
                                            <asp:ListItem Text="" Value=""></asp:ListItem>
                                            <asp:ListItem Text="Date" Value="Date"></asp:ListItem>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Time Period Filter Label" HeaderStyle-Width="75px" ItemStyle-Width="75px">
                                    <HeaderStyle Wrap="true" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblTimePeriodFilterLbl" runat="server" Text='<%# Eval("TimePeriodFilterLbl")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddltimeperiod" runat="server" CssClass="ddl">
                                            <asp:ListItem Text="" Value=""></asp:ListItem>
                                            <asp:ListItem Text="Time Period" Value="Time Period"></asp:ListItem>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Time Period Filter" ItemStyle-Width="370px" HeaderStyle-Width="370px">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTimePeriodFilter" runat="server" Text='<%# Eval("TimePeriodFilter")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddltimeperiodfilter" runat="server" CssClass="ddl">
                                            <asp:ListItem Text="" Value=""></asp:ListItem>
                                            <asp:ListItem Text="Day|Week|Month" Value="Day|Week|Month"></asp:ListItem>
                                            <asp:ListItem Text="Day|Week|Month|Last 3 Months|Last 6 Months|MTD" Value="Day|Week|Month|Last 3 Months|Last 6 Months|MTD"></asp:ListItem>
                                            <asp:ListItem Text="Day|Week|Month|Last 3 Months|Last 6 Months|MTD|YTD" Value="Day|Week|Month|Last 3 Months|Last 6 Months|MTD|YTD"></asp:ListItem>

                                            <asp:ListItem Text="Day|Week|Month|MTD|Last 3 Months|Last 6 Months" Value="Day|Week|Month|MTD|Last 3 Months|Last 6 Months"></asp:ListItem>
                                            <asp:ListItem Text="Day|Week|Month|Quarter|Year" Value="Day|Week|Month|Quarter|Year"></asp:ListItem>
                                            <asp:ListItem Text="Day|Week|Month|Quarter|Year|Last 3 Months|Last 6 Months" Value="Day|Week|Month|Quarter|Year|Last 3 Months|Last 6 Months"></asp:ListItem>

                                            <asp:ListItem Text="Day|Week|Month|Quarter|Year|Last 3 Months|Last 6 Months|MTD" Value="Day|Week|Month|Quarter|Year|Last 3 Months|Last 6 Months|MTD"></asp:ListItem>

                                            <asp:ListItem Text="Day|Week|Month|Quarter|Year|Last 3 Months|Last 6 Months|MTD|YTD" Value="Day|Week|Month|Quarter|Year|Last 3 Months|Last 6 Months|MTD|YTD"></asp:ListItem>
                                            <asp:ListItem Text="MTD|Last 3 Months|Last 6 Months" Value="MTD|Last 3 Months|Last 6 Months"></asp:ListItem>
                                            <asp:ListItem Text="MTD|YTD" Value="MTD|YTD"></asp:ListItem>
                                            <asp:ListItem Text="MTD|Last 3 Months|Last 6 Months" Value="MTD|Last 3 Months|Last 6 Months|YTD"></asp:ListItem>

                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Alignment" ItemStyle-Width="250px" HeaderStyle-Width="250px">
                                    <ItemStyle HorizontalAlign="Center" />
                                    <HeaderStyle Wrap="true" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblAlignment" runat="server" Text='<%# Eval("MethodName")%>' ToolTip="L : left-align, R : right-align, C : center-align, A : right-align(Amount), I : right-align(Interger)"></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox runat="server" ID="pnlAlignment" ValidationGroup="Insert" Text='<%# Eval("MethodName")%>' ToolTip="L : left-align, R : right-align, C : center-align, A : right-align(Amount), I : right-align(Interger)"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Access Type" ItemStyle-Width="100px" HeaderStyle-Width="100px">
                                    <ItemTemplate>
                                        <asp:Label ID="lblViewType" runat="server" Text='<%# Eval("Misc1")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlViewType" runat="server" CssClass="ddl">
                                            <asp:ListItem Text="Personal" Value="Personal"></asp:ListItem>
                                            <asp:ListItem Text="Public" Value="Public"></asp:ListItem>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="LoginID" ItemStyle-Width="100px" HeaderStyle-Width="100px">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCreatedBy" runat="server" Text='<%# Eval("CreatedBy")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox runat="server" ID="txtCreatedBy" ValidationGroup="Insert" Text='<%# Eval("CreatedBy")%>' ToolTip="Login ID"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                            </Columns>

                        </asp:GridView>

                    </td>
                </tr>
            </table>
            <div>
                <asp:Label ID="lblresult" runat="server"></asp:Label>
                <asp:Button ID="btnConfirmation" runat="server" Width="0" Style="width: 0px; height: 0px; font-size: 0; border: none; display: none;" />
                <asp:HiddenField ID="hdnDeleteRowIndex" runat="server" Value="0" EnableViewState="true" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>





    <script type="text/javascript">

        function ValidRowNumber(tbControl) {
            try {
                var ControlText = document.getElementById(tbControl).value
                var C, d;

                if (ControlText.length > 0) {
                    for (i = 0; i < ControlText.length; i++) {
                        d = ControlText.charAt(i)

                        if ((d >= '0') && (d <= '9')) {



                        }
                        else {
                            C = ControlText.substring(0, i)
                            document.getElementById(tbControl).value = C
                            document.getElementById(tbControl).focus();
                            return false
                        }
                    }
                }
                return true
            } catch (er) { }
        }

        //-------------------Message popup------------------------
        var dialogConfirmed = false;
        function ViewDialogDuplicate(obj, title, dialogText) {
            try {
                if ($("#pageName").html() != null) {
                }
                if (!dialogConfirmed) {
                    //$('html').append(String.Format("<div id='dialog' title='{0}'><p style='float:left;'><span class='ui-icon ui-icon-alert' style='float:left; margin:0 5px 20px 0;'></span>{1}</p></div>", title, dialogText));
                    $('html').append(String.Format("<div id='dialog' title='{0}'><div class='infoConfirmationBox' style='float:left; height:22px !important; width:22px !important; margin: 13px 15px 20px 10px;'></div><p> " + dialogText + " </p></div>", title));


                    $('#dialog').dialog
                            ({
                                height: 180,
                                width: 350,
                                modal: true,
                                resizable: false,
                                draggable: true,
                                close: function (event, ui) { $('html').find('#dialog').remove(); },
                                buttons:
                                {
                                    'Yes': function () {
                                        $("#ctl00_MainContent_btnConfirmation").click();
                                        $(this).dialog('close');
                                    },
                                    'No': function () {
                                        $(this).dialog('close');
                                        $('html').find("#dialog").remove();
                                        return false;
                                    }
                                }
                            });
                }

                return dialogConfirmed;
                $(".ui-widget-overlay").height($("body").height());
            } catch (er) { }
        }
        //--------------------------------------------------------
        function EnterKeyEvent(evt) {
            try {
                var code = (evt.which) ? evt.which : evt.keyCode;

                if (code == 13 || code == 9) {
                    document.getElementById('<%=btnSetPageSize.ClientID%>').click();
                }
            } catch (er) { }
        }

        function FetchData_Enter(event) {
            try {
                if (event.keyCode == 13 || event.keyCode == 9) {
                    $('#ctl00_MainContent_btnLoad').click();
                    return false;
                }
                return true;
            } catch (er) { }
        }
    </script>
</asp:Content>
