Hello everyone,
I have searched for this and I'm sure the answer is out there but I haven't been able to find it. I want to be able to edit the first cell in every column within a band.
I tried a few things like cell activation and also setting the datacolumn to ReadOnly = false;
Neither of these things work. Any help is much appreciated. Thank you!
All cells in the grid are editable by default. So if you are unable to edit any cell, it's either because you have disabled editing in the grid, or because your data source does not allow editing.
Here's a link to a KB article that describes how to disable things in the grid. That should point you in the right direction in terms of what to look for in your code.
HOWTO:How can I make a grid or a column, row, or cell in the UltraWinGrid disabled or read-only?
Hi Mike,
Thank you for your response. I thought for sure this example code was going to fix my problem. I did not create the grid through the designer and Im finding out now that Im running into a few places where the normal defaults are not being set. I did add this code below in the designer.cs file but it still didnt allow the cell in column 1 of band one to edit the text.
Im not sure if there is another property that is preventing this that didnt get set because I hand coded the whole thing? Any help is much appreciated.
//Code added to the grid (didnt enable the editing of the cell text)
this.ultraGrid1.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True; this.ultraGrid1.DisplayLayout.Bands[0].Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True;
Again thanks for all your help. I dont know why setting these to allowEdit/true...ect wouldnt work. Im at a real loss as to why this isnt working. : / Listed below are all the methods I have tried congruently. You mentioned that possibly the datasource might not allow editing. Is there any code for this you might be able to direct me to? Thank you so much for your time!
this.ultraGrid1.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True; this.ultraGrid1.DisplayLayout.Bands[0].Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True; this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ultraGridColumn1.CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit; ultraDataColumn1.ReadOnly = Infragistics.Win.DefaultableBoolean.False; ultraDataBand1.ReadOnly = Infragistics.Win.DefaultableBoolean.False;
ultraGridBand1.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText;
RichSee said:this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
Didn't you say it was column 1 that wasn't allowing you to edit?You are specifying Column 0 here, so you might have the wrong index. I recommend using the column's Key rather than the index to avoid any possible confusion.
Is it only the one column having a problem? Can you edit other columns?
Have you tried reading out the property settings you have set here to make sure they are all still set to what you set them to at run-time? Put a button on the form and Debug.Writeline all of these property values to make sure they are not getting overwritten.
What kind of data source are you binding to? It looks like it's probably an UltraDataSource, so that should be all right.
Try putting a new grid control on the form and bind it to the same DataSource you are using for the real grid and see if the new grid allows editing.
If you want to post a small sample project demonstrating the issue, I would be happy to take a look at it and tell you exactly why you cannot edit the column.
Thank you for your response. Thanks for the suggestion of the column keys. I was in fact trying to edit the first column not column one so the code suggested "should" of worked. I literally hand stitched all this code so there could be some other properties that could be affecting this.
I will try your suggestion and see if I can get that to work. I will send over some of the code and that would be spectacular if you could take a look at it. Thank you so much!
What is the best way to send you a code snippet or file? I tired to upload a .cs file and it wouldnt allow. Let me know what works best for you, or for anyone that is willing to help. Thank you!
Hi Rich,
If you want to upload a sample, I strongly recommend a small sample project. That is - a complete solution which demonstrates the problem that I can run and debug.
A single cs file is generally pretty useless because it will not include the controls, the assmbly version information, or any dependencies.
To attach a whole solution,you will need to zip it up into a single file and attach it under the options tab.
There's a similar question answered here:
Activation property for rows, columns and cells - NetAdvantage for Windows Forms - WinGrid
I am unable to edit a cell after locking the row.
this is to lock entire row
Me.ultraGrid1.Rows(10).Activation = Activation.NoEdit
and i need to unlock only one cell
Me.ultraGrid1. Rows(10).Cells("Select”).Activation = Activation.NoEdit
but unable to edit the select column which style is check box.
please help to lock entrie row but allow check box column to edit.
Hello Rich,
RichSee said:I guess my last question is about alternative help. Is there any kind of video tutorials or one on one sessions that can help me work with the grid designer?
I create a case for you with reference number CAS-75907-ZWZYD7. I`ll send you through the case video file which showing how to use the UltraGird`s designer. Meanwhile I include in this forum thread few links from our online documentation about the designer.
- http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/html/WinGrid_Using_the_WinGrid_Designer.html
- http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/html/WinGrid_Defining_Layouts.html
- http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/html/WinGrid_Using_the_Row_Layouts_Designer.html
- http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/html/WinGrid_Advanced_Row_Layouts_Part_1_of_2.html
- http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/html/WinGrid_Advanced_Row_Layouts_Part_2_of_2.html
- http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/html/WinGrid_Work_with_Row_Layouts.html
- http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/html/WinGrid_Grouping_Columns_in_Row_Layout_Mode_using_the_Designer.html
Please if you have any questions, do not hesitate to write me here or through the case.
Regards
RichSee said:My second thought was that Im using the Creation Filter. Do you think this could possibly be any kind of a problem by it not allowing me to edit a cell. As far as I know this code cycles through all the elements in the grid and does things as you need them to. I compared lines in the designer code with my hand code and I couldnt see anything different that we didnt try to enable the cell editing.
It depends on what your CreationFilter is doing. If you are preventing the cell from creating it's editor UIElements (perhaps because you replacing those elements with your own elements) then that could stop the cell from entering edit mode. But this is very simple to test. Comments out the CreationFilter and see if the problem still occurs.
I'm not aware of any, but I will forward this over to Infragistics Developer Support and see if they can help you there.
So I was able to come back to this code today and try out some things. I ended up making a whole new UltraGrid in the designer. When I had just the minimal things in the grid I was able to go and edit the cells. I proceeded to copy over as much code as possible and when I ran im still getting a run time error about the band not having all the columns I thought I added to it through the designer. These were the kind of problems I had at first that made me end up hand coding the whole grid.
My second thought was that Im using the Creation Filter. Do you think this could possibly be any kind of a problem by it not allowing me to edit a cell. As far as I know this code cycles through all the elements in the grid and does things as you need them to. I compared lines in the designer code with my hand code and I couldnt see anything different that we didnt try to enable the cell editing.
I guess my last question is about alternative help. Is there any kind of video tutorials or one on one sessions that can help me work with the grid designer?