Daily Programming Tips


Infragistics Ultrawingrid 

Disable activation

  e.Layout.Bands(0).Columns("DealError").CellActivation = Activation.Disabled

Change color of disabled cell

  e.Layout.Bands(0).Columns("DealError").CellAppearance.ForeColorDisabled = Color.Red


Get Content Type of a web page


            var request = HttpWebRequest.Create("http://www.google.com") as HttpWebRequest;
            if (request != null)
            {
                var response = request.GetResponse() as HttpWebResponse;

                string contentType = "";

                if (response != null)
                    contentType = response.ContentType;
            }

            Console.Read();

Print WPF WebBrowser Content

 mshtml.IHTMLDocument2 doc = webbrwsr.Document as mshtml.IHTMLDocument2;
 doc.execCommand("Print", true, null);

Comments

Popular posts from this blog

Combining multiple images to single one height wise using C#