Hi,I'm having the ultragrid with the following dataid name1 aaa2 bbb3 ccc4 ddd5 eee6 fff . .. . . ... . .. .. .1000(1000 rows are present)
here i want to edit the rowsfor example row with id (5),name(eee) need to edit to id=6 ,name=bla bla i have tried with this this codethis.ultraGrid1.Rows[0].Cells[0].Activation = Activation.Editable,but it didn't work.an deven i tried this:UltraGridColumn column = this.ultraGrid1.DisplayLayout.Bands[0].Columns["CustomerID"];column.CellActivation = Activation.ActivateOnly;
and one more thing is that ,i want to add a new row to the ultragrid on buttonclick event,so i wrote this code private void ultraButton2_Click(object sender, EventArgs e) { this.ultraGrid1.DisplayLayout.Bands[0].AddNew(); } this code works fine on adding a new row but problem here is ,on click of buttonclick event, unable to add data in to the row,(as the new rows created are in readonly mode)so please help me how to add data into the new row and to edit the rows
Thanks in advance
Hi,
I am just checking about the progress of this issue. Let me know if you need my further assistance on this issue.
Thank you for using Infragistics Components.
Thank you for posting in our forums.
The WinGrid allows you to edit cells by default. So you could be setting something that prevents the editing. This would typically be either AllowUpdate or one of the activation properties on the column or row. Note that the Activation property should be set to AllowEdit. Another option would be if you set the CellClickAction to a value that doesn’t allow editing like RowSelect or CellSelect. The default value is EditAndSelectText, which allows editing. Please make sure that you don’t set these properties to a value that would disable editing. If you aren't please isolate your issue in a small sample and I will be glad to research this further for you.
If you want to add data to a newly created row you could use the following code inside the button click event:
var row = this.ultraGrid1.DisplayLayout.Bands[0].AddNew();
row.Cells[“id”].Value =1001;
row.Cells[“name”] = “something”;
Please let me know if you have any additional questions.