Mike Askew 131 Veteran Poster Featured Poster

Ah yeap your correct, didnt even notice I changed the zoom amount >.<

Mike Askew 131 Veteran Poster Featured Poster

Untitled91 Just wondering, is the attached an intentional visual display or a glitch? Reloading the window does not reset the bar to its normal position.

Edit: This is still occuring while the web browser is maximised also.
Edit2: Also the alignment to the last reply to topic is off.

Mike Askew 131 Veteran Poster Featured Poster

If you still do not understand the voting system then I fear we will have to break out the picture book version of the explanation :)

Gimme gimme gimme.

Mike Askew 131 Veteran Poster Featured Poster

Yeap I've seen that link also, it is pretty complex. Hence why I didnt look that much into it :)

Mike Askew 131 Veteran Poster Featured Poster

Ummm.. It would look odd yes.

I dont know of a way to specifically add a header entry.

Mike Askew 131 Veteran Poster Featured Poster

Haha its been a long time lets say that!

Yeah I've seen a couple of the bouldering walls, never used to have the strength to do them properly but thats before I started training. We have liquid grip chalk stuff for gym so could just use that I suppose :)

Mike Askew 131 Veteran Poster Featured Poster

I used to just go as a junior with my dad, suppose I dont count as a junior anymore so would probably need to requalify to climb alone

Mike Askew 131 Veteran Poster Featured Poster

Most windows PC's ship with some version of the framework pre-installed as it is so common. So I would generally put up with the five minutes it takes to download a re-dist of the latest framework.

The only way to do it without as Momerath said is third party software (who sell their licenses at $1995 each) and/or using unsafe code.

Mike Askew 131 Veteran Poster Featured Poster

Hmmm I never normally see the issue @Ancient Dragon so the network is generally alright, being a work one it probably does have its moments so you could be right.

@np complete it's a matter of opinion whats faster. I believe Chrome is the quickest browser around at present, though its highly debatable nowadays

Mike Askew 131 Veteran Poster Featured Poster

@Chris, I used to do indoor climbing myself, need to get back into it, not that I remember how to do any of the knots now xD

Mike Askew 131 Veteran Poster Featured Poster

Yeap can do it exactly that way. Adaption to my code above would appear as the following:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;

namespace DaniWebWinForm
{
    public partial class Form1 : Form
    {
        DataSet DS = new DataSet();
        bool FormLoading = false;

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            FormLoading = true;
            DS.Tables.Add("NameTable"); //Setup table holding names

            DS.Tables["NameTable"].Columns.Add("NameID"); // Primary key
            DS.Tables["NameTable"].Columns.Add("Name");
            DS.Tables["NameTable"].Columns.Add("Age");

            DS.Tables["NameTable"].Rows.Add(1, "Mike Jobs", "23");
            DS.Tables["NameTable"].Rows.Add(2, "Jack Starling", "24");
            DS.Tables["NameTable"].Rows.Add(3, "Sam Eker", "16");
            DS.Tables["NameTable"].Rows.Add(4, "Dani West", "20");
            DS.Tables["NameTable"].Rows.Add(5, "Steve Marvin", "31");

            // Adding the new column and programatically assigning the value
            DS.Tables["NameTable"].Columns.Add("ConCatInfo", typeof(string), "Name + ' | ' + Age");

            comboBox1.DataSource = DS.Tables["NameTable"];
            comboBox1.DisplayMember = "ConCatInfo";
            comboBox1.ValueMember = "NameID";
            FormLoading = false;
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (!FormLoading)
                MessageBox.Show(comboBox1.SelectedValue.ToString());
        }


    }
}

With regards to displaying the column headers above, you can just use a label and space out the entries :)

Mike Askew 131 Veteran Poster Featured Poster

I've noticed on two seperate occasions today that viewing my own profile page has seemingly crashed my Chrome browser.

I'm running at under 25% of my hardware capabilities so its not that. Wondered if anything was done in the background that could be causing this?

Chrome Version 22.0.1229.79 m
Running through a proxy server
I am also running the addon Adblock Plus

Mike Askew 131 Veteran Poster Featured Poster

Hmm it all depends on whether or not your able to edit the DataTables as to how you approach this.

Its either add a new column to the datatable which contains a concatenation of the data you wish to display or write a custom class that overrides the combobox. Which I know there is code for on google because I've just looked at it :)

Mike Askew 131 Veteran Poster Featured Poster

Yeap I've tried that too! :p

Mike Askew 131 Veteran Poster Featured Poster

Nope the combo box was set to display the name only using the line: comboBox1.DisplayMember = "Name";, I added the Age field simply so I didnt just make two columns and assign each to a property.

