DataGridViewRow CreateCells

0
0

Hello!
I have a question for you.

My code as follow:

DataGridViewRow dr = new DataGridViewRow();
dr.CreateCells(dgViewSum);
dr.Cells[0].Value = “SUM:”;
dgViewSum.Rows.Insert(0, dr);

Second column: dr.CreateCells(dgViewSum); error.

‘DataGridViewRow’ does not contain a definition for ‘CreateCells’.

Please how can I fix this error,
Make it do what I want?

Thank you so much!

  • You must to post comments
0
0

Hi Justice,

You can achieve your goal by using the DataGridView SummaryRows, it’s a neat feature in Wisej!

There’s a sample that can guide you, you can find it here: wisej-examples/DataGridViewSummaryRows at 2.5 · iceteagroup/wisej-examples (github.com)

Also, please checkout the documentation here: wisej-examples/DataGridViewSummaryRows at 2.5 · iceteagroup/wisej-examples (github.com)

Please let us know if it works for you!

Best,
Alaa

  • You must to post comments
0
0

Like the attached picture.

 

Regards

Attachment
  • You must to post comments
0
0

Hi

I want to insert a total column below the last data in the detail column of DataGridView.

Later, I tried to make the following modifications:

DataGridViewRow dr = new DataGridViewRow();
//dr.CreateCells(dgViewSum);
// ◇◆ DataGridViewRow 已經不包含 CreateCells 這個 Method 了,改用 Cells.Add(DataGridViewCell)– Modified by Justice Lin 2022/02/10
DataGridViewCell dc = new DataGridViewCell();
dr.Cells.Add(dc);

dr.Cells[0].Value = “合計:”;
dgViewSum.Rows.Insert(0, dr);
However, it has not been tested yet.

Thank you!

  • You must to post comments
0
0

Hi

In Wisej DataGridRow don’t have CreateCells method

If you  could explain us what is your goal, we could help you in a better way

Regards

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.