User Profile

Collapse

Profile Sidebar

Collapse
bhagyap
bhagyap
Last Activity: Feb 13 '12, 11:50 AM
Joined: Nov 15 '11
Location: Hubli,India
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • bhagyap
    started a topic Adding Menus Dynamically in asp.net

    Adding Menus Dynamically in asp.net

    Hi..

    I am using an menu control for which i am adding menuitems programmaticall y as follows:-
    Code:
    MenuItem mi = new MenuItem(TextBox1.Text);
    Menu1.Items.Add(mi);
    
    MenuItem mi1 = new MenuItem(TextBox2.Text);
    mi.ChildItems.AddAt(0, mi1);
    
    MenuItem mi2 = new MenuItem(TextBox3.Text);
    mi1.ChildItems.AddAt(0, mi2);
    Code:
    Menu1
       Menu2
          Menu3
    but if i have...
    See more | Go to post
    Last edited by Frinavale; Jan 17 '12, 04:36 PM. Reason: Added code tags.

  • bhagyap
    started a topic Delete Multiple Rows From Gridview

    Delete Multiple Rows From Gridview

    Hi..

    I am populating my GridView as follows:
    Code:
    protected void Button1_Click(object sender, EventArgs e)
    {
      string con = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
      SqlDataAdapter sda = new SqlDataAdapter("Select * from DropDownFilter", con);
      sda.Fill(dt);
      GridView1.DataSource = dt;
      GridView1.DataBind();
    }
    And...
    See more | Go to post
    Last edited by Frinavale; Jan 3 '12, 08:18 PM. Reason: Added code tags and fixed grammar.

  • bhagyap
    replied to StackOverflowExceptionUnhandled
    namespace SplashScreen
    {
    public partial class SearchResults : DockContent
    {

    #region Initialize Component

    public SearchResults()
    {
    InitializeCompo nent();
    }

    #endregion

    #region Listview Items

    private void listView1_Doubl eClick(object sender, EventArgs e)
    ...
    See more | Go to post

    Leave a comment:


  • bhagyap
    started a topic StackOverflowExceptionUnhandled

    StackOverflowExceptionUnhandled

    this.tableLayou tPanel1.ResumeL ayout(false);

    An unhandled exception of type 'System.StackOv erflowException ' occurred in mscorlib.dll occurred for the above line.. Please help me...
    See more | Go to post

  • Thank You.. Ur code is very heplful to me..
    See more | Go to post

    Leave a comment:


  • as i am populating the treeview from checkedlistbox i am retaining the state of it whenever the form loads so if i check a new folder and return to main form it populates the newly checked folders as well as previously checked..

    And how can i add root node to this??

    Thank You!!!
    See more | Go to post

    Leave a comment:


  • Thank You.. but can u please help me in not repeating the folders into treeiew..
    See more | Go to post

    Leave a comment:


  • yes.. the checked folder should list its sub folders and files then display into treeview..
    See more | Go to post

    Leave a comment:


  • I have overcome the exception which is as follows:-

    foreach (var obj in opt.checkedList Box1.CheckedIte ms)
    {
    ListDirectory(t reeView1, "E:\\mails\ \" + obj);
    treeView1.Expan dAll();
    }
    now the problem is i am unable to loop for all the checked folders..

    Please guide me where i am going wrong..
    See more | Go to post

    Leave a comment:


  • Following is my code and am getting error for GetDirectories. .

    Could not find a part of the path 'E:\mails\Syste m.Windows.Forms .CheckedListBox +CheckedItemCol lection'.



    private void ListDirectory(T reeView treeView, string path)
    {
    treeView.Nodes. Clear();
    var rootDirectoryIn fo = new DirectoryInfo(p ath);
    treeView.Nodes. Add(CreateDirec toryNode(rootDi rectoryInfo));...
    See more | Go to post

    Leave a comment:


  • Listing subfolders and files from an main folder within treeview c#

    Hi..

    I am populating a treeview in form1 based on the checkeditems in checkedlistbox which is in form2 but am unable to list the subfolders and files of the checked folder..

    Can anyone please help me????

    Thanks..

    hi..

    This is my scenario but am not getting any error..

    I have two forms form1 and form2,in form1 i have an treeview and in form2 i have checkedlistbox...
    See more | Go to post
    Last edited by Niheel; Dec 12 '11, 03:19 AM. Reason: merged code into description

  • bhagyap
    replied to Create XML file using folder path..
    Save CheckedItems and Bulid XML

    System.IO.Direc toryInfo di = new System.IO.Direc toryInfo("E:\\T esting");
    System.IO.FileS ystemInfo[] files = di.GetDirectori es();
    checkedListBox1 .Items.AddRange (files);


    Options opt = new Options();
    XmlDocument document = new XmlDocument();
    XmlElement rootElement = document.Create Element("Items" );
    foreach (var...
    See more | Go to post

    Leave a comment:


  • bhagyap
    started a topic Create XML file using folder path..

    Create XML file using folder path..

    Hi..

    I have checkedlistbox in Form1 which gives me path of an folder with the checked items now using the checked items(path) i want to create XML File and populate it into TreeView in Form2..

    Can anyone please help me??
    See more | Go to post

  • bhagyap
    started a topic CheckedListbox

    CheckedListbox

    I have an checkedlistbox in one form Form1,and an treeview in another form Form2,i want to retain state of checkedlistbox in Form2 and create XML dynamically and finally populate treeview..

    System.IO.Direc toryInfo di = new System.IO.Direc toryInfo("E:\\T esting");
    //System.IO.FileS ystemInfo[] files = di.GetFileSyste mInfos();
    System.IO.FileS ystemInfo[] files = di.GetDirectori es();
    ...
    See more | Go to post
No activity results to display
Show More
Working...