blah blah blah is here! blah blah » Close

1
votes
1 answers

Counting rows

Guys, I want to count the rows on my datagrid but counting -1. for example if i had 1 row in my datagrid i want label1 to display 0 I'm using the code below, it counts correct but i cant adapt it to count -1? am I missing something si ...

0
votes
2 answers

Handle null value

I'm carrying a value from one form to another, it nearly works but i'm getting the following error: System.NullReferenceException was unhandled The line of code throwing the error is: [code]NewApp.textBox1.Text = ap.ResourceIndex.ToSt ...

1
votes
1 answers

Count double values in Datagridview rows

Guys, on form load i count my datagridview rows that only contain the status "UPREPD USED" and display the total on a label, it works fine. My problem is i now want to count the rows that contain the status "UPREPD USED&qu ...

1
votes
1 answers

Custom timer event

Guys, not sure if this can be done but this is my situation: I'am using a timer event to refresh entries from a database on a local server to populate my application, now the fefresh is every 10 mins. If the server or connection should b ...

0
votes
3 answers

Parse DateTime Exact

How can i parse the below datetime as exact? [code]DateTime dt = DateTime.Parse(row.Cells[2].Value.ToString());[/code] when the above code is executed i get error: 'String was not recognized as a valid DateTime.' the format of the ...

1
votes
3 answers

Count datagrid rows that contain a value

Guys this may be a simple answer, but i can't get it to work how i want. Example: the following code counts the rows in my datagrid and it counts them fine: [code]label6.Text = (usedDataGridView.Rows.Count - 1).ToString();[/code] Now ...

1
votes
2 answers

Change backcolor on datagridview

I have a datagridview with a column called "status" that loads a value from a database, i'm trying to change the back color of the row to yellow if there's the value of "cleaned" in the 'status' column. I'll put the f ...

1
votes
1 answers

Datagridview cell content click

Guys, I'm trying to add an event to a datagridview cell content click for when a user clicks a cell row it changes a value on that row. Example my datagridview on colunm [2] has the word "start" i want the user to click the cel ...

2
votes
1 answers

Count Rows in Datagridview

I'm trying to count the rows on my datagridview and display the number of rows on "label1" what's the best way to do this? i was going to drop the code in the form load event. Also i only want to count rows with text in, as dat ...

1
votes
2 answers

Check for existing entries and throw a message

I'm trying to compile some code that will check if a date from a datetimepicker and text from a textbox match exisisting entries in a datagridview if so throw a message window. Example: on my form i have dateTimePicker1 and resIndexTe ...

0
votes
2 answers

Fire event from button click

Guys, is it possible to fire an event on the form from a button click, i want to call the below event if possible? [code]private void comboCalendar_AppointmentChanged(object sender, ComponentGo.Calendars.AppointmentEventArgs args) ...

1
votes
2 answers

Report viewer printing

Guys, is there a way to print Microsoft report viewer direct to the default printer without using the print dialog window? my button click contains: [code]//this works but only by manually choosing printer reportViewer1.PrintDialog();[ ...

1
votes
1 answers

search datagridview

Is it possible to search a datagridview column to match entries against another gridview? Example i have 2 datagridviews, in the first gridview column [1] i have an ID number on the second datagrid column [1] there's also an ID number in ...

0
votes
1 answers

Insert text if fields null on datagrid load

how could i check through my datagrid and insert "-" automaticlly if the field is null?

0
votes
1 answers

Error: Concurrency violation: the UpdateCommand affected 0 of the expected 1 records

I'm trying to update certain records in a database after it's been filtered but get the following error: Concurrency violation: the UpdateCommand affected 0 of the expected 1 records. Now the code below is causing the error and there's n ...

Feedback