Hi,
We are using infragistics gridview version 10.2. We have implemented add, edit delete functionality on it. but it is not working when grid have mor then 10 columns. Row_Update event is not firing. Execution exits directly from PageLoad without executing. Any kind of help will be appreciated.
Hello Narayanan,In version 10.2 there are 3 grids - WebDataGrid, WebHierarchicalDataGrid and UltraWebGrid. Which one you are using. Also what is your exact build of 10.2? The best would be to send a sample or at least code snippet showing how you implement the scenario and what is the datasource you are using. Also it would be helpfull to point the browsers which you are using.
Code snippet -
aspx page:-
<%@ Register Assembly="Infragistics35.Web.v10.2, Version=10.2.20102.2158, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.Web.UI.GridControls" TagPrefix="ig" %>
<ig:WebDataGrid ID="wdgMatrix" runat="server" AutoGenerateColumns="False" Height="370px" Width="100%" StyleSetPath="~/Styles/" StyleSetName="Trendy" DefaultColumnWidth="130px" OnRowAdding="wdgMatrix_RowAdding" OnRowUpdating="wdgMatrix_RowUpdating" OnRowsDeleting="wdgMatrix_RowDeleting" OnColumnSorted="wdgMatrix_ColumnSorted" > <Behaviors> </Behaviors> </ig:WebDataGrid>
aspx.cs page
protected void wdgMatrix_RowUpdating(object sender, RowUpdatingEventArgs e) { MatrixTables mat = new MatrixTables(((SessionInfo)Session["UserInformation"]).DatabaseName.ToString()); DataTable dtNew = new DataTable(); int id1 = (int)((Infragistics.Web.UI.GridControls.ControlDataRecord)(e.Row)).DataKey[0]; DataRow foundRow = dtGridSource.Rows.Find(id1); XmlString.AppendFormat("<{0}>", "Matrix"); foreach (DataColumn dc in DtGrid.Columns) { DataColumn dcNew = new DataColumn(dc.ColumnName, dc.DataType); dtNew.Columns.Add(dcNew); if (dc.DataType.ToString() == "System.String") foundRow[dc.ColumnName.ToString()] = e.Values[dc.ColumnName].ToString(); else if (dc.DataType.ToString() == "System.Int32") foundRow[dc.ColumnName] = Convert.ToInt32(e.Values[dc.ColumnName]); XmlString.AppendFormat("<{0}>", "value"); XmlString.AppendFormat("<ColValue>{0}</ColValue>", dc.ColumnName); XmlString.AppendFormat("<RowValue>{0}</RowValue>", e.Values[dc.ColumnName]); XmlString.AppendFormat("</{0}>", "value"); } XmlString.AppendFormat("</{0}>", "Matrix"); mat.UpdateMatrix(id1, TableName, XmlString.ToString()); }