Hi,
I have a grid which has column groups, I am trying to change the position of a column on runtime on click of a button but it gives me error.
Below is my code. I have read at few places that its not possible, is there any alternate way to achieve it.
<ColumnGroups><br> <telerik:GridColumnGroup HeaderText="Group 1" Name="Group1"></telerik:GridColumnGroup><br> <telerik:GridColumnGroup HeaderText="Group 2" Name="Group2"></telerik:GridColumnGroup><br> </ColumnGroups><br> <ColumnGroups><br> <telerik:GridColumnGroup HeaderText="Group 4" Name="Group3" ParentGroupName="Group1"></telerik:GridColumnGroup><br> <telerik:GridColumnGroup HeaderText="Group 5" Name="Group4" ParentGroupName="Group1"></telerik:GridColumnGroup><br> <telerik:GridColumnGroup HeaderText="Group 6" Name="Group5" ParentGroupName="Group2"></telerik:GridColumnGroup><br> </ColumnGroups><br> <Columns><br> <telerik:GridBoundColumn HeaderText="PO Date" ></telerik:GridBoundColumn><br> <telerik:GridBoundColumn HeaderText="Submittal Package" ></telerik:GridBoundColumn><br> <telerik:GridBoundColumn HeaderText="Returned Submittals" ColumnGroupName="Group3" ></telerik:GridBoundColumn><br> <telerik:GridBoundColumn HeaderText="Release Date" ColumnGroupName="Group3"></telerik:GridBoundColumn><br> <telerik:GridBoundColumn HeaderText="Confirmation Dwgs" ColumnGroupName="Group3"></telerik:GridBoundColumn><br> <telerik:GridBoundColumn HeaderText="Construction Dwgs" ColumnGroupName="Group4"></telerik:GridBoundColumn><br> <telerik:GridBoundColumn HeaderText="Inspect/Witness Test" ColumnGroupName="Group4"></telerik:GridBoundColumn><br> <telerik:GridBoundColumn HeaderText="Shipment" ColumnGroupName="Group5"></telerik:GridBoundColumn><br> <telerik:GridBoundColumn HeaderText="Weeks PO-Ship" ColumnGroupName="Group5"></telerik:GridBoundColumn><br> <telerik:GridBoundColumn HeaderText="O/M Manuals" ></telerik:GridBoundColumn><br> <telerik:GridBoundColumn HeaderText="O/M Manuals" ></telerik:GridBoundColumn><br> <telerik:GridBoundColumn HeaderText="Dynamic Column1"></telerik:GridBoundColumn><br> <telerik:GridBoundColumn HeaderText="Dynamic Column2"></telerik:GridBoundColumn><br> <telerik:GridBoundColumn HeaderText="Dynamic Column3"></telerik:GridBoundColumn><br><br> </Columns><br><br> </MasterTableView><br> </telerik:RadGrid>
Hello,
I have a textbox and iframe in one of my page of project. I try to select all text with cursor.
The caret stays beginning of text if my selection process stops over on iframe. If i move cursor out of iframe the caret will work properly.
I don't know if i'm summarized this conclusion correct or not but i made a video for it.
https://drive.google.com/open?id=1ubhed_C8MJGKPy_THTb6wcJcsQmqpY4W
Thanks and have a nice forums.




I have an on click event and I would like to bind to the Grid on click and make it view able. My code is not working. The grid is not made view able on button click.
My code:
. protected void btnFind_Click(object sender, EventArgs e)
{
strFind = txtFind.Text;
AddFileNames(dataDir);
foreach (var fileName in allFiles)
{
Document doc = new Document(fileName);
Regex regex = new Regex(strFind, RegexOptions.IgnoreCase);
FindReplaceOptions options = new FindReplaceOptions();
doc.Range.Replace(regex, new ProcessFiles(), false);
if (doc.HasRevisions == true)
{
//string strFileName = System.IO.Path.GetFileName(fileName);
changedFiles.Add(fileName);
Session.Add("ChangeFilesList", changedFiles);
doc.Save(fileName);
}
}
txtFind.Text = string.Empty;
RadGrid1.DataSource = GetDocuments();
}
private DataTable GetDocuments()
{
var dt = new DataTable();
List<string> fileEntries = Session["allFilesList"] as List<string>;
string[] files = fileEntries.ToArray();
dt.Columns.Add("ID", typeof(Int32));
dt.Columns.Add("DirectoryName", typeof(string));
dt.Columns.Add("FileName", typeof(string));
dt.Columns.Add("LastModifiedTime", typeof(DateTime));
dt.Columns.Add("FilePath", typeof(string));
dt.Columns.Add("BinaryData", typeof(byte[]));
dt.PrimaryKey = new DataColumn[] { dt.Columns["ID"] };
for (int i = 0; i < files.Length; i++)
{
var dr = dt.NewRow();
dr["ID"] = i;
var fileInfo = new FileInfo(fileEntries[i]);
dr["DirectoryName"] = fileInfo.Directory.Name;
dr["FileName"] = fileInfo.Name;
dr["LastModifiedTime"] = fileInfo.LastWriteTime;
dr["FilePath"] = fileEntries[i];
dr["BinaryData"] = File.ReadAllBytes(fileEntries[i]);
dt.Rows.Add(dr);
}
return dt;
}

