ChrisHunter 152 Posting Whiz in Training Featured Poster

Yeah I want an event to fire if a cell, within a particular column, or any given row is clicked.

I havent run the code above yet but I assume it runs if any cell on the DGV is clicked by isolating the row and column clicked. It will work and be less labour intensive as the other options I've tried so far, but i think it will still be too much.

Having looked at your suggestion though it has given me an idea. Like your checking for a dirty cell and isolating of the row first. i was going to ask if using the ColumnDisplayIndexChanged and then getting the row would be any quicker but it doesnt seem as though any of them will.

All the event methods are too generic for what i'm looking for so I'm just going to create a form which pops up when the user wants to add new records and refresh the DGV on the first form when the user clicks add. I know it will be more work but it will make it more usable and intuitive for the users.

I'll no doubt use your solutions in the future or if the users decide they dont like the idea of the pop-up form.

Thanks again for your time James.

ChrisHunter 152 Posting Whiz in Training Featured Poster

Yes I need to get the value of the ComboBox cell when the event occurs so it can be passed to a stored proc (all that is working);

Does the CellContentClicked event only fire if the content is click (i know it sound obvious) or when content is selected (when content or display value is changed as a result of an auto populate method)?

The main problem I'm having with cell level events is if there is 8 columns and 8 rows, which means the event will fire for every cell (64 times) even if isnt in column specified in the if statement (column 2 in the above example) which is the problem.

Does the ColumnDisplayIndexChanged() meth fire if display index of ComoBoxCell under the specified column is changed ?
If it does it could be the better option becauce it means it would only fire once if per click wouldn't it.

Thanks for the reply too...

ChrisHunter 152 Posting Whiz in Training Featured Poster

Yeah Stuugie i agree i quite often get stuck on rock and have to load the last save.

My character is a Wood Elf but I haddn't played the Oblivion seires before and didnt focus on one ability so although he's a bit of a beast with fire, archery, one-handed and two-handed, he's not as good as he could be with some abilities.

Think i will focus on two handed from now on though... When i get back into it that is.

ChrisHunter 152 Posting Whiz in Training Featured Poster

Now then,

It's not often I start a thread but I'm struggling to find the answer after a lot of tries on Google.

The issue is that I have a "Profession" comboBoxCell as well as a "Discipline" comboBoxCell which is populated/ repopulated with a short list of disciplines dependent on the value selected in the "Profession comboBoxCell.

This would mean I'd need a selectedValue Changed action event at cell (just the "Profession" comboBoxCell) level rather than the entire DGV or that counts for all cells like below:

dataGridView1_CellValueChanged()

If anyone could suggest anything other than point me in the right direction I would really appreciate it.

ChrisHunter 152 Posting Whiz in Training Featured Poster

Don't get me wrong i love skyrim and have spent an outrageous amount of hours on it but you need just that to make it worth playsing, purely because of the amount of story lines, quests and paths you can take.

... I still haven't finished it, I spend too much time just wandering around picking fights with bandits.

ChrisHunter 152 Posting Whiz in Training Featured Poster

I only realised DaniWeb had an IRC channel from this thread and in all honesty i would just to chat with other DaniWeb users in real time (i don't know how IRC's work so forgive me if it isnt realtime) if nothing else.

plus it would mean you could get a reply and reply yourself, without waiting for hours between posts.

ChrisHunter 152 Posting Whiz in Training Featured Poster

Zick asked which GAME you think is best for ANY console, not which CONSOLE is best.

The thread will get out of hand it we get into the debate of consoles.

  • BattleField 3 for the MP
ChrisHunter 152 Posting Whiz in Training Featured Poster

It's taken me 5 hours longer than yourself and I only noticed it because of this thread or i would have been non the wiser.

ChrisHunter 152 Posting Whiz in Training Featured Poster

Thats a good point, the reason threads (5 years+ old) aren't deleted is to serve as archives to help others with similar problems.

Also if someone pops into a chat session, contributes and leaves before the proposer can ask s follow-up question, it might lead to a lot of partially answered questions.

ChrisHunter 152 Posting Whiz in Training Featured Poster

How did you manage to get on a software engineering Masters course if you can't/ aren't really willing to engineer software?

