Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
231 views

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.

Eyup
Telerik team
 answered on 21 Nov 2019
7 answers
462 views
Is there a client side event for when the header is clicked in the RadGrid?  I am seeing that there is a ColumnClicked event, but I need an event just prior to that being fired since the CellSelecting event fires before the ColumnClicked event and the CellSelecting event does not appear to indicate whether the header was clicked or not that I have been able to see.

Eyup
Telerik team
 answered on 21 Nov 2019
3 answers
281 views
I wonder is there a RadEDitor tutorail for end-users to help them out to work effectively with such a sophisticated tool?
Rumen
Telerik team
 answered on 20 Nov 2019
7 answers
444 views
Is it possible to change the RadTextbox's witdh by css ?

Please reply as soon as possible.
Rumen
Telerik team
 answered on 20 Nov 2019
3 answers
358 views

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;
        }

 

 

Attila Antal
Telerik team
 answered on 20 Nov 2019
1 answer
6.3K+ views
Hi,

I have rad grid. I want to hide the columns in a radgrid. How to hide it. This is my rad grid
<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> 

and this my codebehind.
    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(); 
    } 


i want to hide sid, customername and marketname columns before it displays to the user. I dont have any idea how to do that. Please help me.

Thanks
Eyup
Telerik team
 answered on 20 Nov 2019
1 answer
139 views
How I can use the custom command item template button to add a new row with the EditMode = InPlace. I found the answer for EditMode = Batch. But for InPlace mode, what's the javascript function I can add a new row in place? 
Eyup
Telerik team
 answered on 20 Nov 2019
4 answers
508 views

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

John
Top achievements
Rank 1
 answered on 19 Nov 2019
1 answer
131 views

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?

 

 

Vessy
Telerik team
 answered on 19 Nov 2019
0 answers
106 views

This problem occurs after uploading the site

All controls are displayed in disarray

See photos

plz help me

komeil
Top achievements
Rank 1
 asked on 19 Nov 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?