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

I am using RadComboBox in my application, but when I run this application and treid to select non selected combobox item then it will not allow to select.

Here is sample code.

<rad:RadComboBox ID="RadComboBox1" runat="server">
                   <Items>
                       <rad:RadComboBoxItem runat="server" Text="A" Value="1" />
                       <rad:RadComboBoxItem runat="server" Text="B" Value="2" />
                       <rad:RadComboBoxItem runat="server" Text="C" Value="3" />
                   </Items>
               </rad:RadComboBox>

Please find attached snap with is thread.I am not able to select Item other than A.

Thanks in advance.
Dimitar Terziev
Telerik team
 answered on 28 Mar 2012
4 answers
147 views
First div tag gets reformatted on save. 

Original Code:
<
div class="main-block comparison" id="comparison">
   <div class="main-frame">
    <div class="left-col">
         <h2>Product Comparison</h2>
         <p>Quisque commodo hendrerit lorem quis egestas. Maecenas quis tortor arcu.  </p>
    </div>
    <div class="right-col">
        <div class="image-holder"> <img src="_themes/v2/images/img.png" alt="" /></div>
        <a href="#" class="launch-btn"><span>Click to Launch Comparison Tool</span></a>
   </div>
 </div>
</div>

And it gets reformatted as:
<div class="main-block"> 

I tried adding StripFormattingOptions="noneSupressCleanMessage" and ConvertToXhtml="false"
to see if that made a difference. 

Telerik dll version: 2011.3.1115.40
Rumen
Telerik team
 answered on 28 Mar 2012
6 answers
167 views
Hello,

I am currently trying to have a LinkButton be the default button in my application. While on RadPageView1 I would like the LinkButton's OnClick event be fired when the Enter key is pressed. If the RadPageView had a property like DefaultButton this would be easy. If it does have this property, I can't find it. If it doesn't have it, I think that it would be a good feature to add to the RadPageView.

Thanks,
Casey
Kate
Telerik team
 answered on 28 Mar 2012
3 answers
96 views
Hi,
I have insert a CheckTreeView Asp. Net in Window, when i postback the CheckedNodes.Count is always 0.
Why ?

Thanks
Plamen
Telerik team
 answered on 28 Mar 2012
1 answer
160 views
Hi all!

I'm currently prototyping a 'Telerik' version of a suite of tools I created for the administration of our application's database.  It's ticking all the boxes as far as interactivity on the frontend goes and I want to show that it's a viable option for replacing some of our older vanilla ASP.NET 2.0 tools.

One of the tools in question allows a user to copy a list of values (in some instances GUIDs, others just simple integers) in to a textbox (1 value per line) and send that to the Datasource for filtering on.  This is then displayed in a vanilla ASP.NET GridView.

For example, a user may fill in the filter box like this:

IDs
====
1156
785636
72889

...and the system will return entities with those IDs.

