Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
222 views
Hi,

In mobile and tablet device is very difficult increase and decrease the size of columns of RadGrid, exist a specified method or a workaround for resize a grid ? 

Is possible increase border(left/right) of column for change it more easiest ?

Best regards
Attila Antal
Telerik team
 answered on 21 Nov 2019
4 answers
212 views

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>
Attila Antal
Telerik team
 answered on 21 Nov 2019
1 answer
266 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
503 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
308 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
498 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
387 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.4K+ 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
162 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
573 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?