Give me a couple of mins to have a play and I'll see :)

Mike Askew 131 Veteran Poster Featured Poster
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;

namespace DaniWebWinForm
{
    public partial class Form1 : Form
    {
        DataSet DS = new DataSet();
        bool FormLoading = false;

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            FormLoading = true;
            DS.Tables.Add("NameTable"); //Setup table holding names

            DS.Tables["NameTable"].Columns.Add("NameID"); // Primary key
            DS.Tables["NameTable"].Columns.Add("Name");
            DS.Tables["NameTable"].Columns.Add("Age");

            DS.Tables["NameTable"].Rows.Add(1, "Mike Jobs", "23");
            DS.Tables["NameTable"].Rows.Add(2, "Jack Starling", "24");
            DS.Tables["NameTable"].Rows.Add(3, "Sam Eker", "16");
            DS.Tables["NameTable"].Rows.Add(4, "Dani West", "20");
            DS.Tables["NameTable"].Rows.Add(5, "Steve Marvin", "31");

            comboBox1.DataSource = DS.Tables["NameTable"];
            comboBox1.DisplayMember = "Name";
            comboBox1.ValueMember = "NameID";
            FormLoading = false;
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (!FormLoading)
                MessageBox.Show(comboBox1.SelectedValue.ToString());
        }


    }
}

Simple WinForms App using one combo box.

Everytime you select a name from the combo box it will display the NameID field value related to that name. Hope that helps you understand :)

Mike Askew 131 Veteran Poster Featured Poster

Let me see if I can find some old code I've written..

Mike Askew 131 Veteran Poster Featured Poster

In my experience with listboxes (they use the same fields)

You bind the datatable as the datasource of the combobox, then give the column names for the displaymember and valuemember as required.

Mike Askew 131 Veteran Poster Featured Poster

The DisplayMember and ValueMember settings of the combo-box allow you to make the display value different to the selected one.

Mike Askew 131 Veteran Poster Featured Poster

Heh, I'd happily not eat out and be able to eat properly for training however a hotel room is pretty limiting for cooking and so restaurants seem the only option.

Am quite looking forward to hopefully being based closer to home come January so I can sort my diet out then and lose the effect working away from home has on you.

Mike Askew 131 Veteran Poster Featured Poster

Diet is the one thing I do have going for me, being a Vegan and avoiding high fat food groups for good measure.

Aye I'm currently working away from home at my companies expense so I get money a night to spend on food, and we are surrounded by nice restaurants. So eating healthily rarely happens, the healthiest meal I can get up here is a Nandos...

Mike Askew 131 Veteran Poster Featured Poster

The exception is thrown because the field IDplayer is a primary key field which is unique. You are trying to add the value '2' to a field withing that column and it already exists. Therefore the exception is thrown.

As to why it is thrown on that line, I can't say without understanding further.

Mike Askew 131 Veteran Poster Featured Poster

Varies for me as I work away from home and don't venture into hotel gyms to often but generally involves three different sessions across 3-4 days depending on how long im home for.

Push: (chest, shoulders, triceps)
- 5 min warmup on treadmill
- Press-ups: 10-9-8-7-6-5-4-3-2-1, couple of seconds rest between each
- Dumbell press: 8-4-8 format x 3 sets
- Incline bench press: 15 reps x 3 sets
- Shoulder push: press 12 reps x 3 sets
- Arnold press: 12 reps x 3 sets
- Close grip bench press (triceps): 12 reps x 3 sets
- Unassisted dips to fail into 5 reverse technique dips x 3 sets
- 5 mins cooldown on treadmill

Pull: (back, shoulders, biceps)
- 5 min warmup on treadmill
- superset: widegrip unassisted pullups to failure into lat pulldown 10 reps , 3 sets
- superset: deadlifts 15 reps into bent-over-row 10 reps x 3 sets
- upright row: 12 reps x 3 sets
- underarm plate raise: 12 reps x 3 sets
- bicep curl: 70 reps in as few sets as possible, can be done multiple times with gradually lighter weights

Legs: (legs, funnily enough)
- 5 min warmup on treadmill
- superset: 20 squats into 8 lunges into 20 dumbell squats x 3 sets
- calf raises: 10 fast 10 slow x 5 sets
- leg extension machine: 12 reps x …

Mike Askew 131 Veteran Poster Featured Poster

Im confused at what the issue is, as were the people on StackOverflow when you asked them the identical question.

Please clarify.

Mike Askew 131 Veteran Poster Featured Poster