I run the contents of those various textboxes through a splitter and sanitizer (essentially a set of RegExs to ensure there's no errors or injection attempts) before submission, but the only way I've been able to get that list to the DB is by using a String.Replace on the SELECT code in the Datasource before it refreshes, which puts the list of values into an IN clause.  I hate this because it feels like a hack and stops me using SPROCs for my Datasource, but it does work.

I've read in one Google result that a nice way of doing this is to somehow convert the Textbox contents into a CSV or XML file and submit it that way, but it doesn't seem to help with the overall complexity of the code and it doesn't make use of anything that Telerik provides over and above vanilla ASP.NET.

Does anybody know how I might go about doing this in a more 'proper' fashion using any functionality that Telerik provides?  Am I best off trying to perform the same hack, or have any of you managed to make such a filter in a smoother way?
Tsvetina
Telerik team
 answered on 28 Mar 2012
1 answer
94 views
Hi,

I am trying to set the position of Filter textbox in my grid by javascript. On first keypress in filter textbox everything works fine, but from second time onwards i am getting an error htmlfile: Could not complete the operation due to error 800a025e.

My Code is:
Grid
<telerik:RadGrid ID="RadGridSpeciality" runat="server" CellSpacing="0" GridLines="None"
    AllowFilteringByColumn="true" EnableLinqExpressions="true">
    <ClientSettings>
        <Selecting CellSelectionMode="None"></Selecting>
    </ClientSettings>
    <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top">
        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridBoundColumn FilterControlAltText="Filter SlNo column" HeaderText="Sl No"
                UniqueName="SlNo" DataField="SlNo">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn FilterControlAltText="Filter Code column" HeaderText="Code"
                UniqueName="Code" DataField="Code" AutoPostBackOnFilter="true">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn FilterControlAltText="Filter Name column" HeaderText="Name"
                UniqueName="Name" DataField="Name">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn FilterControlAltText="Filter No Of Doctor column" HeaderText="NoOfDoctor"
                UniqueName="NoOf" DataField="NoOfDoctor">
            </telerik:GridBoundColumn>
        </Columns>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
</telerik:RadGrid>

ItemCreated

Private Sub RadGridSpeciality_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGridSpeciality.ItemCreated
       If TypeOf e.Item Is GridFilteringItem Then
           Dim FilterItm As GridFilteringItem = TryCast(e.Item, GridFilteringItem)
           For Each column As GridColumn In RadGridSpeciality.Columns
               Dim filterBox As TextBox = TryCast(FilterItm(column.UniqueName).Controls(0), TextBox)
               filterBox.Attributes.Add("Onkeyup", "dofilter(this,event,1);")
               If hfUniqueName.Value <> "" Then
                   If hfUniqueName.Value = column.UniqueName Then
                       ScriptManager.RegisterStartupScript(Me, Me.GetType(), "starScript", "setCursorToEnd('" & filterBox.ClientID & "','" & hfValue.Value & "');", True)
                   End If
               End If
           Next
       End If
   End Sub

AjaxRequest

Private Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
        If e.Argument <> "" Then
            RadGridSpeciality.MasterTableView.FilterExpression = "(Code.Contains(""" & e.Argument & """))" '"([Code] <>'')"
            '"([Code] LIKE \'%" & e.Argument & "%'\)"
            hfValue.Value = e.Argument
            hfUniqueName.Value = "Code"
            RadGridSpeciality.Rebind()
            Return
        End If
    End Sub


Script

function dofilter(sender, eventArgs, index) {
                eventArgs.cancelBubble = true;
                eventArgs.returnValue = false;
                if (eventArgs.stopPropagation) {
                    eventArgs.stopPropagation();
                    eventArgs.preventDefault();
                }
                var masterTableView = $find("<%= RadGridSpeciality.ClientID %>").get_masterTableView();
                var columns = masterTableView.get_columns();
                uniqueName = columns[index].get_uniqueName();
                var filterval = sender.value;
                if (filterval != '') {
                    $find("<%=RadAjaxManager1.ClientID %>").ajaxRequest(filterval);
                }
                return true;
            }

function setCursorToEnd(txtboxFilter, Val) {
                document.getElementById(txtboxFilter).value = Val;
                var txtFilter = document.getElementById(txtboxFilter);
                if (txtFilter != null && txtFilter.value.length > 0) {
                    if (txtFilter.createTextRange) {
                        var FieldRange = txtFilter.createTextRange();
                        FieldRange.moveStart('character', txtFilter.value.length);
                        FieldRange.collapse();
                        FieldRange.select(); //Error comes here
                    }
                }
            }


Thnx in advance
BabaYa
Top achievements
Rank 1
 answered on 28 Mar 2012
7 answers
644 views
Hi,

I am trying to filter my gridview in onkeypress of the filter textbox.My mastertabelview dataitems returns zero and my sender.value is empty string.I got this code from a post here,but its not working.


Help me..

Thnx in advance

My code is:

Private Sub RadGridSpeciality_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGridSpeciality.ItemCreated
        If Not Page.IsPostBack Then
            If TypeOf e.Item Is GridFilteringItem Then
                Dim fltItem As GridFilteringItem = TryCast(e.Item, GridFilteringItem)
                For Each column As GridColumn In RadGridSpeciality.Columns
                    Dim box As TextBox = TryCast(fltItem(column.UniqueName).Controls(0), TextBox)
                    box.Attributes.Add("onkeypress", "doFilter(this,event)")
                Next
            End If
        End If
    End Sub
function doFilter(sender, eventArgs) {
                    eventArgs.cancelBubble = true;
                    eventArgs.returnValue = false;
                    if (eventArgs.stopPropagation) {
                        eventArgs.stopPropagation();
                        eventArgs.preventDefault();
                    }
                    var masterTableView = $find("<%= RadGridSpeciality.ClientID %>").get_masterTableView();
                    var index = sender.parentNode.cellIndex; //index of the current column
                    var columns = masterTableView.get_columns();
                    uniqueName = columns[index].get_uniqueName();
                    masterTableView.filter(uniqueName, sender.value, Telerik.Web.UI.GridFilterFunction.Contains);
                }
Andrey
Telerik team
 answered on 28 Mar 2012
0 answers
73 views
Hello ,

I want the  radgrid ,grouped by employee it also include checkbox in front of grouped employee for bulk approve.
there is plus sign in front of employee to open and see the application made by that employee.
Please suggest me how do I show the application after plus sign opens from grouped employee.

Thanks.
Amit
Top achievements
Rank 1
 asked on 28 Mar 2012
1 answer
59 views
Does RadEditor controls collection contain a control that is sub-classed from a a TextBox control?
If yes, then how would I get this control on server-side using RadEditor instance?

Thanks
Sunil
Rumen
Telerik team
 answered on 28 Mar 2012
3 answers
310 views
Folks, Using ASP.Net Ajax Q1 2012 with VS 2010.

I am using below link as a prototype.

http://demos.telerik.com/aspnet-ajax/grid/examples/performance/linq/defaultcs.aspx

My question's are:

1) I would like to have an option just to show 1st 2000 rows or all rows in the Form based on user input. I will create a Text Box where users will enter # of rows to Show in Radgrid. if Textbox is null then show all rows.  
.
2) Possible to select rows (may be 2000 or all rows) from mutiple tables (i.e. Products and Category) based on a certain Catergory Description? Ex: I will have a Text Box in the form for users to enter Category description and based on that Text Box value, show only Radgrid rows that meets the criteria. But insert/update/deletions will be limitted to Products Table only not in Category Table. 

The soutions I am looking from LINQ to SQL,  not SQL.

Thanks

gc_0620
 
Tsvetina
Telerik team
 answered on 28 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?