Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
127 views
I am using a RadRotator control to display a series of images, and each image has a unique target URL that the user is to be redirected to when clicked.

What I encountering is that the ImageButton contains the properties of the last image in the Rotator. When I look at the sender object in the code-behind, the ImageURL and AlternateText property are set to the last image loaded into the Rotator, not the values of the image I clicked.

How can I get this to work ?? I was using a asp:Hyperlink control initially in the RadRotator, but the same problem was occuring.


Here is my code:


                        <telerik:RadRotator ID="RadRotator1" runat="server" DataSourceID="SqlDataSourceHomeImages" FrameDuration="4000" RotatorType="AutomaticAdvance"  >
                            <ItemTemplate>
                                    <asp:ImageButton ID="btnHomePage" runat="server" ImageUrl='<%# "images/" & Eval("hpi_image")%>'  AlternateText='<%# Eval("hpi_URL") %>' OnClick="btnHomePage_Click"/>
                                      </ItemTemplate>
                        </telerik:RadRotator>

                        <asp:SqlDataSource ID="SqlDataSourceHomeImages" runat="server" ConnectionString="<%$ ConnectionStrings:WebDB_string.com%>"
                                SelectCommand="SELECT hpi_image, hpi_URL, hpi_external FROM tbl_HomeImages WHERE hpi_show_on_web = 'True' ORDER BY hpi_sort_order">
                        </asp:SqlDataSource>

And here is the Click event from the code-behind:

   Protected Sub btnHomePage_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs)

        Response.Redirect(sender.AlternateText)

    End Sub

Very simple, and it should work. But it doesn't and it's driving me crazy !!

Thanks !

Bruce

Bruce
Top achievements
Rank 1
 answered on 19 Mar 2012
1 answer
118 views
Hello,
I would like to make an ImageRotator that display a picturs existe in a sqlserver database without using a webservice, how can i do it step by step please  ?
Thankx

Slav
Telerik team
 answered on 19 Mar 2012
0 answers
83 views
Hi ,
I have the requirement that the position of check boxes remain in the same column for parent and child node .
Generaaly check boxes will come with child node with the indent space . I want the child node to appear at the indent
space but the check boxes should come without indent . It mean that all check boxes will come at same x location ( same column ) .
Please help me how it can be achieved in telerik control ?

Checkbox  root
checkbox         Parent
checkbox                child 1
checkbox                child 2
checkbox                child 2
checkbox                      child4

Position of child nodes are same but checkboxes should not appear just before them . They should be
in the 1st colimn itself . Hope this illustration is clear .


Thanks ,
Kaushik Vatsa
Kaushik
Top achievements
Rank 1
 asked on 19 Mar 2012
1 answer
536 views
This is the scenario:
I have a RadGrid, in which each row will have a
"GenName(String), Status(RadComboBox), Type(RadComboBox)"
The ClientDataKeyNames are "ID, GenName"

I am doing a CLIENT SIDE BINDING USING A WCF SERVICE for the RadGrid.

Once the data is bound to the radgrid, I will have to click on the "Type" RadComboBox. It has to use Load on Demand. But the data that will be shown in the RadComboBox depends on the ID (ClientDataKeyName) of that particular row. How do I access it??

presently I am using "onclientitemsrequesting" event and below is the even handler,

function GetGenerationVersions(sender, eventArgs) {
                 
                var filterString = eventArgs.get_text();
 
                var rcbElement = sender.get_element();
                // var parentRowID = $(rcbElement).parents("tr").first().prev("tr.rgRow, tr.rgAltRow")[0].id;
                var genID = sender.get_element().parentNode.parentNode.getDataKeyValue("ID");
 
                //.get_parent().get_parent().get_masterTableView().get_dataItems()[0].getDataKeyValue("GenerationID");
                alert(genID.toString());
                var context = eventArgs.get_context();
                context["FilterString"] = filterString;
 
                context["SiteID"] = document.getElementById("<%=lblSiteID.ClientID %>").innerText;
                context["ProductID"] = $find('<%=rcbProducts.ClientID %>').get_selectedItem().get_value();
                context["GenerationName"] = genID;
 
            }

