Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
167 views
Hi , 

i wanna help  
i exexute RadEditor tracking changes  , and as u know this feature in radeditor write at html code at the body of  RadEditor 
i wonder how i save the editor text without these changes , 

thanks , 
Marin Bratanov
Telerik team
 answered on 17 Dec 2014
1 answer
56 views
I am trying to use the RadPivotGrid control in my asp.net application (ajax control). But if there are no records to bind, how can i show the "No records found" message in this. ?
Maria Ilieva
Telerik team
 answered on 17 Dec 2014
1 answer
141 views
Hello,

I am evaluating RadGrid for one of my project. For this we are using RADGrid with EditMode="Batch". My client want requirement that "A right mouse click
on “Add New Record” would bring up a menu where you can choose the Grid or the popup window." (as in attached image) . If you choose Grid then it’s in the rad grid. If you choose popup then it would bring up a Popup window for data entry.

I want to know that Whether both option of Grid add/Edit and Popup add/Edit is possible in Batch Edit type grid.
Is it possible to do this? If it is there, then please share a sample demo code for this.
Konstantin Dikov
Telerik team
 answered on 17 Dec 2014
4 answers
305 views
Hi ,
 I am trying to export my grid to pdf, i want to set page number to the exported page.please help..

Thanks,
Ryann

Daniel
Telerik team
 answered on 17 Dec 2014
