Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Matglas

@Matglas
About
Posts
37
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • design time element support [modified]
    M Matglas

    I need some help on getting the intellisense to work in the editor for my custom control. I have a control had uses sup elements. Look like this. < Control > < / Control > I can't get the design time support working for the option elements like it works in the datagrid and other controls. I they have it I can have it too. So if anyone knows something about this. Please help me.

    C# visual-studio design help

  • set this object to null
    M Matglas

    I already thought so but did not directly find a way to set the parent on Deserialization. Or I have to Recursivly go through every object.

    C# help question

  • set this object to null
    M Matglas

    This is the object situation. I copyed some code, to show you. The DeletePage() needs to delete the page from the Pages property in the Document.

        public class Document : ITreeView
        {
            public Document() { }
    
            private PageCollection _pages = new PageCollection();
            [XmlElement(ElementName = "page")]
            public PageCollection Pages
            {
                get { return _pages; }
                set { _pages = value; }
            }
    
            #region public methods
            public Document Deserialize(string file)
            {
                //..
            }
            public void Serialize(string file, Document doc)
            {
                //...
            }
            #endregion
    
            #region ITreeView Members
    
            public ContextMenu GetContextMenu()
            {
                ContextMenu docContext = new ContextMenu();
    
                //...
    
                return docContext;
            }
            public ObjectTreeNode GetTreeNode()
            {
                return new ObjectTreeNode(this, "document", 0, 0);
            }
    
            #endregion
        }
    
        public class Page : ITreeView
        {
            public Page() { }
    
            #region properties
            //...
            #endregion
    
            #region ITreeView Members
    
            public ObjectTreeNode GetTreeNode()
            {
                return new ObjectTreeNode(this, "page " + _pagenumber, 0, 0);
            }
    
            public System.Windows.Forms.ContextMenu GetContextMenu()
            {
                ContextMenu pageContext = new ContextMenu();
    
                MenuItem delItem = new MenuItem("Delete", new EventHandler(DeletePage));
                pageContext.MenuItems.Add(delItem);
    
                return pageContext;
            }
            public void DeletePage(object sender, EventArgs e)
            {
                //delete this page
            }
    
            #endregion
        }
    
    C# help question

  • set this object to null
    M Matglas

    Ok I hope my english is good enough to explain what I want to achieve. I have a deserialized object from a xml file. This object is shown in a treeview to edit the content. I want to have the option to remove a object by clicking on it and getting it context menu. This context menu is unique for every object. I get it by a GetContextmenu method that is implementated by a Interface. The eventhandlers for each menuitem is set to a method in that object. I hope the situation is clear. Otherwise i have to make some code to show it.

    C# help question

  • How to call a method in another .aspx file
    M Matglas

    What I did one time was create a interface with a execute method. Then add the interface to your page and then place a call to the Page_Load in the execute method. Then where you want to use is create a instance of the page and use the execute method. I hope this is usefull.

    ASP.NET help tutorial question

  • set this object to null
    M Matglas

    I will explain myself a bit.

    public class A {
    
    	public void SetToNull() {
    	  //this object is null
    	  //but how do you do this
    	}
    
    }
    

    I know that I can set it like this below. But that is not what i want.

    public class A {
    
    	public void SetToNull() 
    	{
    	  //this object is null
    	  //but how do you do this
    	}
    
    }
    
    public class B {
    
    	public A a = new A();
    
    	public void SetToNull() 
    	{
    	  a = null;
    	}
    
    }
    

    It needs to be like this.

    public class A {
    
    	public void SetToNull() 
    	{
    	  //this object is null
    	  //but how do you do this
    	}
    
    }
    
    public class B {
    
    	public A a = new A();
    	public void SetToNull() 
    	{
    	  a.SetToNull();
    	}
    
    }
    
    C# help question

  • set this object to null
    M Matglas

    I need some help on the following problem. I need to have a object set itself to null. Is this in any way possible?

    C# help question

  • Relate webcontrol to sister control in page
    M Matglas

    I want to build a webcontrol that has a reference to seperate controls on the page to manipulate them on pre-render. Does anyone know how to do this. Because I can not find any articles about it.

    C# tutorial

  • Next & Previous.
    M Matglas

    I see this discussion is to crazy for words. I am Dutch and my Englisch is not too good when I write. So thanks for all the support on decrypt my spelling. And now we know that you can write nop, noop or noob.

    The Lounge html question

  • Next & Previous.
    M Matglas

    Possibly a UI noop.

    The Lounge html question

  • Calling a Method in C#
    M Matglas

    C# is case sensative. Make sure logon is Logon when the method had capital letters.

    C# csharp

  • LinkButton click event in custom web control
    M Matglas

    Thanks I'll try it tomorrow when I am back at work. Matglas

    C# help

  • LinkButton click event in custom web control
    M Matglas

    This is my code. When creating the child controls I add a linkbutton that has is linked to method viewLogLButton_Click(). But this method does not not execute. I deleted some original code because it was a lot longer.

        [ToolboxData("<{0}:ExceptionViewer runat=server />")]
        [DesignTimeVisible(true)]
        public class ExceptionViewerControl : WebControl
        {
            protected override void RenderContents(HtmlTextWriter output)
            {
                this.EnsureChildControls();
                this.RenderChildren(output);
            }
            protected override void OnInit(EventArgs e)
            {
            }
            protected override void CreateChildControls()
            {
                this.Controls.Clear();
                HtmlTable RenderTbl = LoadLogDirectory();
    
                this.Controls.Add(RenderTbl);
            }
    
            private const string mainTblId = "exViewerTbl";
            private String fileLoad = null;
    
            private HtmlTable _mainFileTable = new HtmlTable();
            private HtmlTable MainFileTable
            {
                get { return _mainFileTable; }
                set { _mainFileTable = value; }
            }
    
            private HtmlTable LoadLogDirectory(FileInfo file)
            {
                this.MainFileTable = new HtmlTable();
    
                LinkButton viewLogLButton = new LinkButton();
                viewLogLButton.CommandName = "ViewLogFile";
                viewLogLButton.CommandArgument = file.Name;
                viewLogLButton.Text = file.Name;
                viewLogLButton.Click += new EventHandler(viewLogLButton_Click);
    
                ControlCollection controls = new ControlCollection(this);
                controls.Add(viewLogLButton);
    
                if (fileLoad == file.Name) {
                   //action 
                }
    
                this.MainFileTable.Rows.Add(GetHeaderRow(controls));
                return MainFileTable;
            }
    
            void viewLogLButton_Click(object sender, EventArgs e)
            {
                fileLoad = ((LinkButton)sender).CommandArgument;
            }
    
            private HtmlTableRow GetHeaderRow(ControlCollection controls)
            {
                //header cell
                HtmlTableCell headerCell = new HtmlTableCell();
                headerCell.Attributes["class"] = styleClass;
                headerCell.Attributes["colspan"] = span.ToString();
                foreach (Control ctrl in controls)
                {
                    headerCell.Controls.Add(ctrl);
                }
                headerRow.Cells.Add(headerCell);
    
                return headerRow;
            }
    
    C# help

  • LinkButton click event in custom web control
    M Matglas

    I am working on a webcontrol that contains linkbuttons and I have to act on the click event of them. Can anyone help me to do this. I can not get it to work. Matglas

    C# help

  • Review a website
    M Matglas

    Here's my review. - First of all let someone make a stylish flash for you. The black hole stairs at me. - Center the everything. - Look at your css in IE and Firefox. (thin solid border is different from 1px solid border). - Give some padding on your tekst cells. So the text is better to read. This is my opinion. Do with it what you want.

    The Lounge com discussion

  • Don't try coding with voice recognition
    M Matglas

    It even does not work with simple speach if you look at the presentation of microsoft. Terrible. There are some other clips at Youtube too about it. Great stuff.

    The Lounge com question career

  • how to get first 5 records from a dataset having 100 records
    M Matglas

    I know that when you have a sql statement MySql support Limit 5. Then you get 5 records. But i dont know if all the database applications support it. Hope it helps.

    C# tutorial question

  • Don't try coding with voice recognition
    M Matglas

    The guys here at work started to ask where all that noise was coming from. I could not stop laughing. To good. Thanks you.

    The Lounge com question career

  • Is anyone else....
    M Matglas

    The biggest problem of MS is that there things are implemented on so many places that sometimes you just have to work with it. And I thought why dont make the best of it. Creating custom controls does give the most problems. Many times the designer crashes and then the everything wants to stop working. Maybe something like this would work better. Nice implementation of the IDE.

    The Lounge visual-studio csharp java sysadmin collaboration

  • Is anyone else....
    M Matglas

    Keep me posted on your own IDE. Love to see the result ;)

    The Lounge visual-studio csharp java sysadmin collaboration
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups