Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
331 views
Good Day All

i have a Radgrid defined like this

<telerik:RadGrid ID="RagCategories" runat="server" Height="399px" Width="698px" AutoGenerateColumns="False" Skin="Sunset" OnDataBound="RagCategories_DataBound">  
                        <MasterTableView> 
                        <RowIndicatorColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                        </RowIndicatorColumn> 
                        <Columns> 
                        <telerik:GridTemplateColumn DataField="CategoryID" HeaderText="ID" UniqueName="TemplateColumn">  
                        <ItemTemplate> 
                        <asp:Label ID="lblID" Font-Bold="true" runat="server" Text='<%# Eval("CategoryID")%>' ></asp:Label> 
                        </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn HeaderText="Forum Categories" UniqueName="TemplateColumn1">  
                        <ItemTemplate> 
                        <asp:HyperLink id="link1" Text='<%# Eval("CATEGORYNAME")%>'  NavigateUrl='<%# Eval("[LINK]")%>' runat="server" > </asp:HyperLink> 
                        <asp:Label ID="descr" runat="server" Text='<%# Eval("Description")%>'></asp:Label> 
                        </ItemTemplate><HeaderStyle Font-Bold="True">  
                        </HeaderStyle> 
                        </telerik:GridTemplateColumn> 
                        </Columns> 
                        <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                        </ExpandCollapseColumn> 
                        </MasterTableView> 
                        <FilterMenu EnableTheming="True" Skin="Sunset">  
                        <CollapseAnimation Type="OutQuint" Duration="200">  
                        </CollapseAnimation> 
                        </FilterMenu> 
    <ClientSettings> 
        <ClientEvents OnRowClick="OnClientClick=&quot;javascript: return SetHidSelectedRows()&quot;" /> 
    </ClientSettings> 
    </telerik:RadGrid> 
in this Grid there is "CategoryID" and on RowDatabound event i hide this Column and it working. now in this Grid i have this

<asp:HyperLink id="link1" Text='<%# Eval("CATEGORYNAME")%>'  NavigateUrl='<%# Eval("[LINK]")%>' runat="server" > 
as shown above,when my user clicks the Hyperlink in the Grid, this will take the user to the Appropriate Page,its Good , and i want to save the "CategoryID" of the selected Hyperlink. Am open to suggestion, i
can still use the Button link and onclick and get the Category_id of the selected button list. Please note that in this grid there wont be any multi select.

Thanks
Shinu
Top achievements
Rank 2
 answered on 01 Feb 2010
1 answer
121 views
i am using RadGrid
i add a record through Form view i didint hit yet inset button ....
i just want to know how to collaps that form view in that Grid in code behind file
where as i know its default behavior of Form in Grid that after clicking at insert it will implicitly get closed
How to collapse a gird

Shinu
Top achievements
Rank 2
 answered on 01 Feb 2010
2 answers
166 views
I want to allow users to copy and past text from MS word. But I also need to limit how many words they can put it.

I am doing word count using

editor.Text.WordCount(); where word count is an extension method I wrote.

I am using Text insted of Content because I dont want to count all the fomatting in word count limit. And it is working fine on IE but not with firefox because firefox is adding all the word formatting in Text property. Below is what I was getting in text property. How can I make sure that all the text from word gets pasted without loosing any formatting and still be able to force a word count?

As you can see, i only entered "This is some test text that I m going to use to test rad text editor." in the textbox and when I submitted the form, this is what I got. Also I get this only when my app on the main server. If I test it using localhost, it works fine with firefox. Any ideas?

I tried to use StripFormattingOptions="MSWord"
but then I loose the formatting.

Thanks,

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} This is some test text that I m going to use to test rad text editor.
Kashif Imran
Top achievements
Rank 1
 answered on 01 Feb 2010
2 answers
317 views

Greetings,


First some background information:
I have a RadTextBox which accepts an employee id (if known). If the employee id is not known, there is a hyperlink button accompanying the RadTextBox, which opens up a search dialog in a RadWindow. In the RadWindow, the user can enter search criteria to filter a list of employees, which appear in a RadGrid. The leading field in the RadGrid contains a hyperlink that, when clicked, should do the following:
1. Close the RadWindow.
2. Set the value of the RadTextBox in the parent window.
3. Cause a postback in the parent window.

I’ve got most of it working, but have several questions.
1. Is it possible to set (via Javascript) the value of the RadTextBox in the parent window such that a postback would automatically occur (the RadTextBox specifies AutoPostBack=”true”)?
2. What is the correct way to set the input values associated to a RadTextBox? I was trying to use a generic solution that would work for other similar search dialogs; so I pass the Id of the RadTextBox through as a querystring parameter in the NavigateUrl attribute of the RadWindow. The following Javascript function is called when the RadWindow is closed (OnClientClosed attribute):

function onClientCloseLOV(oWnd, args) {

    var arg = args.get_argument();

    if (arg) {

        $get(arg.id).value = arg.value;

    }

}

Note: “arg.id” is the RadTextBox ID attribute in the parent window. The problem here is; if I subsequently click on the input field the value disappears!

