Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
198 views
hi,

Hello, after populated the grid with a class

<telerik:RadGrid ID="radGridListTypeRoom" runat="server" 
                            AllowPaging="false"  
                            Width="100%" 
                            AutoGenerateColumns="false" 
                            OnDetailTableDataBind="radGridListTypeRoom_DetailTableDataBind">
                            <MasterTableView DataKeyNames="hotelRoomTypeId" DataMember="MasterGrid" Name="TypeRoom" Width="100%">
                                <DetailTables>
                                    <telerik:GridTableView DataKeyNames="hotelRoomTypeId" Name="DetailPrice" Width="100%">
                                         <Columns>
                                            <telerik:GridTemplateColumn HeaderText="Username">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblName" runat="server" Text='<%# Bind("name") %>'></asp:Label>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                        </Columns>
                                    </telerik:GridTableView></DetailTables>
                                <Columns>
                                    <telerik:GridBoundColumn DataField="name" HeaderText="Tipo di stanza">
                                    </telerik:GridBoundColumn>    
                                    <telerik:GridBoundColumn DataField="isAvailable" HeaderText="Disponibilità">
                                    </telerik:GridBoundColumn>                                    
                                </Columns>
                            </MasterTableView>
                            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                        </telerik:RadGrid>



radGridListTypeRoom.DataSource = hotel.RoomTypes;
radGridListTypeRoom.DataBind();

when fired the event to view the detail (Hierarchy)  how can i retrieve the object class?

        protected void radGridListTypeRoom_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
        {
            GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
 
            RoomType roomType = (RoomType)dataItem.DataItem;
 
            switch (e.DetailTableView.Name)
            {
                case "DetailPrice":
                    {
 
                        break;
                    }
            }
        }


why dataitem.dataitem is null ?

Thanks for the collaboration and sorry for bad eng.
Pavlina
Telerik team
 answered on 03 Aug 2011
4 answers
84 views
OK not sure if my title was too descriptive or not, but I am rather new to Talerik so this could just be a basic question. We are using a rad window for all our messages back to a user (process succesful, or failed, and etc.) some of our recent changes added user controls to a parent page and those need to now call the rad window that is on the aspx page of the parent page and pass the message to the user. How do we do this?

Here is current code on the parent page code behind when opening the window:
if (isSuccess)
{
message = "blah blah blah was successful, now do blah blah blah";
MessageRadWindow.NavigateUrl = "MessageAlert.aspx?message=" + encrypt.encrypt(message);
MessageRadWindow.Visible = true;
MessageRadWindow.VisibleOnPageLoad = true;
}

Now, that works well for what the message window is needed to do, however I am unsure how to call that same MessageRadWindow from the user control that is now embeded in that same page via a page.loadcontol method. I have attemtped different .GetControl methods and a couple things I found on the forums here and can neve get it to compile because it isn't finding the parent page controls for some reason. I am getting things like:
Error 281 The name 'RadAjaxManager1' does not exist in the currentcontext C:\_tfs\xxxx\xxxx\xxxx\Schedulexxxx.ascx.cs 81 14 xxxx_admin

What am I missing? Does the usercontrol need it's own ajax manager, and if so how do I get it there because I get errors stating cannot have more than on ajax manager on a page when I attempted to add one tot he user control?
Marin Bratanov
Telerik team
 answered on 03 Aug 2011
4 answers
74 views
Is it possible to change the text of the Mode Tabs?  For example, inside of the tab saying "Design" I'd like it to say "Edit".
Matt
Top achievements
Rank 1
 answered on 03 Aug 2011
4 answers
120 views
Hi,

I have a RadRotator that shows the list of images and the rotator scrolls from top to bottom. I just want to illustrate my problem with an example. I have 5 images bound to the rotator control. At any point of time, only 2 images will show up. i scroll down and select image 4. I have OnItemClick event that does some action based on the image that i select. My objective is: I would want to retain the selection of 4th image (at least from the UI perspective). What is happening is: after the postback event, selection is lost in the radrotator event and rotator resets and shows the first item. Is there a way that i can retain the same image? I tried doing partial postback using AJAX to ensure rotator control is not updated. But even this didn't help. any help on this?

<telerik:RadRotator ID="thumbRotator" runat="server" RotatorType="Buttons" WrapFrames="false"
                        FrameDuration="1" ScrollDirection="Up, Down" OnItemClick="thumbRotator_ItemClick"
                        EnableEmbeddedSkins="false" Skin="FAPortalRotator" CssClass="rotatorVertical"
                        ItemWidth="300px" ItemHeight="225px">
                        <ItemTemplate>
                            <asp:Image ID="chartImage" runat="server" AlternateText="Image" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "ImageURL")%>'
                                CssClass="thumbnail" />
                        </ItemTemplate>
                        <ControlButtons LeftButtonID="img_left" RightButtonID="img_right" />
                    </telerik:RadRotator>


