I would need some help, I'm creating a program, and through the datagridview function I get the data from the mysql database, but I need to be able to add buttons (with images) on some lines.
at this moment it adds the button on all lines
If the event has associated a...
What I tried is: (But need to know what to put in if condition and what to put in foreach condition)
ViewMedicine_DataGrid is a name of DataGridView
Pharmacist_Medicine is a name of a Table in Sql Server
E_Date is a column name of Expiry Date
Trying to understand why formatting my datagridview is so slow with the code below.
Is there a more optimize way to perform the below?
var currentFont = datagridProSpeedMap.DefaultCellStyle.Font;
string speedcol = "Speed";
decimal speedavg = 10;
decimal speedmax = 18;
for (int i =...
I'm new to here, so firstly hello everyone.
I have looked through the forums but can't find an answer and I'm struggling to find one online anywhere with how datasources work in this case.
The code below is a snippet of a program I am writing to transfer files. The problem I had is...
I have created an SMTP program that sends messages with optional multiple attachments. The attachments are listed in a DataGridView.
Here is the code below:
private void button1_Click(object sender, EventArgs e)
MailMessage message =...
I'm using Directory.GetFiles to get a list of files, and populate the datagrid. Code is below. Everything is working, but I'm having trouble trying to get Directory.GetFiles to retrieve the list in filename or descending.
How anyone any idea if its possible, and if not via...
Does anyone know any methodology to create direct print-out from datagridview. From googling what i found is that it's quite complex process. Is there any package available to dot the same (i.e. nugget package). I have datagridview populated from database and I want to make PDF print of...
The problem I'm having is when I programmatically sort my DataGridView I get the following exception:
System.InvalidOperationException: DataGridView control must be bound to an IBindingList object to be sorted.
This shouldn't be happening. The data source is a DataView which of...
I am very new to coding and am trying to learn C# through little project. I spent a week or more trying to find solution, but although there is many threads, none of them made sense for me and couldn't get it to work.
I have a form with datagridview and I want to create another 5...
I have seen several postings on this error, but I can't seem to make the answers fit my problem.
Generally, it is a simple dgv load with a simple query. The error I get is:
Error: System.ArgumentOutOfRangeException: Index was out of range. Here is the code:
string sSQL =
"select * from...
I'm using dataGridView1_CellPainting to remove border for merged cells. The view works fine, except for the last line "e.AdvancedBorderStyle.Top = DataGridViewAdvancedCellBorderStyle.Single;" statement, which causes view to flicker and strange behavior to another DateTime picker control in...
My Problem is that my professor wants to combine same name in 1 row and will collapse on click. but I dont have any Idea how to do it can you give me some headstart thanks! more power
this is my current view and my SP
Hello, i have a method private void FillLevyRoll(), i put the method in a button on click event to fill a datagridview dgvLevyRoll my problem is when i run i am not getting an error and the dgv is remaining empty.Im lost confused tried but to no avail.The query works in SQL management studio...
First of all hi to all, I am new to this forum. I am a newbie at c# programming and no other programming experience. Please be kind to me and help me thanks . If you have any reference site that can help me or anything please do . Also english is not my native tongue so no grammar nazi pls and...
What would be the similarities and differences in DataGridview.Update() and Datagridview.Refresh() methods
What are the places to use DataGridview.Update() and Datagridview.Refresh()
I'm little confused
i have created datagridview dynamically with check box column,once i refresh my datagrid its removes all data except checkbox column,below code for adding checkbox column in datagrid
DataGridViewCheckBoxColumn chk = new DataGridViewCheckBoxColumn();
i?m trying to bind a list to a datagridview. i do that:
public void seedatagrid(List<myClass> liste2)
and the datagridview has the data, but it doesn?t show anything.
could you help me?? how can i resolve the problem?? thank you