Friday, June 10, 2016

Allow One CheckBox only in GRIDVIEW

Allow Once CheckBox only in GRIDVIEW

'--allow one checkbox only in GRIDVIEW
<script type="text/javascript" lang="javascript">
    function CheckOne(obj) {
        var grid = obj.parentNode.parentNode.parentNode;
        var inputs = grid.getElementsByTagName("input");
        for (var i = 0; i < inputs.length; i++) {
            if (inputs[i].type == "checkbox") {
                if (obj.checked && inputs[i] != obj && inputs[i].checked) {
                    inputs[i].checked = false;
                }
            }
        }
    }
</script>



'--inside your gridview
<asp:TemplateField HeaderText="Pilih">
                        <ItemTemplate>
                            <asp:CheckBox ID="chkSelect" runat="server" onclick="CheckOne(this)" />
                        </ItemTemplate>
</asp:TemplateField>

Friday, April 15, 2016

Windows Form Resize to Smaller Screen

After importing data from MS Excel into MS SQL Database using my desktop application, my application screen suddenly re-size to a smaller form.

Windows Form Re-size to Smaller Screen??
Believe it or not it's due to: "System.Data.OleDb.OleDbConnection"


What should I do?

Uninstall it and install it back. You desktop application InsyaAllah back to normal.

Download Microsoft Access Database Engine 2010 Redistributable here

DONE!