You could do some research on mobile technology in hospitals. what research has already been done, what mobile technology is currently use and reasearch into the future of mobile technology in hospitals/ health care systems.

You could also look into other subjects such as complete cross-platform cloud based computing (things like being able run/ create/ edit the same application/ files on different platform (tables/ smart-phones/ desk-tops).

There will already be a lot of material on both subject so you should be able to find articles and white papers no problem.

ChrisHunter 152 Posting Whiz in Training Featured Poster

I'm not sure this can be done but it's worth a try.

You can loop through the returned records and use the DateTime.Compare() method in the C# end to sequentially compare two dates and if the result is 2 years or more then for each year missing add a new record by adding 1 to the year property of the first date (the earliest date).

An alternative to using the datetime.Compare() method would be to get the year value of the sequential dates and check how big the gab is between them and then add that many records.

Hope this helps point you in the right direction...

ChrisHunter 152 Posting Whiz in Training Featured Poster

@deceptikon I reckon you're spot on.

You wouldn't walk into a school, punch a 7 year old in the face and say "Everybody come and see how good I look". Wanting to rep yourself and not others shows arrogance and ungratefulness towards others that have taken the time to try and help you.

ChrisHunter 152 Posting Whiz in Training Featured Poster

Int can't store anything but numeric values. If your string is made of ONLY numeric values you can convert it like so:

int MyInt = Convert.ToInt32("1234");

But you CAN NOT do:

int MyInt = Convert.ToInt32("Chris 1234");

Have a look at this link, it will explain the different data types and how they work

ChrisHunter 152 Posting Whiz in Training Featured Poster

I'm assuming that you're hard coding it without adding a datasource so take a look at this MSDN like. It shows how you can retreive data from your database and bind it to your DataGridView (DGV) manually.

To delete a record you could just delete it from the DGV and then reverse what you did to bind the data to the DGV (but insert or update instead of select).

There is a a way of binging the DGV using the data binding wizard but you need to have a data source linked in your project linked to your database.

Let me know how you get on.

ChrisHunter 152 Posting Whiz in Training Featured Poster

It just marks anyone who has posted in the thread as having contributed to solving the thread.

People hardly mark threads solved as it is so getting people to mark posters as having been the one that solved the problem would probably happen even less, especially if more than one person helped.

Plus someones input may be helpful but may not have been taken into consideration. by this I mean post "like take a look at this like", which don't give you the answer (which the rules state posters shoulden't do) but point you in the right direction.

ChrisHunter 152 Posting Whiz in Training Featured Poster

I think I didn't understand you correctly yesterday.

  • When you select a room from the database will you be entering the roomID OR roomNo
  • Do you want to show the roomID and the roomTypeID in your datagrid view?
ChrisHunter 152 Posting Whiz in Training Featured Poster

So do you want to show both the roomTypeID AND roomType?

You can display everything returned by the SQL statement or just what you need.

ChrisHunter 152 Posting Whiz in Training Featured Poster

Yes you can use the SQL if you like just try and understand it first. If you want to show the roomTypeID too just selected from your Room table during the select part of the statement.

ChrisHunter 152 Posting Whiz in Training Featured Poster

I take it you want the user to select the word "double" or "Single from a combo box but the value 1 or 2 to be shown in the room table when the selection is saved, depending on which room type was chosen ?

