Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
133 views
I have a radgrid with information I am binding from a database. I have added a GridTemplateColumn with a custom button in it that I want to use for "info" about the item in that row. I already have a custom edit form as well so I cannot use that method for this. What I want to do is when the user clicks my "info" button have a form open up that has another radgrid in it with only the specific information I will pull from my database in it.

The issue is that I do not know how to get the unique key out of the base RadGrid so that I can pass it to my query in the separate "info" page. Any guidance will be greatly appreciated.
John
Top achievements
Rank 1
 answered on 19 Apr 2013
6 answers
227 views
Hi,
I am using RadComboBox with template as described in the demo:

As a dropdown list i have items with item template of checkbox and label:

<ItemTemplate> 
       <div onclick="StopPropagation(event)"
            <asp:CheckBox runat="server" ID="chk1" Checked="false" onclick="onCheckBoxClick(this)" /> 
            <asp:Label runat="server" ID="Label1" AssociatedControlID="chk1" Text='<%#Eval("DisplayName") %>'></asp:Label> 
       </div> 
</ItemTemplate> 

Is there a way to support keyboard using item template in combobox? i.e. to select some checkboxes in the drop down list using the keyborad?

Thanks,
Ruth

Nencho
Telerik team
 answered on 19 Apr 2013
3 answers
365 views
Is it possible to display the NameField value in the Tooltip on a RadHtmlChart?

On mouse over I want it to show: "ABC County: 50".

Thanks

   
<telerik:RadHtmlChart runat="server" ID="CaseCountyPieChart" Width="300"
        DataSourceID="CaseCountyByDateRangeLinqDataSource" Transitions="true">
    <Appearance>
        <FillStyle BackgroundColor="White"></FillStyle>
    </Appearance>
    <ChartTitle Text="Cases by Case County">
        <Appearance Align="Center" BackgroundColor="White" Position="Top"></Appearance>
    </ChartTitle>
    <Legend>
        <Appearance BackgroundColor="White" Position="Bottom" Visible="true" />
    </Legend>
    <PlotArea>
        <Appearance>
            <FillStyle BackgroundColor="White"></FillStyle>
        </Appearance>
         
        <Series>
            <telerik:PieSeries NameField="county" DataFieldY="caseCount" StartAngle="90">
                <LabelsAppearance Position="Circle" DataFormatString="{0}" />
                <TooltipsAppearance DataFormatString=" NameField Here:  {0}" />                       
            </telerik:PieSeries>
        </Series>
    </PlotArea>
</telerik:RadHtmlChart>
Danail Vasilev
Telerik team
 answered on 19 Apr 2013
1 answer
120 views
How can I do my chart wor un full screen. 

I need my chart title center.

My code

radChart1.Height = 400;
radChart1.Width = 1200;
radChart1.ChartTitle.TextBlock.Text = bl.nomeTituloChart;
radChart1.ChartTitle.TextBlock.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Center;
Peshito
Telerik team
 answered on 19 Apr 2013
3 answers
135 views
Hi folks,

Is it possible to create a RadSlider control using Javascript?

Thanks
Henry Gibbs
Princy
Top achievements
Rank 2
 answered on 19 Apr 2013
1 answer
131 views
HI Team,

When click on the legend Selected item, I am able to Navigate to other page with respect/Selected ID, but I am unable to get the Hand Shape when mouse hover on the Items(Unable to apply the CSS/ Styles to legend).

I am using Rad chart in Asp.net application with C#.

Thanks in advance.
Petar Kirov
Telerik team
 answered on 19 Apr 2013
3 answers
130 views
Hi folks,

How to set the Radslider orientation from C#? I tried giving RadSlider1.Orentation = "Vertical" but I am getting
an error.

Thanks
Henry GIbbs
Princy
Top achievements
Rank 2
 answered on 19 Apr 2013