Ryan Bartsch
Top achievements
Rank 1
 answered on 31 Jan 2010
10 answers
1.0K+ views
I recently posted this as a support ticket, but hopefully someone knows the answer to this problem (or can replicate it):

Hello Telerik:

You and I have a problem in common - and I can't seem to fix it on my end so I'll let you know about your problem and hopefully you'll fill me in on how to fix it.

This problem can be labelled "strange" at best since it is so consistently inconsistent.

My dev machine's setup is Win Vista, VS 2005 Standard, IE 7.  I experience no problems and never receive the dreaded PageRequestManagerParserErrorException when browsing my site, your site, or any other site that uses ASP.NET Ajax.  So, of course, I thought that all was well with my work.  Apparently not so.

A customer tipped me off that she was getting the PageRequestManagerParserErrorException whenever she used a page with ASP.NET Ajax interactivity.  The specific example is www.huronperthlakers.ca which uses Ajax when you click on an article title in the "other recent articles" section.  It is important to note that the page will load fine; it's whenever there's a callback that the error fires.

So I tried this on some other computers around the office, and low and behold, most (but not all) of the machines also were getting the error.  Some machines were IE6, but most are IE7.  I spent a couple of days trying to figure out what I was doing wrong and it just didn't make sense that it would work in some cases and not in others.  So then I figured I'd try other sites and finally, some consistency came into play.

On precisely every computer that experienced the error with any of my ASP.NET Ajax sites, they also experienced the exact same error on any of the telerik.com QSF examples that used ASP.NET Ajax, not to mention the ajax.asp.net control toolkit demo site.  Conversely, the computers that didn't get the error on my sites didn't get them on yours either.

The problem for me, and for you, is the distrubingly high number of computers that are experiencing this problem around here.  The other problem is that this is so clearly an issue with ASP.NET Ajax (and NOT r.a.d.Ajax - which works fine on all the "problem" machines around here) and yet Microsoft doesn't seem to acknowledge there's a problem.  Another reason this is an issue for you guys is the fact that you are now building your controls on top of something that doesn't seem to globally work properly.

The official error is as follows (as it appears in the alert box):

Sys.WebForms.PageRequestManagerParserErrorExeption: The message received from the server could not be parsed.  Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.  Details:  Error parsing near '<!DOCTYPE html P''.

Which is interesting because I'm not doing any of the things suggested in the error (nor do I suspect that you are), and it also appears to be failing right off the get-go.  Just to be sure, Ive tested all of the following with my sites:
  • Explicity turned off server trace (which I believe is the default) in the web.config
  • Verified that response.write isn't anywhere in my code (which I already knew)
  • Verified that no response filters are being used
  • Verified that the version number for system.web.extensions is the correct RTM version in the web.config as stated in the documentation for ASP.NET Ajax
  • Verified that, for each of the "problem" machines, that the security settings for the Internet Zone where correct (medium-high for IE7, medium for IE6)
  • Turned off the enableRolesInCookies (suggested somewhere in the ASP.NET forums)

All of those items were tried both individually and together and none seemed to work.  So I know it's not something with my code since the same error appears on telerik.com and ajax.asp.net.

I'll send this now in hopes that you can start me down the path to resolution.  In the meantime I will try the following to hopefully help narrow down the issue:

  • Visit other known ASP.NET Ajax sites, such as pageflakes on the "problem" machines
  • Install other browsers on the "problem" machines to see if it's an IE-specific error

If there's anything else I can try, please let me know.  Thanks,

Shaun.

Abdul Hafiz Ghazal
Top achievements
Rank 1
 answered on 31 Jan 2010
9 answers
204 views
Hi,

I'm using the grid with my own custom skin. but I find that the dropdown filter options list has no border with transparent background. So its not readable over the text under it.

I thought I must have missed some CSS elements. So I copied and renamed all elements from another skin that referred to "filter". but it made no difference.

Any ideas?
Ish
Top achievements
Rank 1
 answered on 31 Jan 2010
