I am looking at this example:
http://ko.infragistics.com/products/aspnet/sample/data-grid/row-deleting-button
I have this set in the grid.
<ig:RowDeleting Enabled="true" ShowDeleteButton="true"/>
And there is no sign of a delete button? How do I get it to show?
Hello Abby Palcer,
This is a new feature in the 14.1 version.
I tried this out by creating a new web application and enabling the RowDeleting behavior in the designer. I got a message saying that it was dependent upon the Selection behavior. I allowed that to be enabled too.
When I first ran the application, no delete row button appeared. But once I set the code from the sample (Enabled="true" ShowDeleteButton="true") it worked.
Here is the Behaviors .aspx code that was generated.
<Behaviors> <ig:EditingCore> <Behaviors> <ig:RowDeleting Enabled="true" ShowDeleteButton="true" /> </Behaviors> </ig:EditingCore> <ig:Selection CellClickAction="Row" RowSelectType="Single"> </ig:Selection> <ig:RowSelectors> </ig:RowSelectors> </Behaviors>
I have attached a screenshot of the result. When you hover over a row, the "x" button should appear.
If you're looking for something that is always displayed, you might want to check out the Delete Rows - Basic Features sample.
Could you please try to enable the other behaviors and then hover over the row?
Elizabeth AlbertLocalization Engineer
Hello,
I have attached a sample project for this. Please take a look at it and let me know of the results.
I just updated my controls to 14.1. This is so odd. I am not getting the mouse over effect.
Here is what I currently have as my webdatagrid setup. I have trimmed out the row edit template all of my columns. Can anyone see why I can not get this feature to work?
<ig:WebDataGrid ID="grdExpense" StyleSetName="ElectricBlue" runat="server" AutoGenerateColumns="False" Width="100%" Height="400px"
EnableDataViewState="True" EnableAjax="false" OnRowAdding="ExpenseGrid_RowInserting" OnRowUpdating="ExpenseGrid_RowUpdating"
OnRowsDeleting="ExpenseGrid_RowDeleting" OnDataBound="ExpenseGrid_OnDataBound">
<Columns/>
<ClientEvents Initialize="Grid_DataBound"/>
<Behaviors>
<ig:Filtering Enabled="true"/>
<ig:Sorting Enabled="true"/>
<ig:EditingCore AutoCRUD="False" BatchUpdating="true">
<ig:RowEditingTemplate CancelButton="cancelButton" OKButton="saveButton" >
<ClientBindings>
</ClientBindings>
<RowEditingClientEvents TemplateClosed="templateClosed" TemplateClosing="templateEditorClosing" TemplateOpening="templateOpening" TemplateOpened="templateOpened"/>
<EditModeActions MouseClick="Double" EnableF2="false"/>
</ig:RowEditingTemplate>
<ig:RowAdding Alignment="Top" >
<AddNewRowClientEvents EnteringEditMode="AddRow"/>
<ColumnSettings/>
<EditModeActions MouseClick="Single" EnableF2="False" />
</ig:RowAdding>
<ig:RowDeleting Enabled="true" ShowDeleteButton="true" />
<ig:CellEditing>
<EditModeActions MouseClick="None" EnableOnActive="false" EnableOnKeyPress="false" />
</ig:CellEditing>
</Behaviors>
</ig:EditingCore>
<ig:Selection CellClickAction="Row" RowSelectType="Single"/>
</ig:WebDataGrid>
Hi Abby,
I tried your mark-up and it still works fine for me, please take a look at the attached archive. What results are you getting, can you post screenshots of what you are seeing in my sample and in yours?
Is there a way for you to share a web-site or project that reproduces the issue so we can take a look at it? I am not sure if you are not missing either a png file or a style.
I will be waiting for your feedback.
Ok. I am kinda there. I was missing the updated css files.
I am able to see the delete button. (Not all of the time.) When I load the grid, I data bind it to an empty list. I use a row edit template to add new rows to the grid. When I use BatchUpdating = true, the delete button only shows up after I do my first postback. Until then, I don't see the delete button.
To commit a row to the grid prior to postback, I use this javascript.
grid.get_behaviors().get_editingCore().get_behaviors().get_rowAdding()._commitRow();
Once I postback everything runs fine. But I need to be able to delet rows prior to that.
Thoughts?
Let me know if I may be of further assistance.