Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
68 views
I am not a user of Telerik controls but I have been asked to find the answer to the following question......

We have a combo box that is passed a name. We want to retrieve from an MSSQL database the name passed plus the next 100 names (either before or after the input name). We also want to be able to navigate forward and backward through the list of names.

For example......
Suppose the database has the 300 names with name number 100 being Allan, name number 200 being King, and name number 300 being Zion.
Suppose I pass in the name King, I would expect the list to start with the name King and end with the name Zion (100 entries after King). If I were to use the down arrow I would expect to add the next 100 names from Zion onward (assuming there are more names) to the list.

Now suppose I pass in the name King, I would expect the list to start with the name King and end with the name Zion (100 entries from King to Zion). If I were to use the up arrow I would expect to add the names from Allan to King in the list (the 100 name preceeding King).

Can anyone tell me is this possible to do with Telerik Controls. I would not ask for a code snippit but some indicaiton of how it would be done would be helpful. Please understand I do not use Telerik controls, I am just trying to gather the information.
Steve Heidel
Top achievements
Rank 1
 asked on 04 Sep 2009
6 answers
290 views
Hi there,

The project I am working on has licensed teleric control suite. I am looking at making the RadGrid keep expanded rows expanded whilst using simple binding (i.e. not NeedDataSource event).

Is this possible?

Or do I need to stick to advanced data binding?

Thanks in advance,
Ron
Nicolaï
Top achievements
Rank 2
 answered on 04 Sep 2009
2 answers
253 views
Hi,

I have  a drop down and a rad combo box.  While running the application, I go into edit mode, click on the drop down and change the selected value.  I then click on the "update" link next to the line.  

I get the handle on the dropdown list or rad combo box in UpdateCommand event, but when I examine the SelectedValue, it is still the same as before.  How can I access the changed value in this case?  What am I missing?

Thanks.

Suresh

Here is the code I am using:

 

<telerik:GridTemplateColumn DataField="CostCenterName" HeaderText="Adj Cost Center Name" UniqueName="CostCenterName">

 

 

<ItemTemplate>

 

<%

#DataBinder.Eval(Container.DataItem, "CostCenterName")%>

 

 

</ItemTemplate>

 

 

<ItemStyle Width="300px" />

 

 

<EditItemTemplate>

 

 

<telerik:RadComboBox DataTextField="CostCenterName"

 

 

DataValueField="CostCenterName"

 

 

OnTextChanged="RadComboBoxAdjustedCC_TextChanged"

 

 

OnItemsRequested="RadComboBoxAdjustedCC_ItemsRequested"

 

 

EnableLoadOnDemand="True"

 

 

ID="RadComboBoxAdjustedCC"

 

 

runat="server"

 

 

Height="140px"

 

 

Width="220px"

 

 

SelectedValue='<%#Bind("CostCenterName")%>'

 

 

DataSourceID="ObjectDataSourceGetCostCenters">

 

 

</telerik:RadComboBox>

 

 

</EditItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn DataField="Site" HeaderText="Site" UniqueName="Site">

 

 

<ItemTemplate>

 

<%

#DataBinder.Eval(Container.DataItem, "Site")%>

 

 

</ItemTemplate>

 

 

<EditItemTemplate>

 

 

<asp:DropDownList ID="DropDownListSite" runat="server"

 

 

SelectedValue='<%#DataBinder.Eval(Container.DataItem, "Site")%>' >

 

 

<asp:ListItem Value="C">BAH</asp:ListItem>

 

 

<asp:ListItem Value="G">Govt.</asp:ListItem>

 

 

</asp:DropDownList>

 

 

</EditItemTemplate>

 

 

</telerik:GridTemplateColumn>

 


VB Code: 

 

Protected Sub RadGridEmpData_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGridEmpData.UpdateCommand

 

 

Dim s As String

 

s =

""

 

 

Dim objDDL As DropDownList

 

objDDL =

CType(e.Item.FindControl("DropDownListSite"), DropDownList)

 

s = objDDL.SelectedValue

 

Dim objRComb As RadComboBox

 

objRComb = e.Item.FindControl(

"RadComboBoxAdjustedCC")

 

s = objRComb.SelectedValue

 

 

End Sub

 


Suresh Mishra
Top achievements
Rank 1
 answered on 04 Sep 2009
0 answers
167 views
 


 Hello,
