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

Is there a way to set ToolTips on Ondemandnodes (RadTreeNodeData)?

Regards
Markus
Veronica
Telerik team
 answered on 28 May 2010
1 answer
103 views
Hi
Is there a way to set EnableContextMenu on Ondemand Nodes (RadTreeNodeData)

Regards
Veronica
Telerik team
 answered on 28 May 2010
3 answers
110 views
Hello!

When I expand my PanelBar it extends over my RadGrid like shown on the image. How can I fix this problem?

Thanks!

Ales
Ales Savli
Top achievements
Rank 1
 answered on 28 May 2010
1 answer
209 views
Hi

Can somebody explain for me how the FilterExpression works?

Im trying to get a simple example to work as I want it to do.

In the example I first used a FilterExpression on the SQLDataSource. First taken from a dropdownlist and then explicitly as "Login_Name='Patrik'". In both cases the filtering is working fine.

Then Im trying to do the same with the RadGrids MasterTableViews FilterExpression but it doesnt seem to work the same. Or Im not getting the syntax. How would I write the FilterExpression to do the same for me as in the SQLDataSource?

And secondly how could I get the FilterExpression to take the selection in the DropDownList?

//Mathias

Here is my code: 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
    <head id="Head1" runat="server"> 
    <title>ASP.NET Example</title> 
</head> 
<body> 
        <form id="form1" runat="server"> 
 
            <telerik:RadScriptManager runat="server"/> 
 
            <asp:DropDownList 
                id="DropDownList1" 
                runat="server" 
                AutoPostBack="True"> 
                <asp:ListItem Selected="True">Roland</asp:ListItem> 
                <asp:ListItem>Patrik</asp:ListItem> 
                <asp:ListItem>Petter</asp:ListItem> 
            </asp:DropDownList> 
 
            <asp:SqlDataSource 
                id="SqlDataSource1" 
                runat="server" 
                ConnectionString="???????" 
                SelectCommand="SELECT * FROM Sys_Users"> 
<%--                FilterExpression="Login_Name='Patrik'"> 
                <FilterParameters> 
                    <asp:ControlParameter Name="Title" ControlId="DropDownList1" PropertyName="SelectedValue"/> 
                </FilterParameters> 
--%>            </asp:SqlDataSource> 
 
            <p><telerik:RadGrid 
                id="GridView1" 
                runat="server" 
                DataSourceID="SqlDataSource1" 
                AutoGenerateColumns="False"> 
                <MasterTableView FilterExpression="([Login_Name]='Patrik')"> 
                    <Columns> 
                        <telerik:GridBoundColumn Visible="False" DataField="RecID" /> 
                        <telerik:GridBoundColumn HeaderText="First Name" DataField="F_Name" /> 
                        <telerik:GridBoundColumn HeaderText="Last Name" DataField="L_Name" /> 
                        <telerik:GridBoundColumn HeaderText="Login" DataField="Login_Name" /> 
                    </Columns> 
                </MasterTableView> 
            </telerik:RadGrid> 
 
        </form> 
    </body> 
</html> 

Nikolay Rusev
Telerik team
 answered on 28 May 2010
1 answer
93 views
Helloo!

Is there any way to create a textbox for numeric password?

Thanks
Princy
Top achievements
Rank 2
 answered on 28 May 2010
1 answer
379 views

The problem is a fairly straight foward one, or so I thought.  On the ItemDatabound event, I need to check the value of a certain column of the DataItem.  If the data starts with "PTC" then I need to change the data for that column to read "New Order" instead.  I thought I had it figured out, but it didn't work.  I am assuming it's a simple fix, if someone can take a quick look at it.  Here's the codebehind;

    Private Sub rgPoOrders_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rgPoOrders.ItemDataBound  
 
        Dim TrackURL As String 
        Dim Track As New PackageTrack  
 
        If TypeOf e.Item Is GridDataItem Then 
            Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)  
            Dim TrackNum As String = String.Empty  
            Dim SubmittedBy As String = String.Empty  
 
            'assign tracking number to variable  
            If item.OwnerTableView Is rgPoOrders.MasterTableView Then 
                TrackNum = item("cshortrmk").Text  
                SubmittedBy = item("SubmittedBy").Text  
            End If 
 
            'Get URL for tracking number  
            TrackURL = Track.Track(TrackNum)  
 
            'Set Hyperlink variable/control, and URL to hyperlink control  
            'NOTE: UPS has to open separate browser window.  
            Dim TrackButton As HyperLink = DirectCast(item("hlTrackButton").Controls(0), HyperLink)  
            TrackButton.NavigateUrl = TrackURL  
            TrackButton.Target = "_blank" 
 
            'Get Submitted by column, substitute .txt files for data  
            If SubmittedBy.StartsWith("PTC") = True Then 
                SubmittedBy = "New Order" 
            End If 
 
        End If 
    End Sub 

