Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
184 views
Hi All

I have a radgrid

Automatic Update/Insert/Delete

I have just 2 field.

Product Name and Product Description

So while clicking the edit two textboxes appears and I have set the width for it.

ok Here I am able to type numbers

Is there any possibility to restrict it.

Thank You

-Anto
Princy
Top achievements
Rank 2
 answered on 19 Mar 2009
1 answer
136 views
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" Skin="Hay">  
  <ClientSettings EnableRowHoverStyle="true" /> 
  <MasterTableView>                  
    <Columns> 
      <telerik:GridButtonColumn DataTextField="value" /> 
      <telerik:GridButtonColumn DataTextField="text" /> 
    </Columns> 
  </MasterTableView> 
</telerik:RadGrid> 
ListItemCollection list = new ListItemCollection();  
list.Add(new ListItem("One", "1"));  
list.Add(new ListItem("Two", "2"));  
list.Add(new ListItem("", "3"));  
list.Add(new ListItem("", "4"));  
 
RadGrid1.DataSource = list;  
RadGrid1.DataBind(); 

Rows with empty button column text gets broken cell borders in Internet Explorer works in Firefox.
Shinu
Top achievements
Rank 2
 answered on 19 Mar 2009
2 answers
139 views
Hi, how to set the focus into RadEditor control when the page is loaded?

Actually i tried focus method and the following code given in the documentation
. Can anybody please tel me how to set the focus for radeditor ..so that focus will be inside the radeditor when the Page is loaded ..
Thanks in advance


<
body onload="SetFocusOnTextBox();">
   
<form id="form1" runat="server">
   
<asp:ScriptManager id="ScriptManager" runat="server"/>                              
   
<telerik:radeditor runat="server" ID="RadEditor1">
       
<Content>
           
Here is sample content!
       
</Content>
   
</telerik:radeditor>
   
<input type="text" id="text"/>
   
<input type="button" value="Set Focus On RadEditor" onclick="SetFocusOnRadEditor()" />
   
<script type="text/javascript">
   