If that is the case you need to:

  • Make 'roomtypeid' in the room table a foreign key that references the primary key of the roomtype table
  • Create a stored procedure with a select statement like below to select the descriptive field of a room type dependent on the roomtype of the room selected (return "double" instead of 1. @roomID is a parameters which will be the roomID for the room requested.

    CREATE PROCEDURE RoomSelect
    @roomID int
    AS
    SELECT room.RoomID, room.RoomNumber, roomtype.RoomType
    FROM room Left Join roomtype on room.RoomTypeID = roomtype.RoomTypeID
    WHERE room.RoomID = @roomID;

Try not to post ALL of your code, summerise your problem instead other wise you will put people off wanting to help because theres too much to bother reading.

ChrisHunter 152 Posting Whiz in Training Featured Poster

I've been following this app for a long time and looking forward to it's release but stupidly havent got the compatible iOS to get it. I think the SmartGlass works with SkyRim, showing you where you are on the map and what you have in your inventory.

At the moment I've got the MyXboxLive app which is a seriously watered down version of SmartGlass which only lets you see who's online, what your recent games, compair achevements and allows you to naviget the dashboard menus but it can't be used as a companion in the way SmartGlass.

I think it's time to update the iOS on my phone and get my hands on SmartGlass. I spend too much time on my Xbox to not invest!

ChrisHunter 152 Posting Whiz in Training Featured Poster

Music isn't allowed in my new office (which is a small scrafice for job satisfaction), but I used to listen to music in my old job too. Usually something repetitive and melodic, like trance, electro or dance.

As muck as I love indie and other genres there's too many word which considering I have the concentration span of a Nat, isn't good for productivity.

ChrisHunter 152 Posting Whiz in Training Featured Poster

I'm a fairly new developer and think windows is easy to use but I've grown up with windows machines. That might be the case had I always used mac os though.

BigPaw there is a Win8 camp in Manchester this Sunday (25th) and two in London on 30th and 1st. Even though I'm quite inexperienced, if I didnt already have plans I would have gone to the one London on 1st Dec (even).

ChrisHunter 152 Posting Whiz in Training Featured Poster

The Samsung Galaxy punched Apple's mum in the face but the refriferator didn't...

Why do sad ??

ChrisHunter 152 Posting Whiz in Training Featured Poster

In my pocket!

Do you want it back ?

ChrisHunter 152 Posting Whiz in Training Featured Poster

I think the lesson to be learned here is instead of ranting about something, calm the arrogance and simply state the issue you're faced with, if it is a pre-existing issue and ask for a possible solution (whether it be a DaniWeb issue or browser issue).

Also if all websites were the same as all other website of the same type (i.e. ecommerce, forums, video streaming), the web would be a boring place, as would the world if we all dressed the same...

On the subject of blame @riahc3 this whole article(also know as a thread) is based around you blaming DaniWeb developers for issues that only you face... you know what they say about users right ?

ChrisHunter 152 Posting Whiz in Training Featured Poster

Are they smoother at all ? make it as high res as possible.

You could try editing it yourself in Adobe or and an application like that to ensure its precise.

ChrisHunter 152 Posting Whiz in Training Featured Poster

True I musnt have paid attention to the code when I replied, my apologies.

ChrisHunter 152 Posting Whiz in Training Featured Poster

The best thing to do is to use a comboBox with predefined values which you can set and the user will choose from. This limits the amount user input and reduces the chance of human error.

You should use the predefined method called 'SelectedIndexChanged' (this comes built-in to the object so you just need to select it) when the user selects the type of wood they want. In this method do some if statement to check the wood the user has selected and if the condition is true, store the price of the select in a decimal or double variable like below:

Decimal woodPrice = 0.0;

myComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
    string woodType = myComboBox.SelectedIndex.ToString();
    if (woodType == "Oak")
    {
        woodPrice = 100.00;
    }
    Else if (woodType == "Pine")
    {
        woodPrice = 150.00;
    }
}

As for your second issue it's a case of working the formular out as though you were doing it on a calculator (i.e. to work out 9% of the total price you do ((Total/100)*9)).

ChrisHunter 152 Posting Whiz in Training Featured Poster

As Momerath said, use a higher resolution image, the reason the image isn't smooth is because there aren't enough pixels per-inch. After all a dish is only as good as its ingredients...

ChrisHunter 152 Posting Whiz in Training Featured Poster

That does't make much sence, you want to simulate a click on form3 (so click on form3) but you want the click to be registered on form1 first, followed by form 2 and finnally something happends on form3 ?

I've been trying to play with the focus properties of forms but i'm at a loss at the moment. could you clear up the above please ?

ChrisHunter 152 Posting Whiz in Training Featured Poster

Went to see the new Bond: Skyfall on Sunday and thought it was amazing! I wasn't a fan of the older Bond films because they were too light and toung and cheek (which they are supposed to be), but the Daniel Craig ones are darker, gritty and not about ridiculous gadgets.

ChrisHunter 152 Posting Whiz in Training Featured Poster

