User Profile

Collapse

Profile Sidebar

Collapse
BRawn
BRawn
Last Activity: Nov 4 '12, 07:19 AM
Joined: Jul 13 '10
Location: Pretoria, South Africa
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • BRawn
    replied to Inheritance
    Nevermind, found the problem.
    The classes are in different folders in the solution (not solution folders, standard folders) and each folder is seen as on object. I had to reference the folder that my MyClass was in before the Collections class would recognize it
    See more | Go to post

    Leave a comment:


  • BRawn
    started a topic Inheritance

    Inheritance

    I'm having a bit of an issue inheriting from a class. I'm taking code from an old VB.NET app and writing it in C#. I have a public class which only consists of 2 fields, a constructor and 2 properties.

    I need to inherit a generic list object which isn't a problem, but my environment doesn't see the class from which it must inherit.

    Class: MyClass

    Code:
                public class MyClass
    ...
    See more | Go to post

  • BRawn
    started a topic Move items in ComboBox

    Move items in ComboBox

    Hi guys,

    I have a data-bound ComboBox and I populate a DataSet with the values returned from a SQL query.

    Code:
            public DataSet CompanyArray(DataSet dataSet)
            {
                SqlConnection connection = InstancesTest.IDataInterface.DefineConnection();
    
                SqlCommand command = new SqlCommand();
                command.CommandText = "usp_CompanyArray";
    ...
    See more | Go to post

  • BRawn
    replied to Disable combo box value once selected
    in .NET
    If I'm understanding this correctly, you want to keep the value of the displayed item in the combobox but when you select the item, the application must do nothing with it as it will be disabled?
    See more | Go to post
    Last edited by BRawn; Oct 21 '11, 01:36 PM. Reason: Incorrect sentence structure

    Leave a comment:


  • BRawn
    started a topic DataGridViewCell Types

    DataGridViewCell Types

    This may be a stupid question to some, but is there any way I can change the display of the value in a DataGridViewCel l?

    Here's the situation:

    We have an application being driven by an AS400 using ODBC.
    Now, for most of the DataGridViews which get populated from the database have date and time fields which were created as 'int' data types on the AS400 and as a result, they display as ints in the DGV column....
    See more | Go to post

  • BRawn
    started a topic Show or Hide Elements

    Show or Hide Elements

    I'm new to ASP.NET and I've been trying write code to show and hide certain elements on link's onclick event, but no matter what I try, nothing's working. Here's my scenario...

    I have a MasterPageFile with 3 ContentPlaceHol ders. One for navigation (links which call the web forms which populate the main content placeholder), one for sub-categories (should there be) and one for the main content (which gets populated with web forms)....
    See more | Go to post

  • BRawn
    replied to Type Casting
    I tried with KeyPressEventAr gs. KeyEventArgs has a KeyCode property and KeyPressEventAr gs has a KeyChar property. I'm not too sure what the difference between these two properties are but I did try the KeyPressEventAr gs way, and still it didn't work.

    Even though his using the more generic EventArgs object, I think what his trying to achieve is monitor the keys pressed as this application monitors his APM (actions per minute) while...
    See more | Go to post

    Leave a comment:


  • BRawn
    started a topic Type Casting

    Type Casting

    I'm trying to cast types in an application a friend asked me to look at for him, but my casts aren't working. I want to cast from EventArgs to KeyEventArgs. Is this possible?

    Here's the just of it:

    Code:
    private void Form1_Load(object sender, EventArgs e)
    {
          MainMenu_Key(sender, e);
    }
    
    private void MainMenu_Key(object sender, EventArgs e)
    {
          KeyEventArgs
    ...
    See more | Go to post

  • BRawn
    replied to C# xor Converting vb6 code to c#
    Exactly right. I'll continue coding and see if it works. This helped a lot. Thanks SO much. At least the solution builds now :P
    I'll keep you posted!
    See more | Go to post

    Leave a comment:


  • BRawn
    started a topic C# xor Converting vb6 code to c#

    C# xor Converting vb6 code to c#

    Hi guys, I'm having a bit of trouble converting vb6 code to c#...specifical ly with the logical xor I need to do. I'd appreciate any solutions that come to mind. Here's what I have:

    Code:
    int calculateChecksum(string inputString)
            {
                int pChecksum = 0;
    
                try
                {
                    for (int i = 1; i < inputString.Length; i++)
    ...
    See more | Go to post

  • BRawn
    started a topic Custom Controls

    Custom Controls

    Hi,

    I'm developing an app where I want to call user controls and load it onto my main form via selections from toolstrip items.
    Do I have to make my application MDI and load every user control as a child in the parent container?

    As I'm not too familiar with MDI, I don't really want to do it this way.
    The other thing that I'm kinda struggling with is this:

    I put my connection string to my...
    See more | Go to post

  • BRawn
    replied to Router Event Log
    Thanks HaLo2FrEeEk.

    I thought as much. It's not critical and I'm not really gonna worry about it as it's a personal thing I wanted to solve on the side :P

    Thanks again
    See more | Go to post

    Leave a comment:


  • BRawn
    started a topic Router Event Log

    Router Event Log

    Hi Guys,

    I'd just like to know whether or not my router stores it's log file on my PC or is it only kept in the router's memory?

    The log file only stores for 2 days and I'd like to write an application to take the log file from the router and write it to a file, then store the file in a database.
    The storing of the file to the database isn't an issue...it's getting the event log from my router into my app. Is...
    See more | Go to post

  • BRawn
    replied to Editing cells in a DataGridView
    Nevermind guys...I got it :)

    I apologize for the mistake I made here:

    Code:
     int rowIndex = int.Parse(DataGridView1.Rows[DataGridView1.CurrentRow.Index].ToString().Trim());
    It's actually supposed to be:

    Code:
    int rowIndex = DataGridView1.CurrentRow.Index;
    It works as it is...I just made a stupid mistake :$
    See more | Go to post

    Leave a comment:


  • BRawn
    started a topic Editing cells in a DataGridView

    Editing cells in a DataGridView

    Hi guys,

    I'm busy writing an Orders application and one of the columns in the DGV is editable so the user can type in the order amount of the product. I'd like to know if there's a way to set focus to a particular cell so that if there's more than one item in the DGV and the user presses the Enter key, the next cell (Order amount) will be selected. The user must just be able to type in another amount without first having to click...
    See more | Go to post

  • BRawn
    replied to Type Conversion Error
    Hi Lou,

    Could you perhaps post the query you're trying to execute?
    It'll give us a good idea of what you're trying to do and we can try and help you from there...
    See more | Go to post

    Leave a comment:


  • Good stuff :)

    I'm assuming you're using the DataGridView control to populate your data into? Please correct me if I'm wrong...

    What I'd do is the ContextMenuStri p control and add a delete MenuStripItem to it and on the right-click event of the delete index in the MenuStripItem, I'd run a query to remove the index of the CurrentRow of the DataGridView from the DataGridView and possibly the table you're running the populate...
    See more | Go to post

    Leave a comment:


  • Are you trying to do this directly from Access or have you written an application?
    See more | Go to post

    Leave a comment:


  • Instead of displaying duplicate records, why don't you use something like 'select distinct' or have a flag in your table with a boolean datatype?

    That way you can do a select on only the data you want to see. Displaying duplicates can become a problem when there's a lot of data in your database...
    See more | Go to post

    Leave a comment:


  • selectcommand is a built-in method in the .net framework.

    Alternatively, what you can do is the following:

    Code:
    Public Sub updateUsers()
            Dim updateQuery As String = ("UPDATE Users SET UserName = "  _
                        + (txtUserName.Text.Trim + " WHERE UserID = 1"))
            Dim adapter As System.Data.OleDb.OleDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...