7 answers
1.1K+ views
I am doing a custom export to excel where I load the grid, say 10 items on the first page, 3 pages long. The user then filters the grid using the built in filter column headers. That limits the grid to 14 items in 2 pages. The user clicks my export button where the following gets executed:


        /// <summary> 
        /// Exports data in grid to excel 
        /// </summary> 
        public void Export() 
        { 
            //rgdProjectWorksheets.ExportSettings.ExportOnlyData = true; 
            //rgdProjectWorksheets.ExportSettings.IgnorePaging = true; 
            //rgdProjectWorksheets.MasterTableView.ExportToExcel(); 
 
            PWDetailAccess pwa = new PWDetailAccess(); 
            DataTable dt = pwa.GetFlatExportData(Convert.ToInt32(Session[ApplicationConstants.SessionVariables.OrganizationID].ToString())); 
 
            List<int> idlist = GetVisibleIDList(); 
 
            HttpContext context = HttpContext.Current; 
            context.Response.Clear(); 
            foreach (DataColumn column in dt.Columns) 
            { 
                context.Response.Write(column.ColumnName + ","); 
            } 
            context.Response.Write(Environment.NewLine); 
            foreach (DataRow row in dt.Rows) 
            { 
                if (!idlist.Contains(Convert.ToInt32(row[PWDetailsSchema.ID].ToString()))) 
                    continue
                for (int i = 0; i < dt.Columns.Count; i++) 
                { 
                    context.Response.Write(row[i].ToString().Replace(","string.Empty) + ","); 
                } 
                context.Response.Write(Environment.NewLine); 
            } 
 
            context.Response.ContentType = "text/csv"
            context.Response.AppendHeader("Content-Disposition""attachment; filename=SA_FlatExport.csv"); 
            context.Response.End(); 
        } 
 
        private List<int> GetVisibleIDList() 
        { 
            List<int> idlist = new List<int>(); 
            for (int i = 0; i < rgdProjectWorksheets.MasterTableView.Items.Count; i++) 
            { 
                if (rgdProjectWorksheets.Items[i].Visible == true
                    idlist.Add(Convert.ToInt32(rgdProjectWorksheets.Items[i][PWDetailsSchema.ID].Text)); 
            } 
            return idlist; 
        } 

I compare my full custom datatable with the items in the grid to decide which items in my datatable I will include in the export. This works great on a grid with no paging. The problem arises when I have more than one page. It appears that the count in
rgdProjectWorksheets.MasterTableView.Items only holds the items on the current page. How do I iterate through all the items in all pages?


I've tried running the GetVisibleIDList method in the PreRender event (as this post suggests), but that does not seem to be working.
Any help would be much appreciated.
Thanks
Kris
Konstantin Dikov
Telerik team
 answered on 17 Dec 2014
1 answer
100 views
Hi,
I am using Telerik version 2012.3.1322.40.

I have spell check button in .aspx form as

<telerik:RadSpell ID="rdlSpellChk" Skin="Office2007" runat="server" ControlToCheck="txtSourceLang" TabIndex="3" />

When I click spell check button, popup window opens. But the buttons ignore, ignore all etc is hidden and i'm not able to resize the window as well.
Attached the screenshot for the same.

If i change browser zoom level as 75% or 150%, it looks fine. Is there any way to fix this problem
Thanks.
Haribala
Marin Bratanov
Telerik team
 answered on 17 Dec 2014
3 answers
149 views
Trying to add a click event on the peek template of a radtemplate tile as well as a click event to the tile itself.  If they click the tile I want it to go to the application that its is attacded to, this works and no problems.  We are trying to put a favorites linkbutton in a peek template so that they users can add the tile to there favorites which when they click it I just want the link button to have a commandname and commandargurment that save the id of the tile into a database of favorites for that user.  Can this be accomplished ???
<div>
       <telerik:RadTileList runat="server" ID="RadTileList1"></telerik:RadTileList>
   </div>
 
protected void Page_Load(object sender, EventArgs e)
       {
           if (!IsPostBack)
           {
               PopulateTileList(0);
               PopulateRadMenu();
                
           }
       }
       
       protected void PopulateTileList(int tileId)
       {
           string sqlWhere = string.Empty;
           if (tileId == 0)
           {
               sqlWhere = string.Empty;
           }
           else
           {
               sqlWhere = " where intDirectoriteId = " + tileId;
           }
 
 
           sql = "select intAppId, strAppName, strTooltip, strUrl, strNotes, s.strColor from tblApplications a INNER JOIN tblStatus s on s.intStatusID = a.intStatusID " + sqlWhere;
 
           mydatatable = new DataTable();
           mydatatable = c.GetReader(sql);
 
           TileGroup tg = new TileGroup();
           RadTileList1.Groups.Add(tg);
            
           foreach (DataRow row in mydatatable.Rows)
           {
               RadContentTemplateTile tile = new RadContentTemplateTile();
               tg.Tiles.Add(tile);
               LinkButton linkfav = new LinkButton();
               linkfav.Attributes.Add("runat", "server");
               linkfav.Click += new EventHandler(linkfav_Click);
               linkfav.Text = "favorites";
               linkfav.Attributes.Add("CommandName", "AddFavorites");
               linkfav.Attributes.Add("CommandArgument", row[0].ToString());
 
               tile.ID = row[0].ToString();
               tile.Name = row[1].ToString();
               tile.ContentContainer.GroupingText = row[1].ToString();
               tile.ToolTip = row[2].ToString();
              // tile.NavigateUrl = row[3].ToString();
               tile.BackColor = System.Drawing.ColorTranslator.FromHtml(row[5].ToString());
               //Peektemplate
               tile.PeekTemplateSettings.Animation = PeekTemplateAnimation.Slide;
               tile.PeekTemplateSettings.HidePeekTemplateOnMouseOut = true;
               tile.PeekTemplateSettings.ShowPeekTemplateOnMouseOver = true;
               tile.PeekContentContainer.Controls.Add(new LiteralControl(row[4].ToString()));
               tile.PeekContentContainer.Controls.Add(linkfav);
               tile.PeekTemplateSettings.CloseDelay = 0;
               tile.PeekTemplateSettings.ShowInterval = 0;
 
           }
            
       }
 
       private void PopulateRadMenu()
       {
           sql = "select intDirectoriteID, strDirectorite from tblDirectorite where bitActive = 1";
 
           rdmenu.DataTextField = "strDirectorite";
           rdmenu.DataValueField = "intDirectoriteID";
           rdmenu.CssClass = "Menuitems";
           rdmenu.DataSource = c.GetReader(sql);
           rdmenu.DataBind();
       }
 
       protected void rdmenu_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)
       {
           switch (e.Item.Value)
           {
               case "1":
                   PopulateTileList(1);
                   break;
               case "2":
                   PopulateTileList(2);
                   break;
               case "3":
                   PopulateTileList(3);
                   break;
               case "4":
                   PopulateTileList(4);
                   break;
               case "5":
                   PopulateTileList(5);
                   break;
               case "6":
                   PopulateTileList(6);
                   break;
               case "7":
                   PopulateTileList(7);
                   break;
           }
       }
 
       protected void linkfav_Click(object sender, EventArgs e)
       {
               Response.Write("Try this LinkButton!");
          
       }
   }