Hi Kaharas, sorry it's taken me so long for something that is pretty simple but I honestly didn't know how to do this myself, I guess we really do learn something new everyday.

In the initilizer method for your main form use:

this.TopMost = true;

This will set your main form to always be on top of all other forms. However other forms will appear behind this form so you may need to either move the main form after opening a child form, or set the position for the form to open.

ChrisHunter 152 Posting Whiz in Training Featured Poster

Hi Howard, I'm not sure what you're asking for.

  • Have you created a windows form using code?
  • Do you want to create this textbox before the appliction is run?
ChrisHunter 152 Posting Whiz in Training Featured Poster

Take a look at this, it may be exactly what you need

ChrisHunter 152 Posting Whiz in Training Featured Poster

I'm guessing you're asking for the pseudocode and not just writing a random statement ?

Have you got any evidance that you have attempted it yourself yet?

Do you want guidence in how its done?

ChrisHunter 152 Posting Whiz in Training Featured Poster

Your question isn't very clear.

  • Do you want to be able to controle all the sub forms from the main form?
  • Do you want to be able to open more than one sub form at a time?

Do you have any more code than above to show us more of what you have done so far?

ChrisHunter 152 Posting Whiz in Training Featured Poster

Have a look at This its the MSDN website with examples of how the different types are used.

ChrisHunter 152 Posting Whiz in Training Featured Poster

My comment or eradication was one of jest apologies if it offended anyone. It wouldn't be my solution and nor do i have a solution to such a complext and volatile situation

ChrisHunter 152 Posting Whiz in Training Featured Poster

whats to say there isn't a 1 word answer ? if someone else thinks there isn't that just means that is their opinion.

In reality nothing is fact, everything began as someone's opinion which just became the majority opinion and known as fact.

ChrisHunter 152 Posting Whiz in Training Featured Poster

Sorry to do this...

Sweet child of mine - Guns and roses

ChrisHunter 152 Posting Whiz in Training Featured Poster

eradication - and by this I mean eradication of everything.

There'll be no one or nothing to fight with or over.

ROMIEO-DONE !

Ezzaral commented: That's what came to my mind as well :) +0
ChrisHunter 152 Posting Whiz in Training Featured Poster

Munching on tea ? you must have a lot of sugar in it..

ChrisHunter 152 Posting Whiz in Training Featured Poster

Coffee, water and what ever I made for tea the night before. I'd like to say beer but they're a bit fussy about you drinking in the office...

ChrisHunter 152 Posting Whiz in Training Featured Poster

Have a look at the links below they may be of use:

http://www.homeandlearn.co.uk/net/vbnet.html

http://howtostartprogramming.com/vb-net/

Have fun and good luck.

AndreRet commented: Thanx for being good and helpfull. :) +12
ChrisHunter 152 Posting Whiz in Training Featured Poster

Always wanted one and got vouchers to get one but bricked it because I couldn't think what to get done so I gave them away.

Theres a show called London ink too.

HappyGeek whats the meaning of the 1,4,7 on your middle finger or am I being naive

ChrisHunter 152 Posting Whiz in Training Featured Poster

iPhone 5 is more sturdy and has a bigger following. Galaxy is too big, too flimsy, doesn't have as much hype surrounding it, doesn't bring anything new to the table really and as HappyGeek said, people have already invested too much money in apple merchandise to switch.

Sneeky advertisement though (not really)

ChrisHunter 152 Posting Whiz in Training Featured Poster

Start simple with a cumputerised address book or something similar and work up to a library system and the likes.

There is a book called 'Head First C#' that is a more hands on book which has you developing application that grow in complexity as you read on.

ChrisHunter 152 Posting Whiz in Training Featured Poster

Post in the Java forum and show your attempt at the problem first

Click here for the Java forum

ChrisHunter 152 Posting Whiz in Training Featured Poster

Thats one of the reasons I moved to BattleField I couldn't take it anymore!

I play a lot of Skyrim too but it's going to be all about Halo 4 soon !

ChrisHunter 152 Posting Whiz in Training Featured Poster

Battle Field 3 on the Xbox.

Happy Geek please say it's just for the Zombies ??