| <telerik:RadGrid ID="gvCktMap" AllowFilteringByColumn="True" OnNeedDataSource="gvCktMap_NeedDataSource" |
| AllowSorting="True" PageSize="15" AllowPaging="True" runat="server" GridLines="None" |
| ShowGroupPanel="True" EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" |
| EnableViewState="false" OnItemCreated="gvCktMap_ItemCreated"> |
| <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True"> |
| <ClientEvents OnRowDblClick="RowDblClick" /> |
| <Scrolling AllowScroll="true" UseStaticHeaders="true" /> |
| <Selecting AllowRowSelect="True"></Selecting> |
| <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True" |
| ResizeGridOnColumnResize="False"></Resizing> |
| </ClientSettings> |
| <GroupingSettings ShowUnGroupButton="true" /> |
| <PagerStyle Mode="NextPrevAndNumeric" HorizontalAlign="Right" Font-Bold="true" /> |
| </telerik:RadGrid> |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| try |
| { |
| winPopUps.InitiallyShown = false; |
| winFilter.InitiallyShown = false; |
| Response.AddHeader("Refresh", Convert.ToString((Session.Timeout * 60) + 5)); |
| if (Session.IsNewSession) |
| { |
| Response.Redirect("Default.aspx"); |
| } |
| if (!IsPostBack) |
| { |
| if (Session["TaskName"] != null) |
| lblTaskName.Text = Session["TaskName"].ToString(); |
| Session["FilColms"] = null; |
| Session["SortExp"] = null; |
| Session["FilExp"] = null; |
| Session["ViewAll"] = null; |
| if (Session["TaskID"].ToString() == "206" || Session["TaskID"].ToString() == "209" || Session["TaskID"].ToString() == "208" || Session["TaskID"].ToString() == "207" || Session["TaskID"].ToString() == "210" || Session["TaskID"].ToString() == "400" || Session["TaskID"].ToString() == "401" || Session["TaskID"].ToString() == "402" || Session["TaskID"].ToString() == "403" || Session["TaskID"].ToString() == "404" || Session["TaskID"].ToString() == "216" || Session["TaskID"].ToString() == "215") |
| { |
| lnkbtnComplete.Visible = false; |
| if (Session["TaskID"].ToString() == "208") |
| { |
| lblBlkLbl1.Text = "Req SM Imp Date :"; |
| lblBlkLbl2.Text = "CM Number :"; |
| trBulkUpdates.Width = "63%"; |
| } |
| else if (Session["TaskID"].ToString() == "209") |
| { |
| lblBlkLbl1.Text = "Foc Date :"; |
| lblBlkLbl2.Text = "Actual PTD :"; |
| trBulkUpdates.Width = "67%"; |
| txtBlkTxt3.Visible = true; |
| lblBlkLbl3.Visible = true; |
| lblBlkLbl3.Text = "Notificaiton Date :"; |
| txtPackageSlip.Width = 100; |
| valextFOCDt.Enabled = true; |
| clnderFOCDt.Enabled = true; |
| valFOCDt.Enabled = true; |
| } |
| else if (Session["TaskID"].ToString() == "215") |
| { |
| lblBlkLbl1.Text = "Gate3 Date :"; |
| lblBlkLbl2.Text = "Gate2 Date :"; |
| trBulkUpdates.Width = "73%"; |
| txtBlkTxt3.Visible = true; |
| lblBlkLbl3.Visible = true; |
| lblBlkLbl3.Text = "Customer Accepted Date :"; |
| txtPackageSlip.Width = 100; |
| valextFOCDt.Enabled = true; |
| clnderFOCDt.Enabled = true; |
| valFOCDt.Enabled = true; |
| } |
| else if (Session["TaskID"].ToString() == "207") |
| { |
| lblBlkLbl1.Text = "CPE Ship Date :"; |
| lblBlkLbl2.Text = "Package Slip :"; |
| trBulkUpdates.Width = "58%"; |
| } |
| else if (Session["TaskID"].ToString() == "210" || Session["TaskID"].ToString() == "402") |
| { |
| lblBlkLbl1.Text = "Sch SM Imp Date :"; |
| lblBlkLbl2.Text = "SM Number"; |
| trBulkUpdates.Width = "63%"; |
| } |
| else if (Session["TaskID"].ToString() == "400") |
| { |
| lblBlkLbl1.Text = "PO Number :"; |
| lblBlkLbl2.Text = "Req Number :"; |
| ClndrPhyDt.Enabled = false; |
| valPhyDt.Enabled = false; |
| valCanlnder.Enabled = false; |
| trBulkUpdates.Width = "60%"; |
| } |
| else if (Session["TaskID"].ToString() == "401") |
| { |
| lblBlkLbl1.Text = "NOC Acceptance Package Completion Date :"; |
| lblBlkLbl2.Text = string.Empty; |
| lblBlkLbl2.Visible = false; |
| txtPackageSlip.Text = string.Empty; |
| txtPackageSlip.Visible = false; |
| trBulkUpdates.Width = "55%"; |
| } |
| else if (Session["TaskID"].ToString() == "403") |
| { |
| lblBlkLbl1.Text = "NOC Acceptance Date :"; |
| lblBlkLbl2.Text = string.Empty; |
| lblBlkLbl2.Visible = false; |
| txtPackageSlip.Text = string.Empty; |
| txtPackageSlip.Visible = false; |
| trBulkUpdates.Width = "43%"; |
| } |
| else if (Session["TaskID"].ToString() == "404" || Session["TaskID"].ToString() == "216") |
| { |
| lblBlkLbl1.Text = "Billing Start Date :"; |
| lblBlkLbl2.Text = "Saville Account Number :"; |
| trBulkUpdates.Width = "70%"; |
| } |
| else if (Session["TaskID"].ToString() == "206") |
| { |
| lblBlkLbl1.Text = "Config Gen Date :"; |
| lblBlkLbl2.Text = string.Empty; |
| lblBlkLbl2.Visible = false; |
| txtPackageSlip.Text = string.Empty; |
| txtPackageSlip.Visible = false; |
| trBulkUpdates.Width = "40%"; |
| } |
| } |
| } |
| bingGrid(); |
| } |
| catch (Exception ex) |
| { |
| } |
| } |
| private void bingGrid() |
| { |
| try |
| { |
| gvCktMap.Columns.Clear(); |
| DataSet dsResult = new DataSet(); |
| DataSet dsEditItems = new DataSet(); |
| dsEditItems.ReadXml(Server.MapPath("XMLS/" + Session["TaskID"].ToString() + ".xml")); |
| clsSearch_BL clsObj = new clsSearch_BL(); |
| clsObj.TaskID = (string)Session["TaskID"]; |
| clsObj.CustName = (string)Session["CustName"]; |
| clsObj.MarketName = (string)Session["MarketName"]; |
| clsObj.HeadendName = (string)Session["HeadendName"]; |
| clsObj.SiteName = (string)Session["SiteName"]; |
| clsObj.TaskStatus = (string)Session["TaskStatus"]; |
| clsObj.OrdType = (string)Session["OrdType"]; |
| clsObj.OrdStatus = (string)Session["OrdStatus"]; |
| clsObj.ProName = (string)Session["ProName"]; |
| clsObj.LOC = (string)Session["LOC"]; |
| dsResult = clsObj.getSearchResults_BL(clsObj); |
| Session["SearchRes"] = dsResult; |
| DataTable dtFilter = new DataTable(); |
| DataColumn dtCol = new DataColumn("FilterBy"); |
| dtFilter.Columns.Add(dtCol); |
| dtCol = new DataColumn("DataType"); |
| dtFilter.Columns.Add(dtCol); |
| gvCktMap.DataSource = dsResult; |
| } |
| protected void gvCktMap_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) |
| { |
| bingGrid(); |
| } |


