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.
After upgrading from 13.2 to 15.2 my code was failing to return a control inside a template column in a web data grid:
chkCtl = DirectCast(selectedRow.Items(0).FindControl("chkSelect"), CheckBox)
chkCtl was always NOTHING.
Adding the following to the Page_Load event:
If IsPostBack Then WebDataGrid1.EnsureTemplates() End If
Now the control is being returned.
Hi,
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?
Hi ,
I tried placing at page load that also not solved problem.Still the same behaviour all the images in template column..goes
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?
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