Grid .aspx code:
<telerik:RadGrid ID="rgPoOrders" runat="server" DataSourceID="dsPurchaseOrders"   
    GridLines="None" AllowFilteringByColumn="True" AllowPaging="True"   
    AllowSorting="True" PageSize="25">  
    <MasterTableView ItemStyle-HorizontalAlign="Center" AutoGenerateColumns="False"   
        Width="95%" DataKeyNames="cpono" DataSourceID="dsPurchaseOrders"   
        GridLines="Horizontal" AlternatingItemStyle-HorizontalAlign="Center"   
        HeaderStyle-HorizontalAlign="Center" PagerStyle-PageButtonCount="15">  
        <RowIndicatorColumn> 
            <HeaderStyle Width="20px" /> 
        </RowIndicatorColumn> 
        <ExpandCollapseColumn> 
            <HeaderStyle Width="20px" /> 
        </ExpandCollapseColumn> 
        <Columns> 
            <telerik:GridBoundColumn DataField="cpono" HeaderText="PO #" ReadOnly="True"   
                SortExpression="cpono" UniqueName="cpono">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="cconfirmto" HeaderText="Submitted By" 
                ReadOnly="true" UniqueName="SubmittedBy" > 
            </telerik:GridBoundColumn>   
            <telerik:GridBoundColumn DataField="DateOnly" DataType="System.DateTime"   
                HeaderText="Date Submitted" SortExpression="DateOnly" UniqueName="DateOnly">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="cshortrmk" HeaderText="Tracking #"   
                UniqueName="cshortrmk">  
            </telerik:GridBoundColumn> 
            <telerik:GridHyperLinkColumn Text="Click Here To Track" HeaderText=""    
                UniqueName="hlTrackButton">  
            </telerik:GridHyperLinkColumn> 
        </Columns> 
        <ItemStyle HorizontalAlign="Center" /> 
        <AlternatingItemStyle HorizontalAlign="Center" /> 
        <HeaderStyle HorizontalAlign="Center" /> 
    </MasterTableView> 
</telerik:RadGrid> 
Shinu
Top achievements
Rank 2
 answered on 28 May 2010
2 answers
105 views
I am using the popup editmode to add records to a grid.  I have an unbound textbox in the edititemtemplate where the user will enter a search term, then on a button click I will be querying the database using that term.  How do I access the value entered in the textbox?  I'm using VB.

Tim
Tim
Top achievements
Rank 1
 answered on 28 May 2010
3 answers
100 views
I have an upload form that is working great in every browser I test, except for IE. The issue is that I am not using the "Select" button, but relying on the ability to "select" by clicking in the file upload field. On IE it behaves like a textbox, and just gives me a place to type text.

I see this behavior also on the demo forms, but all of those also have a select button.

Version: 2009.3.1324.20

Here is my code:

<form id="form1" runat="server"> 
    <telerik:RadScriptManager ID="ScriptManager" runat="server" /> 
    <telerik:RadProgressManager ID="Radprogressmanager1" runat="server" /> 
    <telerik:RadUpload ID="RadUpload1" runat="server" onclientadded="increaseFileInputWidth" EnableEmbeddedSkins="false" EnableFileInputSkinning="true" Localization-Clear=""  ControlObjectsVisibility="ClearButtons" /> 
    <asp:ImageButton ID="btnUpload" runat="server" ImageUrl="Images/Buttons/106x26UploadPDF.png" /> 
    </form> 

Thanks,
Charles
Charles Kline
Top achievements
Rank 1
 answered on 27 May 2010
1 answer
100 views
Hello,

