HI,
Iam trying to get value's out of a datagridview.
this datagridview is on form one.
and where i want the value's is on form two;
but i dont want to do this :
[code]form1 frm = new from1();[/code]
because that form1 already exists so i dont want to create it again
can anytone plz help me get a solution for this
thank you very muc...
Hi
I have 3 questions:
wheter I am doing my task in a good way
why when I scroll dataGridView, painted rectangles dissapear..
why painting is so slow...
Here is the code in which I want to draw a colorful rectangle with text on groups of cells in each column, that have the same values, empty values shouldn't have rectangles
void Da...
I am trying to implement row moving in a DataGridView. I want to be able to select multiple rows and click on any of the selected row's cells to begin the drag operation. The problem is that the rows become deselected when I hold the mouse down on a cell. How can I prevent this from happening?
...
I have a DataGridView with a column of text box cells that need to have watermark text. I also have a static class that uses DLLImport to add a watermark to a TextBox using SendMessage with a IntPtr hWnd as one of parameters, like this:
public static void SetWatermark(TextBox textBox, string watermarkText)
{
SendMessage(text...
I have a datagridview on a windows form. It has clolumn [EmployeeNumber, EmployeeName and EmployeeDepartment].
I want to be able to edit values directly in the grid but i want EmployeeDepartment to be a combobox column, such that on cell edit, a combobox shows up with available options for the employee department. Has any one been able...
I would like to be able to set the CharacterCasing of a specified column to uppercase.
I can't find a solution anywhere that will convert characters to uppercase as they are typed.
Many thanks for any help
...
How do I change the datagridview selected row background color in C# windows applications?
...
I am trying to decrease the height of DataGridView rows to allow showing as much of theme. But all my best effort produces the following result:
These are the settings used for the RowHeaderDefaultCellStyle:
aGrid.RowHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
aGrid.RowHeadersDefaultCellStyle.BackColo...
i like to split/merge the datagridview in c# windows form application .is it possible in c#.
...
i have datagridviewer in c#() and i try that change cell beckground, this cell Should be for example 5(integer!) if in my datagridwiewer Will be 5(whatwhich should be take in my base_database_) its back color will be for example blue.. please help me.
___change the backcolor of individual cells.
Sorry for My English.(I am a little).
...
I have return cellvaluechanged event for my column1 which contains the category combo box.if i select the category i need to display the selectedvalue to column 4 .how can i do that?..
...
I have a project where I want to:
1) grab data from a sql server database,
2) pull the data into a c# program,
3) keep the data persistent - (store in a dictionary?)
4)view the data using a datagridview,
5) update the data, which would update the datagridview, the dictionary, and the database
What would be the most efficient wa...
I have a WIndows Forms Application. I needed a DataGridView so i added one. I asume that the user adds some rows and press a save button.
At this moment i want to save all rows in the grid. I iterate trough all rows like that
foreach (DataGridViewRow item in dataGridView.Rows)
{
}
Now the problem. I have test...
I have data source and table that I can bind to my controls and datagridview. I can add records to data table and i can view on datagridview but I can't update and Delete records using datagrid. I have following code. If someone can help me i will be really appreciated.
Private Sub add_and_update()
Dim con As VistaDBConnection
...
I'm trying to loop through my foreach loops and spit out output to my datagridview.
The datagridview has 3 defined columns: Path, Old File Name, New File Name
However, I keep hitting errors.
First, here is the code:
public partial class SanitizeFileNames : Form
{
public SanitizeFileNames()
{
InitializeComponent();...
What is a graceful/proper way to retrieve the Linq entity behind the selected row of a DataGridView?
I am populating my DataGridView like this in the form Load event:
this.Database = new MyAppDataContext();
var userList = from c in this.Database.Users
orderby c.LastName
select c;
thi...
I am trying to archive a datagrid into a datatable so I can find it in the table by the archive date. I am using an INSERT SQL statement as follows:
INSERT INTO [VendorArchive] ([Booth], [Deposit], [Rent], [Electric], [Security],
[AmountPaid], [DatePaid], [PeriodPaid], [TotalDue], [Notes], [ArchiveDate],
[BalanceDue], GETDATE());
SEL...
I have a DataGridView CalendarColumn. By default, if the column its bound to in the database table is NULL, its shows the current, but i have a requirements to make it just NULL as well.
For example if the data for that particular date column, i want a user to be able to just make the Date Cell empty(NULL) but i cant find a property to...
Hi,
I am sutck on this for a few days now but i cant get it right....
So Please help me!
this is what i have right now:
My datagridView Is bound to a database
can anyone please help me?
DateTime FactuurDatum = Convert.ToDateTime(row.Cells[2].Value.ToString());
int termijn = Convert.ToInt32(row.Cells[7].Value.ToS...
I Have a Datagridview bound to a datatable wich hold data from a database
I made a function that checked if a date is within a correct time range
if its correct nothing happens.
else it has to change the color of the row/cell to red
I tried a lot of things but nothing works
Here is the method i created:
private void Check...