Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
99 views
hello to all,

                i would like to ask again for help to anyone here in telerik forums, here's my question i have one textbox for search and one grid, the data loaded to my grid is connected to my database, now in my column in grid i have Title and the Description column, now if the user want to search any word on the textbox which is txtsearch.text, if ever that word exist on the grid it will be loaded and highligted like for example i want to search the word for description column "Hello" then the grid data on the row on the particular column will highlighted or if he found 2  hello word in the grid it will appear also.. pleaes help

my sample data on the grid:

                    Title                                                              Description
                    Wings of Love                                              Hello to my friend
                    Power of Love                                              Just to say Hello to my friend

sample/code is highly appreciated


Jols
Top achievements
Rank 2
 answered on 27 Mar 2009
1 answer
161 views
I have an ecommerce page where the user enters their order and the total is automatically pushed to Paypal when they click on the Paypal form button. This works perfectly in IE but does not work in Firefox. Can someone please help?

aspx page:

<%

@ Page Language="VB" MasterPageFile="~/Masters/PU89MasterPage.master" AutoEventWireup="false" CodeFile="DuesVerification.aspx.vb" Inherits="DuesVerification" title="Princeton University Class of 1989" %>

 

<%

@ Register Assembly="Telerik.Web.UI, Version=2008.2.1001.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4"

 

 

Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<

asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

 

 

<Table id="tblDefault" runat="server" class="PageFont" width="100%">

 

 

<tr>

 

 

<td style="width: 20px">&nbsp &nbsp</td>

 

 

<td colspan="2">

 

 

<table width="100%">

 

 

<tr>

 

 

<td class="HeaderText" style="border-bottom: solid 3px #CCCCCC;padding: 0px;height: 10px;width: 100%;color:#000099;font-family:Verdana">Dues Form Verification</td>

 

 

</tr>

 

 

</table>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="width: 20px">&nbsp &nbsp</td>

 

 

<td><div id="BlackLink"><font size="+2"><b>P</b></font>lease verify that <u>all</u> the informaton in the form below is correct. </div>

 

 

<br />

 

 

<br />

 

 

<br />

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="width: 20px">&nbsp &nbsp</td>

 

 

<td><strong><u>Billing Information:</u></strong></td>

 

 

</tr>

 

 

<tr>

 

 

<td style="width: 20px">&nbsp &nbsp</td>

 

 

<td>

 

 

<center>

 

 

<table id="tblDuesInfo" runat="server" cellpadding="5" cellspacing="1" style="background-color: #666666;">

 

 

<tr style="background-color:#CCCCCC">

 

 

<td align="left" ><font color="red" size="+2">* </font>Last Name:</td>

 

 

<td align="left" ><asp:Label ID="lblLastName" runat="server" ForeColor="#000099"></asp:Label></td>

 

 

<td align="left" ><font color="red" size="+2">* </font>First Name:</td>

 

 

<td align="left" ><asp:Label ID="lblFirstName" runat="server" ForeColor="#000099"></asp:Label></td>

 

 

</tr>

 

 

<tr style="background-color:#FFFFFF;">

 

 

<td align="left" ><font color="red" size="+2">* </font>Address:</td>

 

 

<td align="left" ><asp:Label ID="lblAddress" runat="server" ForeColor="#000099"></asp:Label></td>

 

 

<td align="left" >Apt:</td>

 

 

<td align="left" ><asp:Label ID="lblApt" runat="server" ForeColor="#000099"></asp:Label></td>

 

 

</tr>

 

 

<tr style="background-color:#CCCCCC">

 

 

<td align="left" ><font color="red" size="+2">* </font>City:</td>

 

 

<td align="left" ><asp:Label ID="lblCity" runat="server" ForeColor="#000099"></asp:Label></td>

 

 

<td align="left" >State:</td>

 

 

<td align="left" ><asp:Label ID="lblState" runat="server" ForeColor="#000099"></asp:Label></td>

 

 

</tr>

 

 

<tr style="background-color:#FFFFFF;">

 

 

<td align="left" ><font color="red" size="+2">* </font>Zip / Postal Code:</td>

 

 

<td align="left" ><asp:Label ID="lblZip" runat="server" ForeColor="#000099"></asp:Label></td>

 

 

<td align="left" ><font color="red" size="+2">* </font>Country:</td>

 

 