function SetFocusOnRadEditor()
   {
       var editor = $find("
<%=RadEditor1.ClientID%>"); //get a reference to RadEditor client object
       editor.setFocus(); //set the focus on the the editor
   }
   function SetFocusOnTextBox()
   {
       var editor = $get("text"); //get a reference to the input textbox with id text
       editor.focus(); //set the focus on the the textbox
   }
   
</script>
   
</form>
</
body>
laila
Top achievements
Rank 1
 answered on 19 Mar 2009
1 answer
157 views
hi friends,

Export option is not working for my grid.

i am unable to find where i was done the mistake

can anybody help me.

my code is 

<

telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="100%" Width="100%">

 

 

<telerik:RadToolBar ID="RadToolBar1" Runat="server" Skin="Black" Width="100%" OnClientButtonClicked="ToolBarMenuClicked" OnButtonClick="RadToolBar1_ButtonClick">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

<Items>

 

 

<telerik:RadToolBarDropDown runat="server" Text="New">

 

 

<Buttons>

 

 

<telerik:RadToolBarButton runat="server" CommandName="UnRequestPage"

 

 

ImageUrl="~/Images/Sr_New.gif" Text="Submit Unrequested Report" Width="160px">

 

 

</telerik:RadToolBarButton>

 

 

<telerik:RadToolBarButton runat="server" CommandName="PrintGrid"

 

 

ImageUrl="~/Images/PWAPrint.gif" Text="Print Grid" Width="160px">

 

 

</telerik:RadToolBarButton>

 

 

<telerik:RadToolBarButton runat="server" CommandName="ExportToExcel"

 

 

ImageUrl="~/Images/PWAExcel.gif" Text="Export To Excel" Width="160px">

 

 

</telerik:RadToolBarButton>

 

 

</Buttons>

 

 

</telerik:RadToolBarDropDown>

 

 

<telerik:RadToolBarDropDown runat="server" Text="Actions">

 

 

<Buttons>

 

 

<telerik:RadToolBarButton runat="server" CommandName="SR_Archive"

 

 

Text="Status Report: Archive">

 

 

</telerik:RadToolBarButton>

 

 

</Buttons>

 

 

</telerik:RadToolBarDropDown>

 

 

</Items>

 

 

</telerik:RadToolBar>

 

 

<br />

 

 

<telerik:RadGrid ID="RadGridRequestLists"

 

 

runat="server" AllowPaging="True" AllowSorting="True"

 

 

onneeddatasource="RadGridRequestLists_NeedDataSource"

 

 

AutoGenerateColumns="False">

 

 

<PagerStyle Mode="NextPrevNumericAndAdvanced" />

 

 

<HeaderContextMenu>

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</HeaderContextMenu>

 

 

<ClientSettings >

 

 

<Selecting AllowRowSelect="True" />

 

 

<ClientEvents OnRowSelected="RowSelected" />

 

 

<Scrolling AllowScroll="True" />

 

 

</ClientSettings>

 

 

<ExportSettings OpenInNewWindow="true">

 

 

</ExportSettings>

 

 

<MasterTableView CommandItemDisplay="Top" Width="99.9%">

 

 

<CommandItemTemplate>

 

 

<table>

 

 

<tr>

 

 

<td>

 

 

&nbsp;</td>

 

 

<td>

 

 

<img alt="" src="Images/Sr_New.gif" /></td>

 

 

<td>

 

 

<a href="javascript:void(0)" onclick="GotoNewRequestPage()">Submit Unrequest Report</a></td>

 

 

</tr>

 

 

</table>

 

 

</CommandItemTemplate>

 

 

<Columns>

 

 

<telerik:GridBoundColumn DataField="Title" HeaderText="Title" UniqueName="Title" >

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Due To" HeaderText="Due To" UniqueName="Due To">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Due On" HeaderText="Due On" UniqueName="Due On">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<FilterMenu>

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</FilterMenu>

 

 

</telerik:RadGrid>

 

 

</telerik:RadAjaxPanel>

 

Shinu
Top achievements
Rank 2
 answered on 19 Mar 2009
1 answer
225 views
Hi guys,
I have an upload page created which makes use of a RadUpload control, however I would like to implement a Captcha security image. I am using the .NET component plugin of Re-Captcha (http://recaptcha.net/).

It's an excellent control, but is there anyway to use this with RadUpload? I'd like some kind of captcha image verified before files are uploaded so I know this is not some bot script.
DGDev
Top achievements
Rank 2
 answered on 19 Mar 2009
2 answers
69 views
Hi,

I have a pager tamplate and there is  a dropdown in it.
some times the dropdown change event is not working..  i have the pager positioned on top and bottom.. when i chane the value in drop down it justs changes the value but not refreshes the grid..
below is my code please help


                 <PagerTemplate>
                                                 <span style="float: left;color:#333333">&nbsp;Total keywords:&nbsp;
                                                    <%# DataBinder.Eval(Container, "Paging.DataSourceCount")%></span>
                                                    <div id="pager">
                                                        <asp:Panel ID="PagerPanel" runat="server">
                                                        <div class="paginationdiv" >
                                                        <span style="position:relative;top:-2px;">Display per page</span>
                                                       <asp:DropDownList class="select" Width="50px" ID="ddlPageSize"  SelectedValue='<%# ((Telerik.Web.UI.GridPagerItem)Container).OwnerTableView.PageSize %>' runat="server" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
                                                            <asp:ListItem Value="25"  Text="25"/>
                                                            <asp:ListItem Value="50"  Text="50"/>
                                                             <asp:ListItem Value="100"  Text="100"/>
                                                        </asp:DropDownList>
                                                       </div>
                                                    <div class="nextprevious">
                                <asp:LinkButton  ID="btnPrevious"  style="float:left;margin-right:10px;margin-left:10px" Text="<< Previous" runat="server" OnClientClick="changePageForReport('prev'); return false;"
                                CommandName="Page" CommandArgument="Prev" ></asp:LinkButton>
                                    <asp:Panel runat="server" ID="NumericPagerPlaceHolder" CssClass="pagination" > </asp:Panel> 
                                <asp:LinkButton ID="btnNext" Text="Next >>" style="float:left;margin-left:10px" runat="server" OnClientClick="changePageForReport('next'); return false;"
                                CommandName="Page"  CommandArgument="Next" ></asp:LinkButton>   
                                </div>  
                                           </div>  </asp:Panel>
                             </PagerTemplate>



  protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
        {
               grdKipKeywords.Rebind();
        }
Krishna
Top achievements
Rank 1
 answered on 19 Mar 2009
2 answers
104 views
Hi:

I have a Rad Rotator inside a <td> tag.  I can style the <td> inline with no adverse effect on the rotator:

 

<td style="background-color:White;font-family:Arial;font-size:11px;font-weight:bold;color:#192b11;text-align:left;text-decoration:none;text-indent:2px;width:100%;padding-top:2px;padding-bottom:2px;border-bottom:1px solid #cccccc;"> 

 

<telerik:RadRotator ID="RRtr" RotatorType="automaticadvance" Height="100px" Width="130px" ScrollDirection="Up" FrameDuration="6000" ItemHeight="90px" ItemWidth="130px" runat="server"> 

 

<Items>

 

<telerik:RadRotatorItem> 

 

<ItemTemplate> 

 

<asp:Image runat="server" ID="Image" ImageUrl='~/Images/FlagCA.png' Width="130px" height="50px" AlternateText="Customer Image" /> 

 

</ItemTemplate> 

 

</telerik:RadRotatorItem> 

 

<telerik:RadRotatorItem> 

 

<ItemTemplate> 

 

<asp:Image runat="server" ID="Image" ImageUrl='~/Images/FlagUS.png' Width="130px" height="50px" AlternateText="Customer Image" /> 

 

</ItemTemplate> 

 

</telerik:RadRotatorItem> 

 

</Items> 

 

</telerik:RadRotator> 

 

</td>

 

 

The above works perfectly. However, if I were to remove the style from the td tag and place it inside an external stylesheet like so:

 

<td class="rc_adTdItems"> 

 

<telerik:RadRotator ID="RRtr" RotatorType="automaticadvance" Height="100px" Width="130px" ScrollDirection="Up" FrameDuration="6000" ItemHeight="90px" ItemWidth="130px" runat="server"> 

 

<Items> 

 

<telerik:RadRotatorItem> 

 

<ItemTemplate> 

 

<asp:Image runat="server" ID="Image" ImageUrl='~/Images/FlagCA.png' Width="130px" height="50px" AlternateText="Customer Image" /> 

 

</ItemTemplate> 

 

</telerik:RadRotatorItem> 

 

<telerik:RadRotatorItem>

 

<ItemTemplate> 

 

<asp:Image runat="server" ID="Image" ImageUrl='~/Images/FlagUS.png' Width="130px" height="50px" AlternateText="Customer Image" />

 

</ItemTemplate>

 

</telerik:RadRotatorItem>

 

</Items>

 

</telerik:RadRotator>  

 

</td>

 

 

.rc_adTdItems

{

background-color:White; 

 

font-family:Arial, Helvetica, sans-serif; 

 

font-size:11px;

 

 

 

font-weight:bold;

 

 

 

color:#192b11;  

 

text-align:left; 

 

text-decoration:none; 

 

 

 

text-indent:2px; 

 

 

 

width:100%; 

 

 

 

padding-top:2px;

 

 

 

padding-bottom:2px;  

 

border-bottom:1px solid #cccccc;  

}

 



Now, I've got arrow showing up on all sides of the Rotator - and I just couldn't get rid of them.  This is most irregular and I'm wondering if anyone has seen this before and knows how to resolve this.

Thanks!
JustinWong
Top achievements
Rank 1
 answered on 18 Mar 2009
4 answers
137 views
Hello,

I am new at programming. I want to email the value of the item selected in RadSlider.

The RadSlider looks like this:
 <telerik:RadSlider ID="RadSlider1" runat="server" ItemType="Item" Skin="WebBlue"  
                 Width="717px" Height="66px" 
             OnClientValueChange="UpdateVisibleSlide" OnClientLoaded="UpdateVisibleSlide" 
              TrackPosition="TopLeft" AppendDataBoundItems="True" Length="720" > 
                <Items> 
             <telerik:RadSliderItem Text="Water" Height="100" Value="1"/> 
             <telerik:RadSliderItem Text="Fire" Value="2" /> 
             <telerik:RadSliderItem Text="Rock" Value="3"/> 
             <telerik:RadSliderItem Text="Sun"  Value="4"/> 
             <telerik:RadSliderItem Text="Earth" Value="5"/> 
             </Items>  
              </telerik:RadSlider> 

I read this forum and followed teh instrcutions in another post about how to get teh value, but it didn't work.

This is what I wrote:

 Dim mm As New MailMessage() 
        Dim slider As RadSlider = TryCast(RadSlider1.FindControl("rslider"), Telerik.Web.UI.RadSlider) 
        Dim value As Integer = slider.Value 
        Dim routsegid As String = slider.Items(value).Value.ToString() 
        'Assign the MailMessage's properties 
        mm.Subject = "Contact Form" 
       mm.IsBodyHtml = False 
        mm.Body = "The following enquiry has been received from the web on " & DateTime.Now.ToString("D") & ":" & vbCrLf & vbCrLf & _ 
   "Product: " & (slider.Items(value).Value.ToString()) & vbCrLf & vbCrLf & 
              
        Dim smtp As New SmtpClient 

The error is saying that
Line 31:         Dim value As Integer = slider.Value
System.NullReferenceException: Object reference not set to an instance of an object.
Please help me make this work. It is probably something simple, but as I said, I am a beginner at this.

Best,

Brent.






Brent
Top achievements
Rank 1
 answered on 18 Mar 2009
0 answers
271 views
**** Disregard, I've found the issue:  The asmx page was not pointing to the correct class.******

I can't get your combo to populate from web service and the error message is useless.  It does not even appear to call the webmethod. 

ascx
<telerik:RadComboBox ID="rcbRevenueType" EnableVirtualScrolling="true" EnableViewState="false" 
                        AllowCustomText="true" ShowMoreResultsBox="false" ShowToggleImage="true" EnableItemCaching="true" 
                        MaxHeight="150px" MarkFirstMatch="True" ChangeTextOnKeyBoardNavigation="true" EnableScreenBoundaryDetection="true" 
                        EnableTextSelection="true" ShowDropDownOnTextboxClick="true" ShowWhileLoading="true" 
                        runat="server" EnableLoadOnDemand="true" EnableEmbeddedSkins="false" Skin="CienaComboBox" 
                        Width="200px">  
                        <CollapseAnimation Duration="200" Type="OutQuint" /> 
                        <WebServiceSettings Path="~/DataLookupService.asmx" Method="GetAllRevenueTypes" /> 
                    </telerik:RadComboBox> 


asmx.cs
[WebMethod]  
        public RadComboBoxData GetAllRevenueTypes(RadComboBoxContext context)  
        {  
            LookupDAO lookup = new LookupDAO();  
            DataTable dt = lookup.GetActiveRevenueTypesDT();  
            DataView dv = dt.DefaultView;  
            dv.Sort = "Name ASC";  
            return FormatItems(dv, context, "Name", "RevenueType_ID", 8);  
 
        }  
 
        public RadComboBoxData FormatItems(DataView dv, RadComboBoxContext context, string text, string value, int requestcount)  
        {  
            List<RadComboBoxItemData> result = null;  
            // Create a RadComboBoxData object to pass virtual scrolling information  
            RadComboBoxData comboData = new RadComboBoxData();  
            // calculate the number of records we need  
            // based on the current number of items  
            int itemsPerRequest = requestcount;  
            int itemOffset = context.NumberOfItems;  
            int endOffset = itemOffset + itemsPerRequest;  
            // adjust endOffset if there are not enough rows  
            if (endOffset > dv.Count)  
            {  
                endOffset = dv.Count;  
            }  
            // set EndOfItems to reflect whether we are supplying the last items  
            if (endOffset == dv.Count)  
            {  
                comboData.EndOfItems = true;  
            }  
            else  
            {  
                comboData.EndOfItems = false;  
            }  
            // create the list to hold the items we will return  
            result = new List<RadComboBoxItemData>(endOffset - itemOffset);  
            // iterate through the rows of the table, creating and adding items  
            for (int i = itemOffset; i < endOffset; i++)  
            {  
                RadComboBoxItemData itemData = new RadComboBoxItemData();  
                itemData.Text = dv[i][text].ToString();  
                itemData.Value = dv[i][value].ToString();  
                result.Add(itemData);  
            }  
            comboData.Items = result.ToArray();  
            return comboData;  
 
        } 
Dave
Top achievements
Rank 1
 asked on 18 Mar 2009
2 answers
129 views
Hello,

Is $find limited to RadControls?  I've attempted to $find two other non-telerik page elements, a standard asp:HiddenField and an iframe with runat=server.  I'm using controlId.ClientId and both of them have returned null.

Thanks
-Noah
Noah
Top achievements
Rank 2
 answered on 18 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?