Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. [CLIENT: <local machine>]

by Sanjeev 23. May 2016 08:41

Stopping the SQL Server Reporting Services worked for me.

Tags:

SQL

How to insert separators in Child Items of RadMenu dynamically

by Sanjeev 25. February 2014 08:43

Inserting separators in RadMenu child items dynamically is interesting. Separators can be inserted through RadMenu__ItemDataBound event. The ID of RadMenu used in the given code is RadMenuSql. 

Following is the relevant code for the same in C# -

 

protected void RadMenuSql_ItemDataBound(object sender, RadMenuEventArgs e)

        {

            int ParentIndex = 0;

            if (e.Item.Level == 0 && e.Item.Index>0)

            {

                this.InsertSeparator(e.Item.Index, this.RadMenuSql);

                ParentIndex = e.Item.Index;

            }

            if (e.Item.Level==1)

            {

                RadMenuItem parent = (RadMenuItem)e.Item.Parent;

                ParentIndex = parent.Index;

                RadMenuItem separator = new RadMenuItem();

                separator.IsSeparator = true;

                if(e.Item.Index>0)

                    this.RadMenuSql.Items[ParentIndex].Items.Insert(e.Item.Index, separator);                

            }

            if (e.Item.Level == 2)

            {

                RadMenuItem parent = (RadMenuItem)e.Item.Parent;

                ParentIndex = parent.Index; 

                RadMenuItem parentParent = (RadMenuItem)e.Item.Parent.Parent;

                int ParentParentIndex = parentParent.Index;

                RadMenuItem separator = new RadMenuItem();

                separator.IsSeparator = true;

                if (e.Item.Index > 0)

                    this.RadMenuSql.Items[ParentParentIndex].Items[ParentIndex].Items.Insert(e.Item.Index, separator);

            }

            if (e.Item.Level == 3)

            {

                RadMenuItem parent = (RadMenuItem)e.Item.Parent;

                ParentIndex = parent.Index;

                RadMenuItem parentParent = (RadMenuItem)e.Item.Parent.Parent;

                int ParentParentIndex = parentParent.Index;

                RadMenuItem parentParentParent = (RadMenuItem)e.Item.Parent.Parent.Parent;

                int ParentParentParentIndex = parentParentParent.Index;

                RadMenuItem separator = new RadMenuItem();

                separator.IsSeparator = true;

                if (e.Item.Index > 0)

                    this.RadMenuSql.Items[ParentParentParentIndex].Items[ParentParentIndex].Items[ParentIndex].Items.Insert(e.Item.Index, separator);

            }

        }

 

        private void InsertSeparator(int index, RadMenu menu)

        {

            RadMenuItem separator = new RadMenuItem();

            separator.IsSeparator = true;

            menu.Items.Insert(index, separator);

 

        }

 

Tags:

Log Table

by Sanjeev 22. December 2013 13:18

Recently, I was looking for Log/AntiLog Tables online. Unfortunately, I could not find any good table.

Hence I created one in Excel and thought to share with everybody.

Enjoy and comment if you feel like. 

LogTable.pdf (50.59 kb)

AntiLogTable.pdf (52.90 kb)

Tags:

General

TextBox

Make your views known to others and change the world.

Calendar

<<  October 2017  >>
MonTueWedThuFriSatSun
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345

View posts in large calendar