<td align="left" ><asp:Label ID="lblCountry" runat="server" ForeColor="#000099"></asp:Label></td>

 

 

</tr>

 

 

<tr style="background-color:#CCCCCC;">

 

 

<td align="left" ><font color="red" size="+2">* </font>e-mail:</td>

 

 

<td align="left" colspan="3" ><asp:Label ID="lblEmail" runat="server" ForeColor="#000099"></asp:Label></td>

 

 

</tr>

 

 

</table>

 

 

<br />

 

 

<br />

 

 

</center>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="width: 20px">&nbsp &nbsp</td>

 

 

<td><strong><u>Dues And Other Contributions:</u></strong></td>

 

 

</tr>

 

 

<tr>

 

 

<td style="width: 20px">&nbsp &nbsp</td>

 

 

<td>

 

 

<center>

 

 

<table id="Table1" runat="server" cellpadding="5" cellspacing="1" style="background-color: #666666;">

 

 

<tr style="background-color:#CCCCCC">

 

 

<td align="left" style="width: 464px" ><font color="red" size="+2">* </font>Fiscal Year:</td>

 

 

<td align="left" ><asp:Label ID="lblFiscalYear" runat="server" ForeColor="#000099"></asp:Label></td>

 

 

</tr>

 

 

<tr style="background-color:#FFFFFF">

 

 

<td align="left" style="width: 464px" >Dues for Class Activities, Alumni Council and PAW:</td>

 

 

<td align="left" >

 

 

<asp:Label ID="lblRegularDues" runat="server" ForeColor="#000099"></asp:Label>

 

 

</td>

 

 

</tr>

 

 

<tr style="background-color:#CCCCCC;">

 

 

<td align="left" style="width: 464px" >Contribution to Class of 1989 "In the Nation's Service" Fund:</td>

 

 

<td align="left" ><asp:Label ID="lblNationsServiceFund" runat="server" ForeColor="#000099"></asp:Label></td>

 

 

</tr>

 

 

<tr style="background-color:#FFFFFF;">

 

 

<td align="left" style="width: 464px" >Contribution to Campaign for Habitat for Humanity:</td>

 

 

<td align="left" ><asp:Label ID="lblHabitatForHumanityFund" runat="server" ForeColor="#000099"></asp:Label></td>

 

 

</tr>

 

 

<tr style="background-color:#CCCCCC">

 

 

<td align="left" style="width: 464px" >Total:</td>

 

 

<td align="left" >

 

 

<asp:label id="lbltotal" runat="server"></asp:label>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

<br />

 

 

<br />

 

 

</center>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td></td>

 

 

</tr>

 

 

<tr>

 

 

<td style="width: 20px">&nbsp &nbsp</td>

 

 

<td align="left">

 

 

<br />

 

 

<br />

 

 

<strong>Submit Dues and Go To PayPal Payment Screen</strong>

 

 

<br />

 

 

<br />

 

 

<asp:Button ID="btnDuesEdit" runat="server" Text="CLICK HERE to edit your dues"/>

 

 

<br />

 

 

<br />

 

 

<telerik:RadSplitter ID="rsplPayPalButton" runat="server" Height="149px"

 

 

Width="287px" BorderColor="White" BorderSize="0">

 

 

<telerik:radpane ID="rpnPayPalButton" runat="server"

 

 

Height="125px" Width="281px" BorderColor="White" BorderStyle="None"

 

 

Scrolling="None">

 

 

</telerik:radpane>

 

 

</telerik:RadSplitter>

 

 

</td>

 

 

</tr>

 

 

</Table>

 

 

 

<asp:SqlDataSource ID="dsDuesVerification" runat="Server" ConnectionString="<%$ ConnectionStrings:PU89 %>"

 

 

SelectCommand="SELECT * FROM tblDues">

 

 

<SelectParameters>

 

 

<asp:QueryStringParameter Name="request_no" QueryStringField="ID" Type="Int32" />

 

 

</SelectParameters>

 

</

asp:SqlDataSource>

 

 

</

asp:Content>

HTML Paypal form button:

 

<!

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>

 

 

 

 

<title>Princeton University Class of 1989</title>

 

 

 

 

<SCRIPT LANGUAGE="VBScript" runat="server">

 

<!--

Function SetAmount()

Set TheForm = Document.PaypalButton

myUrl = window.document.location.href

dim pos, amount