I am using RadGrid version 2008.2.826.20.
I am trying to update the record with 'InPlace' editmode. I have following two problems:
1) I want to show Record updated or Inserted message on top of the page instead of adding control in Radgrid. Therefor, I am using label control and once the record is updated trying to show it. With all surprise it assigns the text to label but label doesn't showup!
2) RadAjxLoadingPanel doesn't show up so, as a workaround I set the EnableAJAXLoadingTemplate="true". 

 

Now loading icon comes up but not as shown as on Telerik site. It's not over the grid nor grid becomes transparent. In the grid's box all records disappears and only loading icon shows.

Any ideas?

<radG:RadGrid ID="RGChoiceItems" allowMultiRowEdit="True" AllowMultiRowSelection="True" Skin="Office2007" EnableAJAXLoadingTemplate="true"   
                                    GridLines="None" EnableAJAX="true" runat="server"  AutoGenerateColumns="False" Width="900">  
                                    <HeaderStyle CssClass="BVSmallText" Font-Bold="True" /> 
                                    <ItemStyle CssClass="ItemStyle" VerticalAlign="Top" /> 
                                    <AlternatingItemStyle CssClass="AlternateItemStyle" VerticalAlign="Top"/>  
                                    <PagerStyle Mode="NextPrevAndNumeric" /> 
                                    <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" EditMode="InPlace" DataKeyNames="Id" HorizontalAlign="NotSet" > 
                                        <Columns> 
<radG:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" UpdateImageUrl="~\RadControls\Grid\Skins\Update.gif" 
                                               EditImageUrl="~\RadControls\Grid\Skins\Edit.gif" InsertImageUrl="~\RadControls\Grid\Skins\Update.gif" CancelImageUrl="~\RadControls\Grid\Skins\Cancel.gif">  
                                               <ItemStyle CssClass="MyImageButton" />                                             
                                            </radG:GridEditCommandColumn> 
                                              
                                            <radG:GridBoundColumn HeaderText="Display Text" UniqueName="Text" MaxLength="50" DataField="DisplayText">  
                                                 <ItemStyle HorizontalAlign="Left" /> 
                                                 <HeaderStyle HorizontalAlign="Left" /> 
                                            </radG:GridBoundColumn> 
 </Columns>                   
                                                                      
                                 </MasterTableView> 
                             </radG:RadGrid>    
 
<radA:RadAjaxManager ID="radManager" runat="server" > 
                           <AjaxSettings> 
                                   <radA:AjaxSetting AjaxControlID="RGChoiceItems">  
                                    <UpdatedControls> 
                                        <radA:AjaxUpdatedControl ControlID="WebpageMessageHolder" LoadingPanelID="RadLoadingPanel1"/>               
                                        <radA:AjaxUpdatedControl ControlID="RGChoiceItems"/>                                          
                                    </UpdatedControls> 
                               </radA:AjaxSetting> 
                                
                          </AjaxSettings> 
                        </radA:RadAjaxManager>   
 
                        <radA:AjaxLoadingPanel ID="RadLoadingPanel1" style="width: 300px; height: 300px; background-color: #DCDCDC;" runat="server" Transparency="5" IsSticky="true">  
                              <asp:Image ID="imgUpdating" runat="server" AlternateText="Updating..."  />    
                        </radA:AjaxLoadingPanel>  

 

K
Top achievements
Rank 1
 asked on 04 Sep 2009
2 answers
311 views
The Editor's Indent/Outdent feature is a crime against HTML, as has been discussed before in this forum.

I'm trying to fix this myself and would like some help coming up with a solution that anyone using RadEditor can implement.


The Problem:
The Indent button simply wraps the selected elements in a <blockquote> tag. In most web browsers, this looks like you're indenting the text. However, those of us that respect HTML know well that the blockquote element is intended for quoting other people's text, not indenting.

To a screen reader for the blind, a search engine or any other semantic parser of HTML, using a blockquote tag has a much different meaning than indenting.


The Solution:
Personally, I approach indenting a section of content by wrapping it in a <div> with a margin-left style applied to it. I create a CSS class called "indent" for that purpose.

Others might add a margin-left to each element to be indented, rather than wrapping the section.


Achieving the Solution in RadEditor:
Here's where I'm stuck.

Approach #1:
My preferred approach is to obtain an array of the DOM elements selected in the Editor. That way, I can simply add a <div> before the first element and make the selected elements children of the indention <div>.

The problem: I don't know how to retrieve an array of the selected elements. editor.getSelectedElement() gives me the last of the selected elements but there's no editor.getAllSelectedElements(). If more than one line of text is selected, editor.getSelectedElement() will not work.


Approach #2:
Another approach is editing the HTML as a string. editor.getSelection().getHtml() gives me all the HTML that is selected in the Editor. editor.pasteHTML() puts the modified HTML back. Like approach #1, wrapping the HTML in <div> tags could achieve the desired result.

The problem: If the opening or closing <p> tag is not part of the selection (i.e. partial line selected), the resulting <div>-wrapped HTML is malformed.

This might work if I had a way to read ahead to the closing tag and read behind to the opening tag. But I haven't found an obvious way to do this.


Does anyone have any ideas on solving approach #1 or #2? How about a different approach that I haven't considered?

I appreciate your input.

Jeff
Jeff
Top achievements
Rank 1
 answered on 04 Sep 2009
1 answer
112 views
OK, here's the situation.  I have a RadGrid with paging enabled.  I am using a custom user control for adding new records.  So while the user is adding a new record, he or she wants to page through the existing records.  When this is done they lose any data they have already entered.  My question is: Is there any way to just alert the user that paging or navigating away will cause them to lose any data they have already entered?

Any help is greatly appreciated.

Thank you,
Nick
Schlurk
Top achievements
Rank 2
 answered on 04 Sep 2009
3 answers
150 views
Hi,

I have Scheduler with WebService as data binding method, and I'm trying to lanuch advance form directly without the in-line editor for appointment insertion.   

I modified the Live Demo "Scheduler\WebService\DefaultVB.aspx" to add the StartInsertingInAdvancedForm="true",  but the in-line editor still cannot be disabled after double clicking the idle timeslot

It's ok if other type of data binding except web service.

Please advise.
Wilson
T. Tsonev
Telerik team
 answered on 04 Sep 2009
1 answer
124 views
Hi,

I have been trying to do this for a while and cant seem to get the grid to do what im after (im not sure if it is possable) so thought it was worth asking to see if you guys think its possable

I have a rad grid showing pivot data (1 row per year and a column per month) I have managed to get the whole grid into edit mode but what I really want to do is leave all the dates prior to today as normal grid cells (with the original formatting) then for the periods in the future I want to have a text box (some blank some with values depending on the data table)

Do you think it is possibe? if it is any suggestions how I would achive it?

Many thanks in advance
Schlurk
Top achievements
Rank 2
 answered on 04 Sep 2009
3 answers
288 views

Hi,

I can't seem to reference my textbox from my javascript.

on the aspx:

        <asp:ScriptManager ID="ScriptManager1" runat="server"  EnablePartialRendering="True" EnablePageMethods="True">  
            <Scripts> 
                <asp:ScriptReference Path="scripts.js" /> 
            </Scripts> 
        </asp:ScriptManager> 
          
          
        <table cellpadding="0" cellspacing="0">  
            <tr> 
                <td width="80%">  
<%--                            <asp:textbox runat="server" TextMode="MultiLine" id="txt" style="WIDTH: 690px; HEIGHT: 260px" rows="16" Columns="79" ></asp:textbox>&nbsp;  
--%>                    <telerik:RadTextBox ID="txt" Width="690" Height="260" Rows = "16" Columns = "79" runat="server" TextMode="MultiLine" SelectionOnFocus="CaretToEnd"></telerik:RadTextBox><br /> 
                   <asp:TextBox id="txtMsg" Width="400" Runat="server"></asp:TextBox>&nbsp;&nbsp; <input id="btn" onclick="button_clicked()" type="button" value="SEND" class="btn"/>  
                </td> 

script:

            function button_clicked()  
            {  
                var RadTextBox = $find("<%= txt.ClientID %>");  
                if (RadTextBox == null) {  
                    var b = bla;  
                }  
                PageMethods.SendMessage($get("txtMsg").value,$get("hdnRoomID").value,UpdateMessages, errorCallback);  
                $get("txtMsg").value="";  
                $get("txt").scrollIntoView("true");  
            } 

RadTextBox is null..

Any idea what I did wrong?

Thanks,

Andreas
Pavlina
Telerik team
 answered on 04 Sep 2009
2 answers
104 views
I have the following code and it does not work, please can anyone help?

    <script type="text/javascript">  
        function test() {  
            alert("hello");  
        }  
    </script> 
 
        <telerik:RadEditor ID="RadEditor1" runat="server" OnClientPasteHtml="test">  
            <Content> 
            </Content> 
        </telerik:RadEditor> 

Thanks
Richard
Top achievements
Rank 2
 answered on 04 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?