Regards,
Kishan G K
Kishan Gandikota
Top achievements
Rank 1
 answered on 03 Aug 2011
3 answers
82 views
I have a radgrid inside a radajaxpanel.  outside of the ajaxpanel I have an instance of a usercontrol that has two buttons: one button exports the radgrid to excel and the other exports the radgrid to a pdf doc.  I can get the code to execute and open the results of the radgrid in a new window either excel or PDF, but when I close the new window and return to the parent page, the mouse pointer is an hourglass until I either manually refresh the page, or click a different button on the page that does a postback.  How do I get the hourglass to go away and display the normal mouse pointer?
Pavlina
Telerik team
 answered on 03 Aug 2011
1 answer
85 views
Hi dear,
my javascript code dosen't work and i got stack overflow error after a timeout.
this is my javascript code for itemShowing:

 

function itemShowing_handler(sender, args)

 

{

log(sender.get_id() +

" is about to change a frame");

 

 

 

var rotator = $find("<%= RadRotator1.ClientID %>");

 

rotator.showNext(Telerik.Web.UI.RotatorScrollDirection.Right);

}

I have 2 rotator, RadRotator1 and RadRotator2. RadRotator2 has 4 items in every showing, RadRotator1 must show items of RadRotator2, one by one in the duration of itemshowing of RadRotator2. but
Marin Bratanov
Telerik team
 answered on 03 Aug 2011
3 answers
125 views
Hello,

I have a date column in my grid which shows dates in the "d" format, dd/MM/yyyy.  However, the underlying data sometimes (actually most of the time) contains dates that have a non-12 AM time component, such as 12/10/1998 8:30 am.  The user does not see the 8:30 am part, and when they try to use the column filter for date EdualTo 12/10/1998, they do not get a match, since the time component is not the perfect 12:00:00 am.  Is there any trick to get around this issue?
Dasha
Top achievements
Rank 1
 answered on 03 Aug 2011
1 answer
267 views
Hello,

I have the folowing RadSplitter control.
I need to expand the RadSlidingPane (ContentRadSlidingPane) onload, and to prevent the use from collapsing it (Exactly as http://www.telerik.com/help/aspnet-ajax/introduction.html).
<telerik:RadSplitter ID="RadSplitter1" runat="server" Width="700" Height="500">
           <telerik:RadPane ID="LeftPane" runat="server" Width="22px" Scrolling="none">
                <telerik:RadSlidingZone ID="ContentsSlidingZone" runat="server" Width="22px">
                    <telerik:RadSlidingPane ID="ContentRadSlidingPane" Title="Pane1" runat="server"  Width="150px">
                        Contents
                    </telerik:RadSlidingPane>
                </telerik:RadSlidingZone>
            </telerik:RadPane>
            <telerik:RadSplitBar ID="Radsplitbar1" runat="server"></telerik:RadSplitBar>
            <telerik:RadPane ID="MiddlePane1" runat="server" Scrolling="None">
                <telerik:RadSplitter ID="Radsplitter2" runat="server" Orientation="Horizontal" VisibleDuringInit="false">
                    <telerik:RadPane ID="Radpane2" runat="server">
                        <div style="padding: 5px">
                            <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
         
                            </asp:ContentPlaceHolder>
                        </div>
                    </telerik:RadPane>
                </telerik:RadSplitter>
            </telerik:RadPane>
        </telerik:RadSplitter>

Please, I need you help,
It is appreciated to send me the modified code.

Regards,
Bader
Dobromir
Telerik team
 answered on 03 Aug 2011
1 answer
55 views
Hi All,
Please have a look on the image attached.

In That I have used rad grid with grouping option.
My requirement is like I need to group
-> group1
    ->groupmember1(now need to group based on groupmember1 )
    ->groupmember2(now need to group based on groupmember2 )
        -mem1
        -mem2
    ->groupmember3
->group2
 
I mean first i want to group based on group1 and inside group1
I need to group based on each member of group(groupmember1) as shown above.
In this i need to implement filteration , sorting , editing

Please let me if any way to achieve this....
Vasil
Telerik team
 answered on 03 Aug 2011
3 answers
98 views
I want to find a node on a Treeview based on not the value of the node but based on combination of both value and category as the value field is not unique.

I am writing the following code and just want to clarify whether it's correct.

  If Not radTree.FindNode(Function(o) o.Value = NodeValue  And  o.Category = "PORT") Is Nothing Then
            node = radTree.FindNode(Function(o) o.Value = NodeValue And o.Category = "PORT")
  End If

Thanks
Madhu Rao
Nikolay Tsenkov
Telerik team
 answered on 03 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?