pos=InStr(MyURL,"=")

amount = mid(MyURL, pos + 1)

TheForm.amount.Value = amount

End Function

-->

 

 

</

SCRIPT>

 

</

head>

 

<

body>

 

<

FORM name="PaypalButton" id="PaypalButton" ACTION="https://www.paypal.com/cgi-bin/webscr" METHOD="POST" runat="server" target="_top">

 

<

INPUT TYPE="hidden" NAME="cmd" VALUE="_xclick">

 

<

INPUT TYPE="hidden" NAME="business" VALUE="treasurer@princeton1989.org">

 

<

INPUT TYPE="hidden" NAME="amount" id="amount">

 

<

INPUT TYPE="hidden" NAME="item_name" VALUE="Princeton Class of '89 Dues Fee">

 

<

INPUT TYPE="hidden" NAME="currency_code" VALUE="USD">

 

<

INPUT TYPE="hidden" NAME="cancel_return" VALUE="http://www.Princeton1989.org/DuesPaymentCancel.aspx">

 

<

INPUT TYPE="hidden" NAME="return" VALUE="http://www.Princeton1989.org/DuesPaymentSuccess.aspx">

 

<

INPUT TYPE="hidden" NAME="rm" VALUE="2">

 

<

INPUT TYPE="hidden" NAME="cbt" VALUE="Return to Princeton1989.org to complete your dues">

 

<

INPUT TYPE="image" NAME="submit" BORDER="0" src="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" ALT="PayPal

 

- The safer, easier way to pay online"

onclick="SetAmount()">

 

<

img alt="" border="" width="1" height="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif">

 

</

form>

 

</

body>

 

</

html>

VB.NET aspx Page Load Code

 

Protected

Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load

 

 

If Not Page.IsPostBack Then

 

 

 

 

'Take care of the casheing problem

 

 

 

Response.Cache.SetCacheability(HttpCacheability.NoCache)

Response.Cache.SetExpires(DateTime.Now)

 

Dim _ID As Integer = CInt(Request.QueryString("ID"))

 

Session(

"_ID") = _ID

 

 

'Populate the datatable

 

 

 

 

Dim sConnString As String = ConfigurationManager.ConnectionStrings("PU89").ConnectionString

 

 

Dim objConnection As New SqlClient.SqlConnection(sConnString)

 

 

Dim strSQL As String = "SELECT * FROM tblDues WHERE ID='" & _ID & "';"

 

 

 

 

Dim dbComm As New SqlClient.SqlCommand(strSQL, objConnection)

 

 

Dim objDR As SqlClient.SqlDataReader

 

 

Try

 

 

 

objConnection.Open()

objDR = dbComm.ExecuteReader(System.Data.CommandBehavior.CloseConnection)

 

While objDR.Read()

 

 

With objDR

 

 

Me.lblLastName.Text = .Item("LastName") 'required field

 

 

 

 

Me.lblFirstName.Text = .Item("FirstName") 'required field

 

 

 

 

Me.lblAddress.Text = .Item("Address") 'required field

 

 

 

 

If Not .Item("Apt") Is Nothing Then

 

 

 

 

Me.lblApt.Text = .Item("Apt")

 

 

End If

 

 

 

 

Me.lblCity.Text = .Item("City") 'required field

 

 

 

 

Me.lblState.Text = .Item("State") 'required field

 

 

 

 

Me.lblZip.Text = .Item("ZipCode") 'required field

 

 

 

 

Me.lblCountry.Text = .Item("Country") 'required field

 

 

 

 

Me.lblEmail.Text = .Item("Email") 'required field

 

 

 

 

Me.lblFiscalYear.Text = .Item("FiscalYear") 'required field

 

 

 

 

Me.lblRegularDues.Text = .Item("Dues") 'required field

 

 

 

 

If Not .Item("NationsServiceFund") Is Nothing Then

 

 

 

 

Me.lblNationsServiceFund.Text = .Item("NationsServiceFund")

 

 

End If

 

 

 

 

If Not .Item("HabitatForHumanityFund") Is Nothing Then

 

 

 

 

Me.lblHabitatForHumanityFund.Text = .Item("HabitatForHumanityFund")

 

 

End If

 

 

 

 

Me.lbltotal.Text = .Item("DuesTotal")

 

 

'Set Up Session Variables for Email

 

 

 

