Janus Grid .NET C# Make cell edit by user - c#

I have a problem with Janus Grid. I am trying to make cell of the one column to be edit so user can change value in particular cell.
I try:
this.myJanusGrid.RootTable.Columns[0].EditType = Janus.Windows.GridEX.EditType.TextBox
and
this.myJanusGrid.RootTable.Columns[0].Selectable=true
None of these two attempt were successful.
Thank's in advance for any help and suggestion!

Use this:
this.myJanusGrid.RootTable.AllowEdit = Janus.Web.GridEX.InheritableBoolean.True;

If you have more columns that you don´t want them to be editable, in adittion you should do a column bucle and mark each column you don´t want to be editable this way (VB):
For Each column As GridEXColumn In myJanusGrid.RootTable.Columns
If column.Key.ToUpper() <> "EDITABLE_COLUMN_NAME" Then
column.SelectableCells = SelectableCells.None
End If
Next

Related

Auto insert of new row doesn't show for datagridviewbutton column

I have a question and can't seem to find the solution. I have datagridview columns with multiple types:
Textbox
Checkbox
Button
I used dgv1.AllowUserToAddRows = true;. And the problem is new row doesn't show when the button column is clicked. For textbox and checkbox columns, it is working.
Please help me on this.
Thanks.
Just found an alternative solution. Instead of Edit Row by having dgv1.AllowUserToAddRows = true, i have inlcuded another button for dgv1.rows.add(). This could already work. Thank you.
Here is the link:Rows cannot be programmatically added to the datagridview's row collection when the control is data-bound

How to limit column reorder to a few columns?

In my WPF application, I am using a DataGrid control. I allow the user to reorder columns. However, I have to ensure that the first two columns and the last column cannot be reordered.
All the columns are generated programmatically using new DataGridTextColumn().
I am wondering if someone can guide me on what I need to do to accomplish this? Thank you in advance for your help.
You can use the DataGrid.FrozenColumnCount Property to not allow the users to move columns.
However, if you look at the documentation, you will see that you can only do this for the first x columns from the left side of the DataGrid. For example, if you set the FrozenColumnCount to 2, the two left columns in the display are frozen.
Use DataGridColumn.CanUserReorder property (set tis property to false for columns, which can't be reordered).

Insert new row in gridview by specific value

I'm using Devexpress tool anyone please help me?
I'm using Devexpress tool to develop my website. But i have some problems so i hope anyone could help me. I really need it in my project. Please see here:
http://www.fiditour.com/dattourtructuyen.aspx?id=731
look section above capcha. I have 2 questions:
- How they can add textbox in gridview?
- How they can add new row by value in textbox?
Thank for reading!
That is not textboxes in the grid. They are editable cells.
You can access the values entered by using the handler of the first row, then like #Давид Дача Милинкови mentionned, you add the specified row.
So as to have a textbox inside the column you must insert a GridViewDataTextColumn not just a GridViewDataColumn.
In the CellEditorInitialize event of the Grid you can pass the Default Value to e.Editor.

How to make a Janus GridEx column readonly?

I'm working on a windows forms app and there is a Janus GridEx component with 3 columns. I don't want users to change the values in the first two columns but I can't find the way to make readonly or allowedit false for the first two columns and third column editable.
I've tried changing the editmode but no luck either... anyone out there knows how?
Have you tried:
column.EditType = Janus.Windows.GridEX.EditType.NoEdit;
?
If you change the column's Selectable property to false, the user will not be able to edit it. You can set this property in the designer or in code. Here is an example which locks down the id column:
GridEXColumn idColumn = gridEX1.RootTable.Columns["id"];
idColumn.Selectable = false;

Programmatically setting the record pointer in a C# DataGridView

How do I programmatically set the record pointer in a C# DataGridView?
I've tried "DataGridView.Rows[DesiredRowIndex].Selected=true;", and that does not work. All it does is highlight that row within the grid; it doesn not move the record pointer to that row.
To change the active row for the datagrid you need to set the current cell property of the datagrid to a non-hidden non-disabled, non-header cell on the row that you have selected. You'd do this like:
dataGridView1.CurrentCell = this.dataGridView1[YourColumn,YourRow];
Making sure that the cell matches the above criteria. Further information can be found at:
http://msdn.microsoft.com/en-us/library/yc4fsbf5.aspx
Try setting the focus of the DataGrid first . Some thing like this
dataGridView1.Focus();
dataGridView1.CurrentCell = this.dataGridView1[YourColumn,YourRow];
This worked in my case, hope it helps you as well

Categories

Resources