I have three resources represented by combo's... each of these uses an integer key as the key value for the resource.  In the JS API, the key is encoded???  How do I access the original key?

Thanks.
Brian Mains
Top achievements
Rank 1
 answered on 27 May 2010
1 answer
111 views
I am trying to hook a simple javascript function to update and insert link buttons on a radgrid
The Update is done - adding an attribute to the appropriate link button on the ItemDataBound event handler
the Insert button has me stumped
I am running VS 2010, .NET 4.0 and the code behind, as you can see, is VB
on Windows XP IE 8
anyway, appropriate code

<script type="text/javascript" language="javascript" >
    function ValidateRow(rowIndex) {
        var theGrid = $find("<%=rgDealerMaintenance.ClientID%>");
        var oneRow = null;
        if (rowIndex > -1) {
        oneRow = theGrid.get_masterTableView().get_dataItems()[rowIndex].get_element();
        }
     // hard coded cell locations
        for (j = 0; j < oneRow.cells[0].childNodes.length; j++) {
            var FirstName = oneRow.cells[0].childNodes[j].value;
        }
        for (j = 0; j < oneRow.cells[1].childNodes.length; j++) {
            var LastName = oneRow.cells[1].childNodes[j].value;
        }
        if (FirstName == '' || LastName == '') {
            alert('Please enter both a first name and a last name');
            return false;
        }
        return true;
    }
</script>
the grid
    <telerik:RadGrid ID="rgDealerMaintenance" AutoGenerateColumns="False"
        AllowAutomaticInserts="True" GridLines="None" ShowFooter="true" runat="server" >
    <MasterTableView CommandItemDisplay="Bottom" EditMode="InPlace" DataKeyNames="RegistrationID" HeaderStyle-CssClass="body_text_black_BOLD">
    <CommandItemSettings AddNewRecordImageUrl="Images/AddRecord.gif" AddNewRecordText="Add New" />
    <Columns>
        <telerik:GridBoundColumn DataField="RegistrationID" Visible="false" />
        <telerik:GridBoundColumn UniqueName="txtFirstName" DataField="FirstName" HeaderText="First Name">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="txtLastName" DataField="LastName" HeaderText="Last Name">
        </telerik:GridBoundColumn>

        <telerik:GridEditCommandColumn EditText="Edit" UniqueName="EditCommandColumn" UpdateText="Update" CancelText="Cancel" HeaderText="Edit">
        </telerik:GridEditCommandColumn>
        <telerik:GridButtonColumn CommandName="Delete" Text="Delete" HeaderText="Delete">
        </telerik:GridButtonColumn>
    </Columns>
    </MasterTableView>
    </telerik:RadGrid>

in the code behind
    Protected Sub rgDealerMaintenance_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rgDealerMaintenance.ItemDataBound
        Dim gdItem As GridDataItem = Nothing
        Dim geItem As GridEditableItem = Nothing
        Dim btnDelete, btnUpdate As LinkButton
        Dim RowIndex As Integer
        If TypeOf e.Item Is GridDataItem Then
            gdItem = DirectCast(e.Item, GridDataItem)
            ' hard-coded location!
            btnDelete = DirectCast(gdItem.Cells(9).Controls(0), LinkButton)
            btnDelete.Attributes.Add("onclick", "return ConfirmDelete();")
        End If
        If TypeOf e.Item Is GridEditableItem And e.Item.IsInEditMode Then
            geItem = DirectCast(e.Item, GridEditableItem)
            btnUpdate = DirectCast(geItem.Cells(8).Controls(0), LinkButton)
            RowIndex = e.Item.ItemIndex
        SetLinkButtonClickEvent(btnUpdate, RowIndex)
        End If
    End Sub

    Private Sub SetLinkButtonClickEvent(ByVal btnUpdate As LinkButton, ByVal RowIndex As Integer)
        Dim sb As StringBuilder = Nothing

        If btnUpdate Is Nothing Then
            Exit Sub
        End If
        sb = New StringBuilder("return ValidateRow(")
        sb.Append(RowIndex.ToString)
        sb.Append(");")
        btnUpdate.Attributes.Add("onclick", sb.ToString)
    End Sub

how do I check for first and last name on the client in insert mode?

Marianne Seggerman




Elliott
Top achievements
Rank 2
 answered on 27 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?