Hi,
I am trying to get my webdatgagrid to use Batch Updating. In the past, I allowed it use postbacks to commit the rows to the server. I have been playing around with the webdata grid. One feature I currently have is a delete button in one of the columns.
I saw this example:
http://es.infragistics.com/products/aspnet/sample/data-grid/row-deleting-button
I really liked it. But I notice once I turned on Batch Editing, I no longer have the delete button appearing. Can I get this feature when using BatchUpdating? If not how can I show a delete button for a row that has not been commited back to the server? I am able to press the delete key on my keyboard and the undo button does appear. But the common user will never get that. So i need to be able to display something obvious.
Any Suggestion?
Hello Abby,
I looked further into this matter and I was able to reproduce the behavior that you are describing. I am currently discussing this with our development staff. I will keep you posted on my progress and I will get back to you as soon as I have any new information regarding this matter.
Please feel free to continue sending updates at any time.
Thank you for your patience and cooperation on this matter.
When my grid first loads there are no rows. I bind it to an empty list. I use the editing to add a new row. That returns me to my grid. I noticed when I do a post back. That I can get the client events DeleteButtonHidden, DeleteButtonDisplaying, and DeleteButtonDisplayed are called. Through a mouseover event. When I first add a new row, these never get called. Do I have to set something to allow mouseover?
I am also facing same issue with webdatagrid, i want to add new row with delete button on client side, below is the code used to add record on client side
var grid = $find($("*[id$='FGrid']")[0].id); var randomNumber = Math.floor(Math.random() * 900000000) + 100000000; var row = new Array(randomNumber, "0"); grid.get_rows().add(row);
below code used in webdatagrid
<ig:TemplateDataField Key="Delete" Width="55"> <ItemTemplate> <button onclick="return F_DeleteRow();" class="wfPrimaryButton"> Delete</button> </ItemTemplate> </ig:TemplateDataField>
======
<Behaviors> <ig:EditingCore BatchUpdating="true" AutoCRUD="true"> <Behaviors> <ig:CellEditing> <ColumnSettings> <ig:EditingColumnSetting ColumnKey="FID" EditorID="TypesDDL" /> </ColumnSettings> <EditModeActions MouseClick="Single" /> </ig:CellEditing> <ig:RowAdding Enabled="false" Alignment="Bottom"> <EditModeActions EnableOnActive="True" MouseClick="Single" /> <ColumnSettings> <ig:RowAddingColumnSetting ColumnKey="FID" EditorID="TypesDDL" /> </ColumnSettings> </ig:RowAdding> <ig:RowDeleting /> </Behaviors> </ig:EditingCore> <ig:Activation> </ig:Activation> <ig:Selection CellClickAction="Row" RowSelectType="Single"> </ig:Selection> </Behaviors> </ig:WebDataGrid> <div id="AddButtonDiv" class="AddButtonDiv" runat="server"> <button id="AddButton" onclick="r_AddRow();return false;" class="wfPrimaryButton"> Add </button> </div>
Using above logic,on Add button click it add new row but button get visible after postback,please suggest soln on above issue.
thanks.
Thank you for posting in our community.
In order to investigate this matter further I will need an isolated, working sample of your application where the issue is reproducible. This will help me to look deeper into this issue and find the root cause for this behavior.
This is going to be highly appreciated.
Thank you in advance.
I did some more testing. When I first load the datagrid. 99% of the time its going to load empty. I use a row edit template to add a row. (W/ Batch Updating). The row is added to grid but not commtted. At this point, I do not get the delete button.
I do a post back and return to the grid. I then get the delete button. I can add a new non committed row and the delete button is there.
It appears that the problem is when I first add rows without a post back.
To add the new row I run this line in javascript..
grid.get_behaviors().get_editingCore().get_behaviors().get_rowAdding()._commitRow();
Does anyone know what I am missing?