Session(

"DuesName") = .Item("FirstName") & " " & .Item("LastName")

 

Session(

"DuesAddress") = .Item("Address")

 

Session(

"DuesCityStateZip") = .Item("City") & ", " & .Item("State") & " " & .Item("ZipCode")

 

Session(

"DuesCountry") = .Item("Country")

 

Session(

"DuesEmail") = .Item("Email")

 

Session(

"DuesFiscalYear") = .Item("FiscalYear")

 

Session(

"Dues") = .Item("Dues")

 

Session(

"DuesNationsServiceFund") = .Item("NationsServiceFund")

 

Session(

"DuesHabitatForHumanityFund") = .Item("HabitatForHumanityFund")

 

Session(

"DuesTotal") = .Item("DuesTotal")

 

 

Me.rpnPayPalButton.ContentUrl = "~/PayPalDuesFee.htm?ID=" & .Item("DuesTotal")

 

 

End With

 

 

 

 

End While

 

 

 

 

Catch ex As Exception

 

Response.Write(ex.Message)

Response.End()

 

Finally

 

 

 

 

If objConnection.State = ConnectionState.Open Then

 

 

 

objConnection.Close()

 

End If

 

 

 

 

End Try

 

 

 

 

End If

 

 

 

 

End Sub 'Page_Load

 

Todd Anglin
Top achievements
Rank 2
 answered on 27 Mar 2009
1 answer
137 views
well i couldn't resist not to post this. Well yesterday i lost my whole day on trying to make an custom control that will use RadDatePicker, RadNumbericTextBox, RadioButtonList and TextBox based on DbType Enumeration and EntityValue property. My sql table has each field for each type.

So, when we take into concern famous asp.net page lifecycle and order of events - i must say bravo telerik! That's is just an nightmare when u try to crreate something dynamic and when u need to get previous state. In my case i couldn't make initialization bfore databinding because my control is in gridview item so properties and everything will be binded on databinding of parent.

I did this control to work and to return state but then - when edit even occurs - nightmare starts again! Now databind still didn't happen so i don't have properties - my control that is located in e.EditgridItem is recreated but - how - not correctly. Because it is needs properties and it gets those later. All in all that page lifecycle is undermining itself. So in case of databinding all those previous events are just useless and when u need to make something that will work without some 100 pages manual u must make many hacks and at the end u will remeber how it was, before, in times of asp or php. I can't imagine what problem u guys from telerik had to make all those controls and to fix all those cases of use.

So.. all i can tell is  - telerik asp.net MVC control suit - Buckle your seatbelt, Dorothy, 'cause Kansas (web forms) is going bye-bye.

Shame - some gurus like Flowers where attacked while they where presenting simple approaches by some "MS only" people. Some people will tell that RAD is hell when things go wrong and when project is big, but that's just because of web froms and not guilt of some controls producer.

At the end, my only way to resolve this damn situation (withour reading some detailed book) is to place controls directly - and to bind to visibility.
Todd Anglin
Top achievements
Rank 2
 answered on 27 Mar 2009
1 answer
143 views
Hi,

I want to create a custom control. This control will be derived from any rad controls. And i want to create a new control in overrided render method. When i try in the following example I'm getting this error: "Script control 'blabla' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
Parameter name: scriptControl"


Do you have any idea or any example?

Example:

//Using my custom control in aspx file
....//any codes
<mcc:MyCustomControl ID="mcc1" runat="server" />
....//any codes

//My Custom Control Class
public class MycustomControl : RadTextBox
{
....//any codes
        protected override void Render(HtmlTextWriter writer)
        {
                  RadGrid customControlGrid = new RadGrid();
                  customControlGrid.ID = "blabla";
                  customControlGrid.Page = this.Page;
                  customControlGrid.......
                  customControlGrid.RenderControl(writer);
                  base.Render(writer);
        }
....//any codes
}

Todd Anglin
Top achievements
Rank 2
 answered on 27 Mar 2009
1 answer
106 views
Hello,

Is this possible please? I have a rather large jpg on my page, and I want a "spinner" to show while it loads. I tried dragging an image onto the progress area, but it doesn't work. It there a tutorial I can read please?

Brent
Todd Anglin
Top achievements
Rank 2
 answered on 27 Mar 2009
