Hi
My application developed using .net framework 4.0 and NetAdvantage for .NET 2008 Vol. 2 CLR 2.0.Im having a ultrawebgrid.In that Im having one template column which is check box column as below
<Columns><igtbl:TemplatedColumn Width="15%" BaseColumnName="" Key="SelectAll" AllowResize="Fixed" FilterIcon="False" AllowRowFiltering="false" SortIndicator="None" AllowUpdate="No"><HeaderTemplate><div><asp:CheckBox ID="chkItemHeader" Text="Select All" runat="server" onclick="HeaderCheckBoxItemClick(this,'gridDEF','SelectAll')" /></div></HeaderTemplate><CellTemplate><asp:CheckBox ID="chkItemSelect" CausesValidation="false" onclick="CheckBoxItemClick(this,'gridDEF','SelectAll')" runat="server" /></CellTemplate></igtbl:TemplatedColumn></Columns>
and rest all other populate from db at run time.I have kept column filter for each column.Each column filter values will be derived at grid initialize layout event by taking the grid' s datasource and looping through the columns and taking distinct values of each column and adding that into filtervalue collectionof that column.
User will select a row by checking the checkbox in each row.Whenever user clicks on checkbox Im changing the row color and updating a particular cell value as 1 using the below javascript
function CheckBoxItemClick(ChkObj, _GridName, ColKey) { //debugger;
var _grid; if (_GridName == 'gridDEF') _grid = igtbl_getGridById('<%=gridDEF.ClientID%>'); else if (_GridName == 'gridDES') _grid = igtbl_getGridById('<%=gridDES.ClientID%>'); var _row = _grid.getActiveRow();
for (i = 0; i < _grid.Rows.length; i++) {
if (ChkObj.checked == true) { _row.getCell(1).setValue("1"); _row.Element.runtimeStyle.backgroundColor = "#EFD7C6"; } else { _row.getCell(1).setValue("0"); _row.Element.runtimeStyle.backgroundColor = "white"; }
} }
Suppose if the user selects the row by above and then apply column filter,the application throws an error which is not getting caught in our user defined exception log.If I put debugger its not goin to any of our code block.After all our code block completed its just moving to the error page.
The error description is as below.
Server Error in '/' Application.--------------------------------------------------------------------------------
Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.] Infragistics.WebUI.UltraWebGrid.UltraWebGrid.UpdateDBRow(UltraGridRow row, UltraGridRow oldRow) +155 Infragistics.WebUI.UltraWebGrid.UltraWebGrid.ProcessChanges(StateChanges stateChanges, Boolean fireEvents) +1588 Infragistics.WebUI.UltraWebGrid.UltraWebGrid.RaisePostDataChangedEvent() +161 System.Web.UI.Page.RaiseChangedEvents() +134 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5201
Need your help to sort this out.
Thanks in Advance
Hello,As far as i can see this issue is occuring in NetAdvantage 8.2 which is a retired product - http://www.infragistics.com/support/product-lifecycle.aspx#ProductLifecycle Please also take a note that we have retired our clasic ultra controls in the last two versions - http://community.infragistics.com/blogs/taz_abdeali/archive/2011/11/17/asp-net-product-changes-in-2011-volume-2.aspxI would advice you to upgrade to a newer version which is development supported and to start migrating from old ultra controls to the new Aikido controls.
Hello Sankar,Please let me know if you have any other questions with this matter.
Hi,
I sorted out this issue.
Thanks for your suggestions.
I am facing the same issue. How did you resolve this issue. Thanks
Just repopulate ur grid on page load.
Whenever u apply that column filter it will go to pageload.
In page load just repopulate the grid.
It will solve the issue.
Regards,
R.Sankar