How is position determined? A variable passed to the XSLT? The position within the loop in XSLT? Etc?

Mike Askew 131 Veteran Poster Featured Poster

Morning,

Sorry had the week off work so wasnt really watching the forum as much, nor did I have access to an IDE.

I believe your correct with the new SQL statement though, you would need to update that table alone and not any others.

Mike Askew 131 Veteran Poster Featured Poster

Good to hear :) Namespaces cause havok so much!

Mike Askew 131 Veteran Poster Featured Poster

@Jim, sorry on the delayed reply completely missed anything being aimed at me lol.

When given the words used by the OP that would be how I would choose to describe addiction, however, I do agree with the majority of the thread that there are better ways to describe it also.

Mike Askew 131 Veteran Poster Featured Poster

Can we see said XML file and higlight what causes the issues?

Mike Askew 131 Veteran Poster Featured Poster

Ok we shall, sorry for the delay came into work and was in a meeting within 15 mins that I wasnt expecting to be in!

Hmm there is column in the database called cashQTY which does not exist in the dataset table (stating the obvious).

Maybe it is trying to map the wrong table in database?

Mike Askew 131 Veteran Poster Featured Poster

Hmm there are definately pros to starting again in the fact it will remove all the coding niggles ive corrected if they were missed, ie a stray table or something.

and I dont mind helping with new issues.

Cons I suppose would just be the time invested and how long it would take to re-write.

The reason is most likely a simple one but they are always absolute f##kers to track down, I've spent a good half a day tracking down an error before which was caused by a comma in the wrong place -.-'

Mike Askew 131 Veteran Poster Featured Poster

Hummm I'm stumped.

Mike Askew 131 Veteran Poster Featured Poster

Have you tried cashOrdersDS.Tables["cashOrders"]? (think you have but i misunderstood the above post)

Mike Askew 131 Veteran Poster Featured Poster

Ooooooh, what a scary guy you are. You really like to wallow in your own stupidity and ignorance. You must think you're hid real good behind this so called wall of anonymity, you're not. Finding your stupid butt is what I do as a hobby & you're not really worth the effort.

Going all defensive makes suspicion of your guilt increase further.

Why turn offensive to the members of this forum, especially mods of all people. Peter is in the right to post as he did and from your original post we could make out no different as to what your intentions were.

Your post is just a clipboard dump of some text and we interpretted it as we did. Some explanation or clarity as to your problem would avoid situations like this. Therefore in my opinion you have absolutely no grounds to start having a go at others.

happygeek commented: well said +0
Mike Askew 131 Veteran Poster Featured Poster

Wooo!

So now we know it is something between going to the database from the dataset, that is the issue.

What if we change cashDA.Update(cashOrdersDS, "cashOrders"); to cashDA.Update(cashOrdersDS);

Mike Askew 131 Veteran Poster Featured Poster

xD

Duck!...
Where?!...
-crack-

Mike Askew 131 Veteran Poster Featured Poster

In the "Non-Public Members" section of the Rows bit you were in you can access the actual row data.

Have a deeper dig and see what you find.

Mike Askew 131 Veteran Poster Featured Poster

Hows about this: Click

You did ask for a LMGTFY link with this question...

Though the login screen may occupy the entire screen, nothing is wrong with a box in the centre and a shaded colouring on the rest of the screen, it is a common approach.

Mike Askew 131 Veteran Poster Featured Poster

I would say its both.

The chemical addiction caused in the body I would say is more like a disease.

But the lack of will power to pull the individual off the drug is more the character of the individual.

My view anyhow.

Mike Askew 131 Veteran Poster Featured Poster

Could you not base the progress bar off how many files have been copied?

Max value = total file number
progress value = amount copied?

Mike Askew 131 Veteran Poster Featured Poster

No worries,

Ah the joy of external companies.