4 answers
139 views
Hi,
I'm trying to create a RadPanelBar dynamically and it doesn't seem to work. This is my code.
Dim radPanelBarDistributor As New RadPanelBar  
        radPanelBarDistributor.Width = Unit.Pixel(158)  
        radPanelBarDistributor.Skin = "WebBlue" 
        radPanelBarDistributor.ExpandMode = PanelBarExpandMode.SingleExpandedItem  
        radPanelBarDistributor.PersistStateInCookie = True 
        radPanelBarDistributor.Attributes.Add("runat", "server")  
 
        Dim rpi As RadPanelItem  
        Dim childItem As RadPanelItem  
        '== My Account  
        rpi = New RadPanelItem  
        rpi.Text = "My Account" 
 
        childItem = New RadPanelItem  
        childItem.Text = "My Profile" 
        childItem.NavigateUrl = "~/Manage/Profile.aspx" 
        rpi.Items.Add(childItem)  
 
        childItem = New RadPanelItem  
        childItem.Text = "AutoShip Options" 
        childItem.NavigateUrl = "~/Manage/AutoShip.aspx" 
        rpi.Items.Add(childItem)  
 
        childItem = New RadPanelItem  
        childItem.Text = "My Orders" 
        childItem.NavigateUrl = "~/Manage/MyOrders.aspx" 
        rpi.Items.Add(childItem)  
        radPanelBarDistributor.Items.Add(rpi)  
        'RadPanelBar1.Items.Add(rpi)  
        '== Only Distributors can see the extended menu  
        If UserInstance.ContactTypeID = CInt(Harmony.Common.Constants.ContactType.Distributor) Then 
            '== Manage  
            rpi = New RadPanelItem  
            rpi.Text = "Manage" 
 
            childItem = New RadPanelItem  
            childItem.Text = "Enroll a Distributor" 
            childItem.NavigateUrl = "~/Manage/Enrollment.aspx" 
            rpi.Items.Add(childItem)  
 
            childItem = New RadPanelItem  
            childItem.Text = "Enroll a Customer" 
            childItem.NavigateUrl = "~/Manage/Enrollment.aspx" 
            rpi.Items.Add(childItem)  
 
            childItem = New RadPanelItem  
            childItem.Text = "Place an Order" 
            childItem.NavigateUrl = "~/Products.aspx" 
            rpi.Items.Add(childItem)  
 
            'RadPanelBar1.Items.Add(rpi)  
            radPanelBarDistributor.Items.Add(rpi)  
 
            '== Prosperity  
            rpi = New RadPanelItem  
            rpi.Text = "Prosperity" 
 
            childItem = New RadPanelItem  
            childItem.Text = "View Trees" 
            childItem.NavigateUrl = "~/Manage/Downline.aspx" 
            rpi.Items.Add(childItem)  
 
            childItem = New RadPanelItem  
            childItem.Text = "Commissions" 
            childItem.NavigateUrl = "~/Manage/Commissions.aspx" 
            rpi.Items.Add(childItem)  
 
            childItem = New RadPanelItem  
            childItem.Text = "Prosperity Card" 
            childItem.NavigateUrl = "~/Manage/ProsperityCard.aspx" 
            rpi.Items.Add(childItem)  
 
            childItem = New RadPanelItem  
            childItem.Text = "Marketing Center" 
            childItem.NavigateUrl = "~/Manage/Marketing.aspx" 
            rpi.Items.Add(childItem)  
 
            'RadPanelBar1.Items.Add(rpi)  
            radPanelBarDistributor.Items.Add(rpi)  
 
        End If 
        pnlDistributorMenu.Controls.Add(radPanelBarDistributor) 

The menus don't open up and i get the following error: "Microsoft JScript runtime error: 'undefined' is null or not an object" with a Break, Continue, Ignore dialog box.

Is there anything I'm doing wrong?
Rob Venable
Top achievements
Rank 1
 answered on 31 Jan 2010
3 answers
157 views
Hi

Can you help me with the this challenge:

I have a search textbox in a master page (and thus on every page in the site).

What I would like to do is to have a border appear around the image submit button as soon as any text
is entered in the search box.  Can you suggest how to accomplish it client side?

Can I use the WineListTextBox_TextChanged event?

The declaration is :
<telerik:RadTextBox ID="WineListTextBox" Runat="server"   
 EmptyMessage="Wine list search" Skin="Black" Width="125px"   
 ForeColor="#A49261" style="background-color:#333333" onkeydown="return(event.keyCode!=13);">   
EmptyMessageStyle HorizontalAlign="Left" PaddingLeft="3px" /> 
</telerik:RadTextBox> 
                                  
                             
<asp:ImageButton ID="WineListButton"                                     runat="server" ImageAlign="Right"   
ImageUrl="~/images/buttons/rt-arrow.gif"                                     CausesValidation="False" /> 

and there is a button click handler in code behind.

In case you are wondering, it is because there some visitors who insist on hitting the keyboard 'enter' key to submit instead of clicking the beautiful (but small) arrow button.

Thanks!

Clive
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 30 Jan 2010
3 answers
336 views
I have BinaryImage working in a grid flawlessly. Now I want to display the binary image on another page in a asp:placeholder control. I have been unable to find any examples of RadBinaryImage being created and made to display from the codebehind. All my attempts have failed. the original images that were uploaded are jpeg.  I have been getting the missing image placeholder in IE when i attempt to add the BinaryImage control to the placeholder control collection. I'm just looking for a simple working example of this done in the codebehind. the only existing control on the page is the placeholder. If anyone can help, I would be grateful. Thank you
Thomas Frohe
Top achievements
Rank 1
 answered on 30 Jan 2010
1 answer
410 views
I'm using the AJAX.NET ModalPopUpExtender to display a customer form.

Inside that form, I have a RadComboBox.  When the pop-up is opened, only the first comboBox item is available.  Clicking on the drop-down doesn't work.

As a test, I moved the comboBox outside of the modal and it works fine.  

Any ideas?
Jaime Fuhr
Top achievements
Rank 1
 answered on 30 Jan 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?