Hi Saif,
|
Query: I want the last row
number as asterisk *. |
The last row of a gridcontrol can be made with the asterix
value or any other value by using the PasswordChar property. |
Please refer to the following code.
|
Code snippet:
public Form1() {
//code.. for
(int row = gridControl1.RowCount-1; row <
gridControl1.RowCount; row++) { for
(int col = 1; col < 10; col++) { this.gridControl1[row,
col].CellType = GridCellTypeName.TextBox; this.gridControl1[row,
col].PasswordChar = char.Parse("*"); } } //code.. |
Arun.
Hi Saif,
Thanks for your update.
|
Query AddNew option in
GridControl |
Now in our GridControl there is no direct property for add
new record. But you could easily have this functionality by overriding the
grid's OnCurrentCellKeyPress. Please
use the below codes in OnCurrentCellKeyPress. Code: if(CurrentCell.RowIndex == RowCount) { if(CurrentCell.Renderer.ControlText
== "") { RowCount++; this.Refresh(); } }
For * symbol in header you can use this in query cell info.
Please refer the attached sample file also It will helps to you. |
Please let me know if you have further concerns.
Vinish.
Hi Saif,
Thanks for the update.
|
Query: In the case e.ColIndex
==0 then the asterisk is not displaying, but in the case e.ColIndex==1 it
appears in the 1st column of my grid. |
I have updated solution for what I had understood. In both
the condition the asterix had been displayed. Note: The last row can be used for AddNewRecord without obstructing
the binded datatable value by using the following strategy. Code: //In form load… { this.populatethegrid(); //Code.. this.gridControl1.RowCount=this.gridControl1.RowCount+1; } |
Please refer to the attached modified sample file and screen
shoot.
Regards,
Arun.