Have Radbutton on page displayed in Radwindow with OnClientClicking function:
function OnClientClicking(sender, args) { document.getElementById('<%=form1.ClientID%>').style.cursor = 'wait'; }The RadButton submits postback, but their is sometimes a delay.
The wait cursor displays when hovering on parts of the form that don't include controls (buttons, input controls)
Is there anyway to have the wait cursor show over the Radbutton as well, or all the controls would be better.
Thanks
We are getting this inconsistency in the xml generated by the persistence framework, where by for some some instances the visible tag under PersistableColumnSetting is setting to false.
<PersistableColumnSetting>
<UniqueName>PermitID</UniqueName>
<Visible>false</Visible>
<Display>false</Display>
<SortExpression />
<GroupByExpression />
<OrderIndex>2</OrderIndex>
<CurrentFilterFunction>NoFilter</CurrentFilterFunction>
<CurrentFilterValue />
<AndCurrentFilterFunction>NoFilter</AndCurrentFilterFunction>
<AndCurrentFilterValue />
<Width />
<Aggregate>None</Aggregate>
</PersistableColumnSetting>
and these seem to happen to columns that are with Display set to false, this is ruining the our grid because we need these column in OnItemDataBound and these columns become blank.
<telerik:GridBoundColumn DataType="System.Int32" ReadOnly="True" Display="False" Exportable="False" UniqueName="PermitID" DataField="PermitID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TenantID" DataType="System.Int32" Display="False" ReadOnly="True" Exportable="False" UniqueName="TenantID" />
<telerik:GridBoundColumn DataField="PermitGUID" DataType="System.Guid" UniqueName="PermitGUID" Display="False" Exportable="False" ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderStyle-Width="115px" FilterControlWidth="50px" FilterControlAltText="Filter Ref column" Aggregate="Count" FooterAggregateFormatString="{0} items" DataField="PermitRef" HeaderText="Permit Ref" SortExpression="PermitRef" UniqueName="PermitRef" ItemStyle-Font-Underline="true" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true"/>
We are finding it hard to debug because whenever we test, visible tag is always set to true, but some of our users are experiencing this. What triggers persistence framework to set visibility to false?
