AD
Administrator
Syncfusion Team
August 19, 2005 11:13 AM UTC
You set GridBoundColumn.StyleInfo..WrapText = false; for the columns where you do not want to see the text wrap.
AS
Anna Srinivasan
August 22, 2005 05:04 AM UTC
Hi,
In GDB control ,I dont want to increse the row height.
Scenario:
1) Click the grid cell.
2) Perform enter key operation.
Result : Row height Incresed.
I have set the following property also but still i am getting the same problem.
this.sgbDetailedHistory.GridBoundColumns[1].StyleInfo.WrapText = false;
Thanks, Anna
AD
Administrator
Syncfusion Team
August 22, 2005 09:56 AM UTC
This is not the default behavior as you can see in this sample that just has a gridDataBoundGrid dropped on a form with its DataSource set with everything else set to teh defaults.
http://www.syncfusion.com/Support/user/uploads/GDBG_3d798238.zip
So, there is a property setting/event that is causing the behavior you are seeing.
You can check for setting like grid.WantEnterKey and grid.Model.Options.EnterKeyBehavior to see if one of these propertues is causing this behavior.
AS
Anna Srinivasan
August 22, 2005 10:49 AM UTC
Hi,
I am using following event to capture the enter key.
private void sgbDetailedHistory_CurrentCellKeyDown(object sender, System.Windows.Forms.KeyEventArgs e) {
if(e.KeyCode == Keys.Enter) {
e.Handled = true;
}
I have solved the enter key problem.
I have one more problem like, In my grid i am using combobox.
Normally if cell type is textbox and y r entering some values and press esc key, the values will go off.
In case of combobox , if you click the combo
you will get the set combo value before selecting value from the drop down press esc key
all values which u are entered for corresponding row will go off.
But i want only that cell value will go off.
How do i do that.
Thanks, Anna
AD
Administrator
Syncfusion Team
August 22, 2005 11:14 AM UTC
I do not see this behavior in this sample, \Essential Studio\3.3.0.0\Windows\Grid.Windows\Samples\DataBound\GDBGcombos, do you?
Are you handling an event like CurrentcellCloseDropdown and calling grid.CurrentCell.Endedit there? Id so, this is causing the behvaior you are seeing.
AS
Anna Srinivasan
August 23, 2005 03:22 AM UTC
Hi,
Dont do this operation in existing record(row).
Go to last row and try to insert one more new row.
You will get that problem.
(As per the sample (next order ID: 11078)
Thanks, Anna
AD
Administrator
Syncfusion Team
August 23, 2005 07:26 AM UTC
In that sample,
1) I select a value in Customer in the new row
2) I select a value in EmployeeID in the new row
3) I press Esc.
In this case the entire row does not clear as I have made 2 changes (one to Customer and one to EmployeeID). Only the last change is undone when the Esc is pressed.
But if I only make one change, say to Customer, and then press Esc, the whole row does clear because I cancelled all the changes I made to the row. (The auto generated primary key is not counted as a user change as the user has no control over it.)
This behavior is by design. Are you seeing the row clear is some other case?
AS
Anna Srinivasan
August 23, 2005 09:10 AM UTC
Hi,
What i am saying is.
In that sample,
1) please, select a value in Customer in the new row
2) click empid column (now you will get drop down) dont select any value from drop down.
3) then, press Esc.
You will get my problem.
Thanks. Anna
AD
Administrator
Syncfusion Team
August 23, 2005 09:37 AM UTC
What I am saying it that this is by design.
If your user makes a single change on the addnew row and presses escape, the addnew row goes away.
If your user makes changes to TWO cells in the AddNew row, and then presses escape while he is still on the second changed cell, the AddNew row does not go away.
This is how the grid is designed to work on teh AddNew row.
If you do not want this behavior, then you will have to catch the Esc key in some key event and implement the behavior that you want implemented at that point, avoiding the default beahvior.
AS
Anna Srinivasan
August 23, 2005 10:05 AM UTC
Hi,
I am using keydown event to capture the key. But it is not working.
if(e.KeyCode == Keys.Escape) {
e.Handled = true;
}
Thanks, Anna
AD
Administrator
Syncfusion Team
August 23, 2005 10:25 AM UTC
Use CurrentCellControlKeyMessage and set e.handler = true when teh key is an esc. You can use this code ot get the keycode.
Keys keyCode = (Keys) ((int)e.Msg.WParam) & Keys.KeyCode;