Monday, September 11, 2017

Add or Remove a Column to a WebDataGrid

I have been using Infragistics for long, I have gone through this scenario many times. Hope this helps few people.  The following code shows you how to add bound data field and a template data field.


private void AddReferenceFieldColumnstoWebGrid()
        {
            DataTable dtConfigureReffields = crBl.GetConfigureReferenceFields(intCompanyId, intAccountId);

            // NS: Commenting
            // Adding colums dynamically.
            // if we matched these column kyes with grid result
            // binding will take care automatically
            string strReferenceFieldName;
            int intOffset = 11;  // position where to start after ref field. 
             //this is the place where we add these columns. for me i will get dynamic columns
             // from the datatable.
            for (int j = 0; j < dtConfigureReffields.Rows.Count; j++)
            {
                strReferenceFieldName = "";
                BoundDataField boundField1 = new BoundDataField(true);
                strReferenceFieldName = "reference" + (j + 2);
                boundField1.Key = strReferenceFieldName;
                boundField1.Header.Text = dtConfigureReffields.Rows[j]["name"].ToString();
                boundField1.DataFieldName = strReferenceFieldName;

                // ADD COLUMNS
                this.referenceFieldApprovalQueueUltraWebGrid.Columns.Insert(intOffset, boundField1);
                intOffset++;
            }
        } 
    

To remove column for the grid, add this below code after databind of webdatagrid.

// REMOVE COLUMNS
this.WebDataGrid1.Columns.Remove(this.WebDataGrid1.Columns["Ref1"]);   

Sunday, March 19, 2017

What is a Malware and its differences?

Cyber Security

Cybersecurity is the body of technologies, processes and practices designed to protect networks, computers, programs and data from attack, damage or unauthorized access.

What is a Malware

Computer Security Risks is any event or action that could cause a loss of or damage to computer hardware, software, data, information, or processing capability.

Malware is software written specifically to harm and infect the host system. Malware includes viruses along with other types of software such as trojan horses, worms, spyware, and adware. Advanced malware such as ransomware are used to commit financial fraud and extort money from computer users.

Common types of malware:

  • Virus: As discussed, Virus is a specific type of malware by itself. It is a contagious piece of code that infects the other software on the host system and spreads itself once it is run. It is mostly known to spread when software is shared between computers. This acts more like a parasite.
  • Adware: Adware is also known as advertising-supported software. It is software which renders advertisements for the purpose of generating revenue for its author. The advertisements are published on the screen presented to the user at the time of installation. Adware is programmed to examine which Internet sites, the user visits frequently and to present and feature related advertisements. Not all adware has malicious intent, but it becomes a problem anyway because it harms computer performance and can be annoying.
  • Spyware: This type of malicious software, spies on you, tracks your internet activities. It helps the hacker in gathering information about the victim’s system, without the consent of the victim. This spyware’s presence is typically hidden from the host and it is very difficult to detect.
  • Worms: This type of malware will replicate itself  and destroys information and files saved on the host PC. It works to eat up all the system operating files and data files on a drive.
  • Trojan: Trojans are a type of virus that are designed to make a user think they are a safe program and run them. They may be  programmed to steal personal and  financial information, and later take over the resources of the host computer’s system files.  In large systems it may attempt to make a host system or network resource unavailable to those attempting to reach it.
  • Ransomware: Ransomware is an advanced type of malware that restricts access to the computer system until the user pays a fee.  Your screen might show a pop up warning that your have been locked out of your computer and  that you can access only after paying the cyber criminal. The cyber criminal demands a ransom to be paid in order for the restriction to be removed. The infamous Cryptolocker is one type of ransomware.

It is very difficult to live without computers or mobile devices and we have come to depend on them for many activities – communication, online purchases and payments, etc.., In order to protect our devices and data against the different types of malware mentioned above, an effective anti-malware solution is required.

Though it is commonly believed that free antivirus products are not effective enough here a link which was suggested by #PCMag for top 10 Free anti virus in this year. These are as effective as paid software's

Tuesday, March 14, 2017

How to enable Copy/paste and drag&drop in WMware machine

Here is how this can be enabled/disabled

  1. Go into VM / Settings / Options / Guest Isolation
  2. UNCHECK both checkboxes (Enable drag and drop, Enable copy and paste) and click OK.
  3. Shut down the guest, and shut down VMware Workstation
  4. Reboot the host computer
  5. Run VMware Workstation but do not launch the guest yet.
  6. Go into VM / Settings / Options / Guest Isolation for the guest, and
  7. CHECK both checkboxes
  8. Power On the guest.

Hope this helps!

Monday, March 13, 2017

Can't locate Microsoft.Office.Interop.Word

Microsoft Office primary interop assemblies (PIAs) are used for development purpose when you are working with Word or Excel.

Usually Microsoft Interop libraries are installed automatically at the time of Microsoft Office in development computer. However, in some cases you might need to install PIAs separately.

Download : Microsoft Office 2010: Primary Interop Assemblies Redistributable

Tuesday, February 21, 2017

SQL Server next version CTP 1.3 now available

Microsoft announced a new preview for the next version of SQL Server (SQL Server v.Next). Community Technology Preview (CTP) 1.3 is available on both Windows and Linux.

In this preview, Microsoft has added several feature enhancements to High Availability and Disaster Recovery (HADR), including the ability to run Always On Availability Groups on Linux. You can try the preview in your choice of development and test environments now: www.sqlserveronlinux.com.

Get started with the preview of SQL Server with developer tutorials that show you how to install and use SQL Server v.Next on macOS, Docker, Windows and Linux and quickly build an app in a programming language of your choice.

The Early Adoption Program is designed to help customers and partners evaluate new features in SQL Server v.Next, and to build and deploy applications for SQL Server v.Next on Windows and Linux. Sign up for the Early Adoption Program (EAP)