CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2008
    Location
    Step Into(F11)
    Posts
    465

    Question Fill Specific no of grid in C#

    Can anyone tell me ???.How should I make the attached Method in C# ???.Let me know The Idea .Any help would be highly appreciated !!!.
    Last edited by firoz.raj; December 16th, 2010 at 03:53 AM.

  2. #2
    Join Date
    Nov 2010
    Posts
    42

    Re: Fill Specific no of grid in C#

    Code:
    private void Method()
    {
             int x = int.Parse(txtNoOfPumps.Text);
             if (x == Properties.Settings.Default.NoOfPumps) //Assuming NoOfPumps is a digit if not 
             {                                                     //change int x to string x and get rid of the int.Parse
                        FillXNumberOfGrids();
              }
    }
    Is that what you want?
    Last edited by Mastermosley; December 15th, 2010 at 10:21 PM.

  3. #3
    Join Date
    Dec 2008
    Location
    Step Into(F11)
    Posts
    465

    Question Re: Fill Specific no of grid in C#

    Is that what you want?
    i am talking about FillXNumberOfGrids() !!!. How should i write the fillxNumerofGrids() Method ???.

  4. #4
    Join Date
    Dec 2010
    Posts
    12

    Re: Fill Specific no of grid in C#

    There is no way to solve your problem unless we know the logic behind that method.

  5. #5
    Join Date
    Oct 2008
    Location
    Cologne, Germany
    Posts
    756

    Re: Fill Specific no of grid in C#

    Quote Originally Posted by firoz.raj View Post
    No overload for method 'TryParse' takes '1' arguments
    you tell me that this error message is not clear enough? have you read the documentation of TryParse at all?

    Quote Originally Posted by firoz.raj View Post
    Code:
    X = Int32.TryParse(txtNoOfPumps.Text);
    this is a joke, isn't it? how did you come up to write such nonsense? I doubt in your programming skills.

    and why on earth are using this stupid comic font all the time? this is the last time I read your posts if you don't stop using it.

    EDIT: link corrected
    Last edited by memeloo; December 18th, 2010 at 03:23 AM.
    win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming

    remeber to give feedback you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation

    private lessons are not an option so please don't ask for help in private, I won't replay

    if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know

  6. #6
    Join Date
    Dec 2008
    Location
    Step Into(F11)
    Posts
    465

    Question Re: Fill Specific no of grid in C#

    This is still not working .here is the following code What I have written !!!.
    Code:
    X = Int32.TryParse(txtNoOfPumps.Text,outint X);
    

  7. #7
    Join Date
    Oct 2008
    Location
    Cologne, Germany
    Posts
    756

    Re: Fill Specific no of grid in C#

    Quote Originally Posted by firoz.raj View Post
    This is still not working .here is the following code What I have written !!!.
    Code:
    X = Int32.TryParse(txtNoOfPumps.Text,outint X);
    
    because this is still wrong. you must do it deliberately and I'm out of here... besides you just can't entirely give up using custom fonts and I can't stand them.
    win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming

    remeber to give feedback you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation

    private lessons are not an option so please don't ask for help in private, I won't replay

    if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know

  8. #8
    Join Date
    Dec 2008
    Location
    Step Into(F11)
    Posts
    465

    Question Re: Fill Specific no of grid in C#

    But i need to fill Rows upto No of X times ??
    Kindly find the attachment also.Thx in Advance !!!.
    Code:
    privatevoid CreateStockRows() {
    int X;
    bool Result = int.TryParse(txtNoOfPumps.Text, out X);
    if (Result==true){ 
    for (int i = 1; i <= X; i++){ 
    // grdPumps.Rows[i];
    
    }
    }
    }

    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured