Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
390 views

In my application I have the auto complete like textbox option with Listbox. If I type a word in the text box it should select appropriate list item in the list box. And also if select a list box item, the selected value to be reflected in the text box.

Here everything is working fine except that if I key on the some filter character, the typed characters are repeating twise in the textbox.

And Keyboard navigation is not working for Up/Down arrow keys after the user keyed in the textbox.

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
Search: 
<telerik:RadTextBox ID="RadTextBox1" 
    ClientEvents-OnKeyPress="filterListBox" SelectionOnFocus="SelectAll"runat="server">
</telerik:RadTextBox>
<telerik:RadListBox ID="RadListBox1" runat="server" Sort="Ascending"

OnClientSelectedIndexChanged

 

="GetProgramName" >

 

        <Items>
                <telerik:RadListBoxItem
                    Text="Kansas"
                    Value="KS" />
        <telerik:RadListBoxItem
                    Text="Kentucky"
                    Value="KY" />                    
                <telerik:RadListBoxItem
                    Text="Texas"
                    Value="TX" />
                <telerik:RadListBoxItem
                    Text="Missouri"
                    Value="MO" />
                <telerik:RadListBoxItem
                    Text="Nebraska"
                    Value="NE" />
                <telerik:RadListBoxItem
                    Text="Neubraska"
                    Value="N1E" />                                        
                <telerik:RadListBoxItem
                    Text="New Mexico"
                    Value="NM" />
                <telerik:RadListBoxItem
                    Text="Oklahoma"
                    Value="OK" />
                <telerik:RadListBoxItem
                    Text="Arizona"
                    Value="AZ" />
                <telerik:RadListBoxItem
                    Text="South Dakota"
                    Value="SD" />
                <telerik:RadListBoxItem
                    Text="Colorado"
                    Value="CO" />
                <telerik:RadListBoxItem
                    Text="Iowa"
                    Value="IA" />
  
                <telerik:RadListBoxItem
                    Text="Illinois"
                    Value="IL" />
          
            </Items>    
</telerik:RadListBox>
    </div>
     
<script type="text/javascript">
 

function

 

filterListBox(sender, e) {

 

 

var list = $find("ctl00_Content_lstSelectPgm");

 

 

var searchText = sender.get_value() + e.get_keyCharacter();

 

 

var items = list.get_items();

 

 

for (var i = 0; i < items.get_count(); i++) {

 

 

var item = items.getItem(i);

 

 

var SelectPrgm;

 

 

if (item.get_text().toLowerCase().startsWith(searchText.toLowerCase())) {

 

item.select();

item.ensureVisible();

item.scrollIntoView;

SelectPrgm = $find(

"ctl00_Content_txtSelectPgm")

 

SelectPrgm.set_value();

SelectPrgm.set_value(searchText);

 

break;

 

}

}

}

 

function

 

GetProgramName(sender, args) {

 

 

var SelectPrgm;

 

SelectPrgm = $find(

"ctl00_Content_txtSelectPgm")

 

SelectPrgm.set_value(

'');

 

SelectPrgm.set_value(sender.get_selectedItem().get_value())

document.getElementById(

"ctl00_Content_cmdOk").disabled = false;

 

document.getElementById(

"ctl00_Content_txtSelectPgm")

 

}

   

</script>        
    </form>
</body>
Peter Filipov
Telerik team
 answered on 29 Aug 2011
2 answers
123 views
I have a radgrid in NestedViewTemplate of a another radgrid. When main grid sorted the grid in NestedViewTemplate disappears. What may cause the loose of the data in nested grid ?
Andrey
Telerik team
 answered on 29 Aug 2011
2 answers
309 views
Hi,

I am trying to get this to work with no luck.

I have a form where users can upload many small images and I need to know which image is what, an example might be:

it has 3 radupload controls on it.

upSmallIcon
UpMedIcon
upLargeIcon

I need each one to know which db field it represents...

the form has precious little space, so what I would like to do is have an image button which might have the existing image file set to it's image url so all the user would see is the image button, when they click the image button the select file dialog appears, the user can select the file and I take it from there.

I saw this in another post.

 

 

<script type="text/javascript">

 

 

 

var $fileInput;

 

 

 

function onClientAdded(sender, args) {

 

$fileInput = $telerik.$(args._fileInputField);

}

 

 

function OpenDialog() {

 

$fileInput.click();

}

 

 

</script>

 


This code however does not work if the radupload visible is set to false. I do not want the upload control itself to be visible, just the image button. Also obviously if there was a way to use a single control that would be great as well.

Any and all help would be greatly appreciated because this app I am working on has this type of thing all over the place in it.

Thanks ahead of time.
Dimitar Terziev
Telerik team
 answered on 29 Aug 2011
1 answer
206 views
Hello,

I have a RadGrid which has a skin of WebBlue. I have turned the EnableHoverStyle on and the AllowRowSelect is also True.
How can I make the selected row style the same as the highlighted row style?
I know I can edit the Selected row style manually but I just want it to be exactly the same as the hover style.

Thank You
Shinu
Top achievements
Rank 2
 answered on 29 Aug 2011
3 answers
142 views
So I have a radgrid with a master table view and within that a details view for each index in the master table view. What i want to do is export just the master table view without the details. and also export the details with just the relationship key linking back to the index it is detailing for. What is the best way to do this?

-Brad
Mira
Telerik team
 answered on 29 Aug 2011
2 answers
150 views
I have a RadGrid bound to an EntityDataSource on a page that I also have a RadFilter.  If I press enter when focus is in one of the RadFilter input fields, it causes the grid to trigger an export in whichever format is first in the CommandItemSettings.  I've tried disabling enter with this method - http://www.telerik.com/help/aspnet-ajax/grid-cancel-enter-arrow-keypress.html on the RadGrid and it didn't help.  The RadFilter doesn't have the same events, so I couldn't add it there.  It also makes no difference if I position the CommandItem at the top or bottom.  This is with the RadFilter positioned below the RadGrid.
Nikita Gourme
Top achievements
Rank 1
 answered on 29 Aug 2011
6 answers
245 views
Hello,

I have a line chart which uses different PointMark Figures (Cross, Star etc.) depending on what lines are displayed from a custom list.  However, on the legend I always get a circle as the icon.  How can I set the legend to show the PointMark Figure set on the appropriate line?

I have read about setting the Appearance.FillStyle.FillSettings.BackgroundImage property, but the PointMark Figures are accessed by string and are as far as I can tell not static images.

Thanks in advance.
Evgenia
Telerik team
 answered on 29 Aug 2011
3 answers
115 views
Hi,

I am using the Telerik version of 2010.1.415.35 in my application with .Net framework 3.5 and VS2010.

I am facing problems with design of one of my user control. I am not able to see any controls in the control's design. If I replace this
Telerik.Web.UI.dll with other version of 2008 or 2011 then it shows the complete design correctly.

I am not able to get why this problem is occurring and even if its coming up then why not for any other page or control.

Please let me know any solution to this.

Thanks.

Sebastian
Telerik team
 answered on 29 Aug 2011
1 answer
198 views
Hi,

My radgrid has skin = "Black" I want to change the font color of the item when a row is selected. How to do?

Thanks,
Aradhya
Shinu
Top achievements
Rank 2
 answered on 29 Aug 2011
6 answers
183 views
Hi can anyone tell me how to implement google like filtering for gridboundcolumn's are using filtertemplate
i found an example which is similar to my requirement click here

i want to use common method and javascript and want to filter the record based on filter column selected, in above example its filtering for only 1 column [ City dropdown]. i want to use same concept for all the bound columns
Hiren
Top achievements
Rank 1
 answered on 29 Aug 2011
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?