6 answers
167 views
I have a RadToolTipManager set to AutoToolTipify my page, however, there are many controls on the page with a Title attribute set that I do not want tooltipped. Is there a way to cancel the tooltip creation based on the TargetControlID?

My thinking would be I could do something along these lines:

If e.TargetControlID.Contains("HyperLink1") Then
    'Do actions for tooltip
Else
    e.cancel()
End If

Is there any way to do what I'm hoping to do, or a good way to specify what to Tooltipify based on what the Title attribute is set to?

-Thanks
Marin Bratanov
Telerik team
 answered on 19 Apr 2013
6 answers
198 views
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using Telerik.Web.UI;
using System.Threading;
 
namespace RadTestApp
{
    public partial class SnippetHttpPanel : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }
 
        protected void XmlHttpPanel_ServiceRequest(object sender, RadXmlHttpPanelEventArgs e)
        {
            Thread.Sleep(1000);
 
            rgSearchResults.DataSource = GetData();
            rgSearchResults.DataBind();
        }
 
        protected void rgSearchResults_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item is GridHeaderItem)
            {
                GridHeaderItem gridHeader = e.Item as GridHeaderItem;
 
                RadComboBox sortoptions = (RadComboBox)gridHeader.FindControl("cboSortOptions");
                sortoptions.SelectedIndex = 1;
 
                DropDownList ddl = (DropDownList)gridHeader.FindControl("sortOptions");
                ddl.SelectedIndex = 1;
            }
        }
 
        private List<SnippetResult> GetData()
        {
            List<SnippetResult> results = new List<SnippetResult>();
 
            results.Add(new SnippetResult { DocSequenceNumber = 1, Title = "Title 1", Snippet = "This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times." });
            results.Add(new SnippetResult { DocSequenceNumber = 2, Title = "Title 1", Snippet = "This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times." });
            results.Add(new SnippetResult { DocSequenceNumber = 3, Title = "Title 1", Snippet = "This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times." });
            results.Add(new SnippetResult { DocSequenceNumber = 4, Title = "Title 1", Snippet = "This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times." });
            results.Add(new SnippetResult { DocSequenceNumber = 5, Title = "Title 1", Snippet = "This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times." });
            results.Add(new SnippetResult { DocSequenceNumber = 6, Title = "Title 1", Snippet = "This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times." });
 
            return results;
        }
    }
 
    public class SnippetResult
    {
        public int DocSequenceNumber { get; set; }
        public string Title { get; set; }
        public string Snippet { get; set; }
    }
}
The RadCombobox does not show the selected item in the drop down after a http post using xmlhttp control from telerik. The same works fine with ASP.Net combo box.
Please let me know I can paste sample code.
Boyan Dimitrov
Telerik team
 answered on 19 Apr 2013
6 answers
303 views

Hi,

I am using RADGrid for my application to improve the performance. I am updating the List<Class1> in Webeservice and returning to the client fuinction , But in client script while executing the following line of code in    the   "function updateGrid(result)" - 

set_dataSource(result)

  throwing error inside Telerik dynamic created script file as 'null object'.

In JavaScript

<script type="text/javascript">  
function bind()  
{  
 
    xtenzasolutions.WebService2.HelloWorld(updateGrid,OnError);  
 
}  
 
function OnError(result)   
    {  
    alert("Error : "+result.get_message());  
    }    
 
 function updateGrid(result)  
    {  
        var tableview= $get('<% = rgDetails.MasterTableView.ClientID %>');  
                 
        tableview.set_dataSource(result);  
             tableview.dataBind();  
                
             GetFirstDataItemKeyValues();  
    }  
      
    function GetFirstDataItemKeyValues()  
 {  
   
   var firstDataItem = $find("<%=rgDetails.ClientID %>").get_masterTableView().get_dataItems()[0];  
   var keyValues =  
     'DisplayStatus: "' +  
      firstDataItem.getDataKeyValue("disp_id") + '"' +  
      ' \r\n' +  
      'RuleName: "' +  
      firstDataItem.getDataKeyValue("url") + '"';  
      alert(keyValues);  
     
 }  