1 answer
172 views
How can I make the sample website that comes with the installation to work in asp.net 2.0?
i get this error

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC32206: Indirect reference is being made to assembly System.Web.Extensions version 3.5.0.0, which contains 'Telerik.Web.UI.RadComboBox'. This Project references a prior version of System.Web.Extensions version 1.0.61025.0. To use 'Telerik.Web.UI.RadComboBox', you must replace the reference to System.Web.Extensions with version 3.5.0.0 or higher.

Source Error:

Line 27:             MyBase.SetupFilterControls(cell)
Line 28:             cell.Controls.RemoveAt(0)
Line 29: Dim combo As RadComboBox = New RadComboBoxLine 30:             combo.ID = ("RadComboBox1" + Me.DataField)
Line 31:             combo.ShowToggleImage = False

Source File: C:\Inetpub\wwwroot\us\Live Demos\App_Code\Grid_VB\MyCustomFilteringColumnVB.vb    Line: 29

Todd Anglin
Top achievements
Rank 2
 answered on 27 Mar 2009
1 answer
175 views

Ok, I know the subject doesn't make sense, but I am at the point of ripping my hair out over this. I have a struct which contains other structs (also tag serializable) shown below. I am heavily using Telerik controls in this app and as the user follows this tab driven wizard, information from each tab is added to the TestConfig object in ViewState. This works flawlessly, until... you let the browser sit for 4 or so minutes. If at any point in time you sit on a particular tab and wait the requsite 240+ seconds, when the user clicks next, the debugger throws an InvalidCastException. Here is the interesting part. The cast is a simple return of the object from ViewState (below). The object in ViewState no longer thinks it is a TestConfig object. It will allow me to cast it as an object as it rightfully should and I can even drill down into the object within VS2008 and see all of the data is still there. Somehow it is losing its type and I cannot for the life of me figure it out. I am at the point of either moving to a database solution or if it doesn't make sense to do that, hidden controls, but I would really like to just resolve this the right way. Anyone have any thoughts?

Structs:

[Serializable]
    public struct TestConfig
    {
        public GridData oTestType;
        public GridData oArchitecture;
        public GridData oBuild;
        public GridData oBuildType;
        public List<GridData> gloLanguages;
        public List<GridData>  gloOperatingSystems;
        public List<GridData>  gloFamilies;
        public List<TestDriverData> gloTestDriverData;
    }

    [Serializable]
    public struct TestDriverData
    {
        public string sPath;
        public string sModel;
        public string sModelDisplayString;
        public string sPort;
        public string sPdl;
        public string sPdlDisplayString;
        public string sFamily;

    }

    [Serializable]
    public struct GridData
    {
        public string sDisplay;
        public string sData;
        public string sMisc;
    }
 

Return Code:

 

return (TestConfig)ViewState["m_TestConfig"];

Todd Anglin
Top achievements
Rank 2
 answered on 27 Mar 2009
1 answer
253 views
If i have  4 gridtemplatecolumn and a footer
is there a way to merge (like colspan) on just the footer for column 2 and 3?

so i have 3 footer columns?

Thanks
Shinu
Top achievements
Rank 2
 answered on 27 Mar 2009
1 answer
1.5K+ views
I have downloaded the trial version of ASP.NET AJAX UI Controls (Version 2009.1.311.35). I believe this is .net 3.5 version.
I use VS2008 .NET 3.5.

I created a web form with just the Rad Textbox in it. with no code.

I am getting the following error: I dont really see any solutions to fix this issue.

 

Server Error in '/' Application.

The control with ID 'RadTextBox1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The control with ID 'RadTextBox1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: The control with ID 'RadTextBox1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.]
   Telerik.Web.UI.ScriptRegistrar.GetScriptManager(Control control) +199
   Telerik.Web.UI.RadWebControl.get_ScriptManager() +46
   Telerik.Web.UI.RadInputControl.RegisterScriptControl() +31
   Telerik.Web.UI.RadWebControl.OnPreRender(EventArgs e) +47
   Telerik.Web.UI.RadInputControl.OnPreRender(EventArgs e) +37
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

Shinu
Top achievements
Rank 2
 answered on 27 Mar 2009
2 answers
244 views
Hi,

Would it be possible to customize the buttons in the toolbar? Toolbar collection is fairly simple, whati want is to resize the button on the toolbar and move the toolbar from to the bottom part of the Editor.


Thanks! :)

jorex
Top achievements
Rank 1
 answered on 27 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?