how to show gridview in center

Apr 10 2018 6:04 AM
In my project i have 1 DMAT delivery form here in RR no. textbox had text change event when value is true then show gridview popup but this grid view show right side in window and half gridview out of window this part we cant see how to set this in middle or left in window.
 
<div style="min-height:100px;width:800px;background-color:white;margin-top:80px;margin-left:380px;overflow:hidden;position:fixed;z-index:1005;border-radius:10px;">
<div >
<asp:ImageButton ID="btnClose" runat="server" ImageUrl="~/Images/closebtn.png" OnClick="btnClose_Click" Width="25px" style="float:right;margin-top:5px;" /></td>
</div>
<asp:GridView id="rptLotList" runat="server" AutoGenerateColumns="false" Visible="true" Width="800px" CssClass="grid-view"
><%--onrowdatabound="rptLotList_RowDataBound"--%>
<Columns>
<asp:TemplateField HeaderText="" HeaderStyle-Width="30px">
<ItemTemplate>
<asp:CheckBox runat="server" ID="chkLot" /><%--oncheckedchanged="chkLot_CheckedChanged" --%>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Lot No.">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("LotNumber") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Quantity">
<ItemTemplate>
<asp:Label ID="lblRemainingQuantity" runat="server" Text='<%#Eval("QuantityAvailable") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Remaining Bags">
<ItemTemplate>
<asp:Label ID="lblBagDetails" runat="server" Text='<%#Eval("BagsAvailable") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="With. Quantity">
<ItemTemplate>
<asp:TextBox runat="server" Width="100" ID="txtLotDetails" /><%--ontextchanged="txtLotDetails_TextChanged"--%>
<cc1:TextBoxWatermarkExtender ID="txtQuantityectender" runat="server" WatermarkText="Enter Quantity" TargetControlID="txtLotDetails"></cc1:TextBoxWatermarkExtender>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="With. Bags">
<ItemTemplate>
<asp:TextBox runat="server" Width="100" ID="txtBagsQuantity" ></asp:TextBox><%--ontextchanged="txtBagsQuantity_TextChanged"--%>
<cc1:TextBoxWatermarkExtender ID="txtBagsextender" runat="server" WatermarkText="Enter Bags" TargetControlID="txtBagsQuantity"></cc1:TextBoxWatermarkExtender>
<asp:Label ID="lblBagsUnit" runat="server" Font-Bold="true"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<div style="padding-left:10px;"> <asp:Button ID="btnSubmitLots" runat="server" Text="Ok" OnClick="btnSubmitLots_Click" />&nbsp;&nbsp;<asp:Button ID="btnCancelSubmitLots" runat="server" Text="Cancel" OnClick="btnCancelSubmitLots_Click" /> <b id="errormsg" runat="server" style="color:Red;text-decoration:blink;float:right;padding-right:15px;" visible="false"></b></div>
</div>
 

Answers (7)