</script> 

In UserControl Page.
<table>  
<tr>  
<td>  
<asp:ScriptManager ID="scrp" runat="server">  
<Services>  
<asp:ServiceReference Path="~/WebService2.asmx" />  
</Services>  
</asp:ScriptManager>  
 
<telerik:RadGrid ID="rgDetails" runat="server" GridLines="None" Skin="Office2007" 
                                    EnableClientKeyValues="true" AutoGenerateColumns="False" AllowMultiRowSelection="false" Height="200px" Width="500px">  
                                    <HeaderContextMenu EnableTheming="True">  
                                      
                                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>  
                                    </HeaderContextMenu>  
                                    <MasterTableView>  
                                      
                                        <RowIndicatorColumn>  
                                            <HeaderStyle Width="20px"></HeaderStyle>  
                                        </RowIndicatorColumn>  
                                        <ExpandCollapseColumn>  
                                            <HeaderStyle Width="20px"></HeaderStyle>  
                                        </ExpandCollapseColumn>  
                                        <Columns>  
                                          
                                            <%--<telerik:GridBoundColumn UniqueName="MessageType" SortExpression="MessageType" HeaderText="" DataField="MessageType"></telerik:GridBoundColumn>--%>  
                                            <telerik:GridTemplateColumn HeaderText="" UniqueName="Image">  
                                                <ItemTemplate>  
                                                    <asp:Image runat="server" ID="ImageThumbnail" AlternateText="image" ImageUrl='' Height="25" 
                                                        Width="25" Style="border-width: 0px;" />  
                                                </ItemTemplate>  
                                            </telerik:GridTemplateColumn>  
                                            <telerik:GridBoundColumn ItemStyle-HorizontalAlign="Left" UniqueName="Activity" SortExpression="Activity" 
                                                HeaderText="Activity" DataField="u_id">  
                                             <ItemStyle HorizontalAlign="Left" />  
                                            </telerik:GridBoundColumn>  
                                            <telerik:GridTemplateColumn AllowFiltering="false" UniqueName="Install" HeaderText="Status">  
                                                <ItemTemplate>  
                                                     
                                                        <%#DataBinder.Eval(Container.DataItem, "disp_id")%></a></ItemTemplate>  
                                            </telerik:GridTemplateColumn>  
                                            <telerik:GridBoundColumn UniqueName="InstallStatus" SortExpression="InstallStatus" 
                                                HeaderText="" DataField="url" Visible="false">  
                                            </telerik:GridBoundColumn>  
                                        </Columns>  
                                    </MasterTableView>  
                                    <FilterMenu EnableTheming="True">  
                                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>  
                                    </FilterMenu>  
                                </telerik:RadGrid>  
 
</td>  
</tr>  
<tr>  
<td>  
<asp:Button runat="server" ID="butt" te="click" OnClientClick="bind()" />  
</td>  
</tr>  
</table> 

In Webservice
public List<Class1> HelloWorld()  
 
{  
 
string constr = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;  
 
SqlConnection con = new SqlConnection(constr);  
 
con.Open();  
 
SqlDataAdapter adp = new SqlDataAdapter("select *from urlTable", constr);  
 
DataSet ds = new DataSet();  
 
adp.Fill(ds, "tab");  
 
con.Close();  
 
List<Class1> obj = new List<Class1>();  
 
int i = 0;  
 
foreach (DataRow rw in ds.Tables[0].Rows)  
 
{  
 
Class1 ser = new Class1();  
 
ser.UID = rw["u_id"].ToString();  
 
ser.DISPID = rw["disp_id"].ToString();  
 
ser.URL = rw["url"].ToString();  
 
obj.Add(ser);  
 
}  
 
return obj;  
 
}  
 
Tsvetoslav
Telerik team
 answered on 19 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?