Hi,
I am using igGrid control in an Asp.net MVC3 project, I know that in igGridUpdating there is an method called deleteRow, this method will add a cross line on the "deleted row", not really remove the row.
$('#grid1'). igGridUpdating('deleteRow', "AFG");
'#grid1'
'deleteRow'
"AFG"
I want to know is there a way to remove rows from igGrid,
also I don't want to user to see the updating styles like the delete button pops up when mouse on it.
Hi Borislav & Petar,
The problem is I set autoCommit to false, when I click the delete icon or delete row in code, the deleted row will display a cross line.
If I set autoCommit to true, when I click the delete icon or delete row in code, the selected row is still there without line.
What I wanted is when I delete a row, the selected row should disappear.
I am using this control in MVC3, here is my code:
@(Html.Infragistics().Grid<MessageEntity>(Model.Object.Messages.Where(m => m.MessageBox == MessageBoxKind.Inbox))
.ID("igGridInboxList").PrimaryKey("MessageId")
.AutoGenerateColumns(false)
.LocalSchemaTransform(false)
.AutoCommit(true)
.Columns(column =>
{
...
})
.Features(features =>
features.Updating().EnableDeleteRow(true);
.Width("100%")
.Height("100%")
.AutoGenerateLayouts(false)
.DataSourceUrl(Model.Object.UrlToGetPagingInboxData).DataBind()
.Render()
)
Yes, Petar is absolutely correct - I switched the meanings of autoCommit's TRUE and FALSE values (again).There's also a solid point of reference about such things in the igGrid Updating feature's official documentation at https://www.igniteui.com/help/iggrid-updating Quote:If autoCommit is enabled, the edit row actions trigger updates in the data source. If autoCommit is not enabled, the data source needs to be updated upon operations that rebind the grid such as paging, sorting or filtering.
Hi Jason,
I believe Borislav meant that setting autoCommit to True would commit the grid changes (thus deletion would be instant), and leaving it False (default) means that Batch Updating is enabled.
Please let me know if this helps.
Hi Jason,What exactly do you mean by "nothing happenS" ?I've set autoCommit to TRUE in the HTML samples I attached to my previous reply and adding a new row and deleting an existing one (for example) work fine.What is your scenario (if you can provide me with the configuration of the igGrid you're using, that'd be awesome) and what is the outcome that you expect?Looking forward to your reply.Cheers,Borislav
Hi Borislav,
Thank you Borislav for your quickly response, if I set autoCommit to false, it will display cross line, if set it to true, nothing happen, why?
Best regards
Jason