datagridview

  1. T

    Resolved Changing the FontSize of the DataGridView ErrorText

    Is there a way to change the FontSize of the ErrorText displayed in DataGridView or a way to override the default behavior and draw it yourself? I assume that it is using the FontSize of the Row or Cell?
  2. T

    Question transfer content from Form2's TextBox to Form1's DataGridView

    Hello guys, here I am again asking for support. I have a Form1 that contains a DataGrid and a 'Call' Button that calls Form2, on Form2 I have 2 TextBox and an 'OK' Button I need to transfer the contents of the TextBox from Form2 to the Grid of Form1 when clicking the OK Button, I did a lot of...
  3. A

    Question Duplicate control in data from excel? Datagridview

    Hello; I pull the data from Excel and save it to the database with the record button. But if the data from excel is in the residential database, I want it to give a warning. I was able to do it on the form, but when it came to pulling from excel, I couldn't. Can you help me please. No matter...
  4. S

    Resolved Buttons for single row datagridview

    Hello everybody, 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 Example: If the event has associated a...
  5. Omer Butt

    Resolved How to Change the row color of DataGridView based on SQL Query?

    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 private void...
  6. dv2020

    Slow Formatting of Cells DataGridView

    Hi All, 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 =...
  7. Cragstor

    Resolved DataTable global variable changing when DataGridView.DataSource is changed

    Hello, 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...
  8. C

    Question Errors when sending SMTP attachments from a DataGridView

    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) { try { MailMessage message =...
  9. Milliez

    CSV Files

    How do I load a csv file into a datagrid, using n-tier architecture.
  10. dv2020

    Question GetDirectories Sort by Filename

    Hi All 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...
  11. S

    Printing options for DataGridView

    Hi All, 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...
  12. P

    Question Problem sorting DataGridView

    Hello All, 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...
  13. R

    How to filter datagridview using multiple combo boxes?

    Hi all! 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...
  14. C

    Error loading datagridview...

    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...
  15. I

    Question dataGridView1_CellPainting causes flickinger view and effects other control

    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...
  16. A

    DatagridView Multi Header Columns & Rows

    Good evening; I'm looking for a source code to make a datagridView with Multi Header Columns and Multi Cell Header As shown in the image below All that is in gray is the head that I am trying to code.
  17. A

    Question DataGrid Collapsible

    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
  18. U

    Question Datagridview Not populating

    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...
  19. B

    Tip Merge Datagridview columns headers

    This tutorial explains how to merge Datagridview columns headers: Merge Datagriview columns headers - FreeLearningDz Columns headers will be like:
  20. A

    Question Display datagridview datas to richtextbox using a button

    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...
Back
Top Bottom