It throws me an Error :  Object doesn't support property or method 'getDataKeyValue'

Please let me know how to deal with it.
Thanks.

Yash

"
Vasil
Telerik team
 answered on 19 Mar 2012
1 answer
115 views
I need to add Radupload control as one of the RadMenu items.
When i add Radupload under RadMenu items, it renders it as a button in menu, I want it to look like a linkbutton.
Other approach seems like Radupload needs to be invisible but trigger it on click of a linkbutton through javascript.
Is that possible?Can you let me know what approach is suitable to achieve this?
Peter Filipov
Telerik team
 answered on 19 Mar 2012
0 answers
70 views
Hi,

I have a requirement like, when we type any person name its has to suggest person names along with email, it is like 2 level sugsestion.
It is like menu type structure

For ex:

If i type Mahsesh it has to suggest all names start with mahesh along with email id's in next level. Please find attached file

It will be helpful, if you can provide the code which supports this feature.

Regards
Patil B V

Patil
Top achievements
Rank 1
 asked on 19 Mar 2012
5 answers
211 views
Hi,
I have the problems with a Virtual Scrolling :

1) I can not select the last item on the page because it goes immediately to the next page
2)I have a tab with a RadGrid with virtual scrolling.
If I am placed on the first page of the RadGrid and change tab and then I come back I see the page with the correct lines of the RadGrid.
If I am placed on the second page of the RadGrid and change tab and then I come back I see the page without RadGrid rows of data.
Why?

thanks
Pavlina
Telerik team
 answered on 19 Mar 2012
4 answers
153 views
Does anyone know if it is possible to change the NoMasterRecordsText property from No Records to Display to something else PER FOLDER?  So in the tree view you would have multiple folders and when the user clicks a folder I want to display Access Denied for ones they have no access to and This Folder is Empty for folders that simply have nothing in them.  Has anyone done anything like this?
Adam
Top achievements
Rank 1
 answered on 19 Mar 2012
1 answer
180 views
Hi

I have a RadGrid Control which displays a child grid when the Parent Grid Row is clicked.
This works without issues.

In order to make it clearer to the user, I wish to change the background colour of one of the Cells in the row.  This is dependant upon the value contained within another column.  (Basically some rows will have more than 1 detail row - so I want to indicate this to the user)

When I add this functionality to the ItemDataBound event of the grid, it throws a "PageRequestManagerServerErrorException Object reference not set to an instance of an object." error. when I try to expand the child row.  The colour change is is showing correctly.

if (e.Item is GridDataItem)
 {
        if (e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["DocTypes"].ToString() == "Multiple")
        {
            // Find Column and change colours
            GridDataItem item = (GridDataItem)e.Item;
            item["DocReferences"].BackColor = Color.Tomato;
            item["DocReferences"].ForeColor = Color.White;
        }
}

I have tried adding this to the ItemCreated event but it still throws the error.
Can someone throw some light as to what is causing the error - I believe it is something to do with the Ajax process but cannot pinpoint it exactly.

I am at a loss as to how to trobleshoot this.

Regards
Roger
Shinu
Top achievements
Rank 2
 answered on 19 Mar 2012
1 answer
125 views

Hi,
I've a radTabStrip and a radMultiPage.
I need to update with AjaxManager the content of the PageView into my radMultiPage.
Each pageView creates on demand, during the OnPageViewCreated event each UserControl in the pageView.
My problem is the refresh of this control.
If I do an async postback into pageView and this adds a new pageView, on the client I never see the new pageView.
I'm able only to refresh the tabstrip, when i try to refresh the multipage, the first pageView (which called the postback) disappears, and the new pageView appears, if I select the previous pageView I receive ajax error message.
I tried also to add a custom event on my page which returns the PageViewID generated during the process and adds this to the AjaxControl, but it doesn't work, because the AjaxControl can update after the page was rendered and the user click on the button.
Can you help me?

Thanks in advance

Kate
Telerik team
 answered on 19 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?