Hi Team,
I have a problem with WGD ,if we update a refreshed grid with less number of records than earlier loaded one clears all the styles and icons displayed in the grid..
I have WDG control in a page,whose cells are allowed to edit but AUTOCRUD is disabled and i will be invoking the change event through javascript
function uwgTransfers_CellEditing_ExitedEditMode(gridName, eventargs)
{
gridName.get_behaviors().get_editingCore().commit();
}
and update will be saved in the server side event
Protected Sub uwgTransfers_RowUpdating(ByVal sender As Object, ByVal e As Infragistics.Web.UI.GridControls.RowUpdatingEventArgs) Handles uwgTransfers.RowUpdating
//Database calls to update is here.
End Sub.
Grid definition and images are attached.
Hi,
Thank you for using our forum.
When you are assigning a new data source you need to call ClearDataSource() and also when you have template field it is better to call EnsureTemplates when page is postback.
If this does not help can you please send a small sample demonstrating the issue to can investigate it in more details?
Please let me know if I can provide any further assistance.
Thank you for reply..
I already using ClearDataSource before each refresh and now i tried with EnsureTemplates but no luck..still same issue.
Its only happening if reload grid with less number of rows than the earlier loaded one.If we refresh with higher number of rows then i am not getting this problem..
Here is the Refresh grid method i am using its called each time a new date is picked.
Private Function RefreshGrid(Optional ByVal isFilledFromSession As Boolean = False) As Boolean Dim gridRefreshed As Boolean = False Dim transferDt As DateTime = Nothing Dim lineupList As LineUpCollection bsLineupController = New PumpCardLineUpController() transferDt = DateTime.Parse(CType(Me.txtTransferDate.Value, String)) If (Not isFilledFromSession Or (isFilledFromSession AndAlso Session("GridData") Is Nothing)) Then lineupList = bsLineupController.GetStockLineUpByDate(transferDt, crudeFilterValue) lineupList = MakeuLinepBasedOnFileteringCriteria(lineupList) Session("GridData") = lineupList If Not isFilledFromSession Then uwgTransfers.Behaviors.Sorting.SortedColumns.Clear() End If uwgTransfers.ClearDataSource() Else lineupList = CType(Session("GridData"), LineUpCollection) End If If lineupList IsNot Nothing AndAlso lineupList.Count > 0 Then uwgTransfers.DataSource = lineupList uwgTransfers.EnsureTemplates() uwgTransfers.DataBind() litTransferCount.Text = "(#" & uwgTransfers.Rows.Count & ")" gridRefreshed = True End If Session("DeletedAdjustmentRows") = Nothing Return gridRefreshed End Function
The EnsureTemplates is better to be called in page load an only if the page is postback.
Can you try this and see if it can resolve the issue?
Hi ,
I tried placing at page load that also not solved problem.Still the same behaviour all the images in template column..goes
Can you send a small sample project of your own if you have one in order to reproduce the issue?
What version of our product are you using?