Excuse me, how to set the background color of the good datagridview saved to the database, and can be read out, and give a datagridview background color assignment?
CodePudding user response:
Save read queries related database operation, save save RGB string value can be directly,
CodePudding user response:
reference 1st floor exception92 response: save read related database query operation, save directly save RGB string value, I am the whole DGV table cell background color is stored, the color of each cell is different, save, and then read the assignment to DGV form cell, Speed is too slow, a DGV form will be more than 3 seconds, is there a way to save and read quickly? CodePudding user response:
Datagridview background color can be stored in XML, as long as open a program, will load the background color, by rows and columns, and color, then the binding datagridview, then change color line directly CodePudding user response:
reference ManBOyyy reply: 3/f datagridview background color can be stored in XML, as long as open a program, will load the background color, by rows and columns, and color, then the binding datagridview, then change color line directly Specific how to operate? Can, for example? Seek with a novice! CodePudding user response:
reference ManBOyyy reply: 3/f datagridview background color can be stored in XML, as long as open a program, will load the background color, by rows and columns, and color, then the binding datagridview, then change color line directly Specific how to operate? Can, for example? Seek with a novice! CodePudding user response:
reference 5 floor weixin_41094726 reply: Quote: refer to the third floor ManBOyyy response: datagridview background color can be stored in XML, as long as open a program, will load the background color, by rows and columns, and color, then the binding datagridview, then change color line directly Specific how to operate? Can, for example? Seek with a novice! Such as saving line is the second line, column is the first column, the color is 255224192 DataGridView1. Rows [1]. The Cells [0]. The style.css. BackColor=System. Drawing, Color, FromArgb (255, 224, 192); CodePudding user response:
refer to 6th floor ManBOyyy response: Quote: refer to the fifth floor weixin_41094726 reply: Quote: refer to the third floor ManBOyyy response: datagridview background color can be stored in XML, as long as open a program, will load the background color, by rows and columns, and color, then the binding datagridview, then change color line directly Specific how to operate? Can, for example? Seek with a novice! Such as saving line is the second line, column is the first column, the color is 255224192 DataGridView1. Rows [1]. The Cells [0]. The style.css. BackColor=System. Drawing, Color, FromArgb (255, 224, 192); This I know, I ask another question, is I to DGV background color, I ordered a subscript header break once, the background color disappears, How to make the background color doesn't disappear, have been CodePudding user response:
refer to 7th floor weixin_41094726 response: Quote: refer to the sixth floor ManBOyyy response: Quote: refer to fifth floor weixin_41094726 response: Quote: refer to the third floor ManBOyyy response: datagridview background color can be stored in XML, as long as open a program, will load the background color, by rows and columns, and color, then the binding datagridview, then change color line directly Specific how to operate? Can, for example? Seek with a novice! Such as saving line is the second line, column is the first column, the color is 255224192 DataGridView1. Rows [1]. The Cells [0]. The style.css. BackColor=System. Drawing, Color, FromArgb (255, 224, 192); This I know, I ask another question, is I to DGV background color, I ordered a subscript header break once, the background color disappears, How to make the background color doesn't disappear, have been As long as you bind data do not refresh will not disappear! DataGridView1. The DataSource=dt; Such as the dataGridView1. The DataSource did not rebound would not be refreshed CodePudding user response:
refer to the eighth floor ManBOyyy response: Quote: refer to 7th floor weixin_41094726 response: Quote: refer to the sixth floor ManBOyyy response: Quote: refer to the fifth floor weixin_41094726 reply: Quote: refer to the third floor ManBOyyy response: datagridview background color can be stored in XML, as long as open a program, will load the background color, by rows and columns, and color, then the binding datagridview, then change color line directly Specific how to operate? Can, for example? Seek with a novice! Such as saving line is the second line, column is the first column, the color is 255224192 DataGridView1. Rows [1]. The Cells [0]. The style.css. BackColor=System. Drawing, Color, FromArgb (255, 224, 192); This I know, I ask another question, is I to DGV background color, I ordered a subscript header break once, the background color disappears, How to make the background color doesn't disappear, have been As long as you bind data do not refresh will not disappear! DataGridView1. The DataSource=dt; Such as the dataGridView1. The DataSource do not rebound will not refresh Or you to write a method, you change this special color, as long as there is rebind of this method is invoked by line CodePudding user response:
CodePudding user response:
The references to the tenth floor ManBOyyy response: Thank you for your answer, don't know how to give to you, hope I can appreciate your guidance, The binding you said I know, I the problem now is that my data is more, the color is more complex, this binding approach speed is slow, is there a better way, bulk binding background color, Is not only the increase speed to get out of the way CodePudding user response:
https://bbs.csdn.net/topics/392721136 Refer to the 14th floor