Hmm if you add a debug point to line 22, and then look at cashOrdersDS.Tables["cashOrders"].Rows in watch and navigate to the data in list form (takes a bit of exploring, generally found in non public members, see if the changes make it into the dataset.

Mike Askew 131 Veteran Poster Featured Poster

Thats an interesting saying you have there peter.

Mike Askew 131 Veteran Poster Featured Poster

Yeah I suspected that would be the case.

Try the following with the same test:

private void btnOrderEdit_Click(object sender, EventArgs e)
        {
            int i, j;
            i = dataGridView2.CurrentCell.RowIndex;
            j = dataGridView2.CurrentRow.Index;
            System.Data.OleDb.OleDbCommandBuilder cb;
            cb = new System.Data.OleDb.OleDbCommandBuilder(cashDA);
            /// ###########################################################
            /// Changed so it edits directly into the DGV which in turn should edit the dataset behind it, change #13
            /// ###########################################################
            dataGridView2.SelectedRows[0].Cells["cashQTY"].Value = Int64.Parse(txtOrderQTY.Text);
            dataGridView2.SelectedRows[0].Cells["cashDescription"].Value = txtBoxDescrip.Text.ToString();
            dataGridView2.SelectedRows[0].Cells["cashSupplier"].Value = txtBoxSupplier.Text.ToString();
            dataGridView2.SelectedRows[0].Cells["cashDate"].Value = dateTimePicker1.Value.ToString();
            dataGridView2.SelectedRows[0].Cells["cashCost"].Value = Convert.ToDouble(txtBoxCost.Text);
            dataGridView2.SelectedRows[0].Cells["cashSell"].Value = Convert.ToDouble(txtBoxSell.Text);
            dataGridView2.SelectedRows[0].Cells["cashAccountRef_FKID"].Value = Int64.Parse(textBox1.Text);
            dataGridView2.EndEdit();
            /// ###########################################################
            /// Added connection open and close around the update call, change #9
            /// ###########################################################
            cashCustom.Open();
            cashDA.Update(cashOrdersDS, "cashOrders");
            cashCustom.Close();
            MessageBox.Show("Data Updated");
        }
Mike Askew 131 Veteran Poster Featured Poster

Oh Oh Oh OH.

I think it is not submitting the changes to the database. When you switch account selection you re-run all the SQL queries for population and so therefore the dataset would revert to its old data if the database was not updated.

Can you update a row and then check in the database whether it changes before you move off the row. See if what I expect it to be is right.

Mike Askew 131 Veteran Poster Featured Poster

G'dammit, back to playing in visual studio till something works :D

Mike Askew 131 Veteran Poster Featured Poster

Hmmm does this fix the edit issue?

private void btnOrderEdit_Click(object sender, EventArgs e)
        {
            int i, j;
            i = dataGridView2.CurrentCell.RowIndex;
            j = dataGridView2.CurrentRow.Index;
            System.Data.OleDb.OleDbCommandBuilder cb;
            cb = new System.Data.OleDb.OleDbCommandBuilder(cashDA);

            /// ###########################################################
            /// Changed so it edits directly into the DGV which in turn should edit the dataset behind it, change #13
            /// ###########################################################
            dataGridView2.SelectedRows[0].Cells["cashQTY"].Value = Int64.Parse(txtOrderQTY.Text);
            dataGridView2.SelectedRows[0].Cells["cashDescription"].Value = txtBoxDescrip.Text.ToString();
            dataGridView2.SelectedRows[0].Cells["cashSupplier"].Value = txtBoxSupplier.Text.ToString();
            dataGridView2.SelectedRows[0].Cells["cashDate"].Value = dateTimePicker1.Value.ToString();
            dataGridView2.SelectedRows[0].Cells["cashCost"].Value = Convert.ToDouble(txtBoxCost.Text);
            dataGridView2.SelectedRows[0].Cells["cashSell"].Value = Convert.ToDouble(txtBoxSell.Text);
            dataGridView2.SelectedRows[0].Cells["cashAccountRef_FKID"].Value = Int64.Parse(textBox1.Text);
            /// ###########################################################
            /// Added connection open and close around the update call, change #9
            /// ###########################################################
            cashCustom.Open();
            cashDA.Update(cashOrdersDS, "cashOrders");
            cashCustom.Close();
            MessageBox.Show("Data Updated");
        }
Mike Askew 131 Veteran Poster Featured Poster

Yup exactly like the are you sure buttons, it forces a response.

try googling "custom modal forms c#"

Mike Askew 131 Veteran Poster Featured Poster

It could probably exist but I dont see the logic behind the three buttons as there is no way apart from using a modal popup to force someone to click x or y button before proceeding. Hence the point that the button is modal.

Because with your method they can click the doStuff button without clicking either other one. The doStuff button can then not force the clicking of either of the other buttons, it is still down to the users choice unless you lock them out using a modal form.

Feel free to correct me if im wrong Deceptikon.

Mike Askew 131 Veteran Poster Featured Poster

Ummm which datagrid is it edited off?

Mike Askew 131 Veteran Poster Featured Poster

The adaption to Deceptikon's response here would be to make a custom form that looks like a message box proving two buttons, 1 and 10, and then use .ShowDialog() on the customer form to display it modally, therefore forcing a response to the form before continuing.

You could then assign the form returning a yes reponse to the 1 button and a no to the 10 button creating what you require.