Marin Bratanov
Telerik team
 answered on 17 Dec 2014
1 answer
114 views
Trying to get the DataKeyValue/Primary key of selected row of RadGrid upon clicking Radiobutton

I tried below code but everytime its returning null in "string key"

<telerik:RadGrid ID="RadGrid1" EnableViewState="false" runat="server" AllowPaging="true" AllowSorting="False" AllowFilteringByColumn="true" GridLines="None" OnInit="RadGrid1_Init" OnDeleteCommand="RadGrid1_DeleteCommand">
        <ItemStyle Wrap="false"></ItemStyle>
         <MasterTableView AllowMultiColumnSorting="true" TableLayout="Fixed" DataKeyNames="Id" ClientDataKeyNames="Id">
                 <Columns>
                        <telerik:GridNumericColumn DataField="Id" HeaderText="Id" HeaderStyle-Width="100px" AllowFiltering="False" FilterControlWidth="50px">
                         <telerik:GridTemplateColumn UniqueName="" HeaderText="Select">
                                <ItemTemplate>
                                        <asp:RadioButton ID="rbdSelect" runat="server" AutoPostBack="true" OnCheckedChanged="rbdSelect_CheckedChanged"></asp:RadioButton>
                                 </ItemTemplate>
                          </telerik:GridTemplateColumn>
                  </Columns>
            </MasterTableView>
protected void rbdSelect_CheckedChanged(object sender, EventArgs e)
        {          
            foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
            {
                RadioButton rbd = (RadioButton)item.FindControl("rbdSelect");
                if (rbd.Checked == true)
                {
                    string key = item.GetDataKeyValue("Id").ToString();
                    Response.Redirect("~/Default.aspx");
                }
            }
        }
Please reply what is wrong in my code
Eyup
Telerik team
 answered on 17 Dec 2014
2 answers
195 views
I have two listboxes, lbSelectPhones and lbPhonesDest.  Everything is working great for selecting the desired phones in lbSelectPhones and transferring to lbPhonesDest.  I then store the selections in a SQL table comma separated like CR,CE,CN.

What I need to do now is use that comma separated value CR,CE,CN to auto transfer those selections from lbSelectPhones to lbPhonesDest when the user selects an item from a drop down list.  I've searched with no luck on finding a way to do this.  Please help.

I've tried using lbSelectPhones.Transfer("CR",lbSelectPhones,lbPhonesDest), but it doesn't work since the first argument can't be a string value.
Plamen
Telerik team
 answered on 17 Dec 2014
2 answers
126 views
So, I have the following scenario: an ASPNET webpage is launching a modal popup using RadWindow and its NavigateUrl property. The NavigateUrl points to an external, independent, ASPNET MVC application (within the same domain though). All works smoothly expect for one thing: the external MVC app has its own close logic and button to trigger that. Thing is that it obviously ain't working; the modal window hangs in there.
Being an external MVC app and all that, I guess it is out of the question to get hold of a reference to the RadWindow belonging to the host application...

Is there any solution to this scenario, at all? Thanks.
Cristian
Top achievements
Rank 1
 answered on 17 Dec 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?