Hi,
Iam using Infragistics 13.1.
GridRecordItem must be used instead of UltraGridCell in 13.1.
Please let me know how to set AllowEditing for GridRecordItem.
Earlier code - UltraGridCell cellRename = e.Row.Cells.FromKey(sRename);
cellRename.AllowEditing = AllowEditing.Yes;
Expecting your response asap. Its urgent.
Thanks in advance.
Hello,
1) If there is editing behavior set on the grid then you can access the column settings of the editing behavior and change it as follows:
WebDataGrid1.Behaviors.EditingCore.Behaviors.CellEditing.ColumnSettings["Number"].ReadOnly = false;
2) If editing on the grid has not been configured you can add it programmatically as follows:
this.WebDataGrid1.Behaviors.CreateBehavior();this.WebDataGrid1.Behaviors.EditingCore.Behaviors.CreateBehavior();
// and then add different settings for each column of the grid
EditingColumnSetting settingColumn1 = new EditingColumnSetting();settingColumn1.ColumnKey = "Number";settingColumn1.ReadOnly = false;
EditingColumnSetting settingColumn2 = new EditingColumnSetting();settingColumn2.ColumnKey = "Date";settingColumn2.ReadOnly = true;
this.WebDataGrid1.Behaviors.EditingCore.Behaviors.CellEditing.ColumnSettings.Add(settingColumn1);this.WebDataGrid1.Behaviors.EditingCore.Behaviors.CellEditing.ColumnSettings.Add(settingColumn2);
Please refer for more details to http://help.infragistics.com/Help/Doc/ASPNET/2013.1/CLR4.0/html/WebDataGrid_Setting_Column_Settings_for_a_Behavior.html
I hope this helps. If you have further questions on the issue, please let me know, I will be glad to help.
Wonderful!!
Thanks very much for the detailed explanation.
I need one more explanation.
Please let me know how to set TargetURL for GridRecordItem.Earlier code - UltraGridCell cellRename = e.Row.Cells.FromKey(sRename); cellRename.TargetURL = BuildRenameTargetURL( cellOwner.Value.ToString(), cellReadOnly.Value.ToString(), cellBOId.Value.ToString(), sNameBeforeLink, cellDescription.Value.ToString(), Page is System.Web.UI.Page, Utilities.GetLocale(Request), Server);
Awaiting your response.
Hi Hristo,
Need your suggestion here.
In Ultrawebgrid's InitializeRow, a function was mapped to the Ultragridcell's TargetUrl property in earlier version of Infragistics(7.3).
Below is the code snippet.
UltraGridCell cellCopy = e.Row.Cells.FromKey(sCopy);
cellCopy.TargetURL = Controller.BuildCopyTargetURL(cellOwner.Value.ToString(),cellReadOnly.Value.ToString(),cellBOId.Value.ToString(),cellName.Value.ToString(),cellDescription.Value.ToString(),Page is System.Web.UI.Page,Utilities.GetLocale(Request), Server);
Now that there is no TargetUrl property in webdatagrid, Would be really helpful if you could let me know how i can achieve this in Webdatagrid's InitializeRow.
Thanks!
Hello Jeevitha,
When using the LinkButton control as in my example you should be able to call the function as a parameter in the .Add method as follows:
LinkButton link = new LinkButton();link.Text = "Link to Google";link.Attributes.Add("href", GetLink());
container.Controls.Add(link);
So if the GetLink() function returns some string as "http://google.com" then the control will be rendered with the following html:
<a href="http://google.com">Link to Google</a>
Please try it on your side and let me know if it works for your scenario.
I'm just following up to see if you need any further assistance with this issue. If so please let me know.
Your suggestion really helped.
Thanks for the quick reply. Appreciate!
Hello Jeevtiha,
I am glad this helped. If you have any further questions on the issue, please let me know.