Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
104 views
I was told that the rad controls came with all the cities for countries.

Paul
Telerik team
 answered on 10 Sep 2009
4 answers
192 views
Hi,

I'm using a RadGrid with advanced data binding, sorting and custom paging.
For the custom paging I dynamically build my query to the database (with Linq) so that only the results for the current page are retrieved.
But in order for the sorting to be correct when using paging the sorting has to be incorporated in the query as well (and before the paging). I also do this dynamically because the columns of the grid are created dynamically. So I read the lambda function to be used as an argument for the sorting from a data source.
So far everything is fine. But! As the column in question contains strings the grid knows how to order the page alphabetically on this column. And it does!, on top of the sorting I incorporated in the query...

For example, let's say I have a grid with only one column, containing first names. And let's say the only first names in the database are "Alice", "Bob" and "Claire" and that the page size of the grid is 2. I define the lambda function for ordering first names such that they are ordered by length rather than by alphabet (something like x => x.Length).
Now if I would let the grid be ordered in ascending order on the first names column I would like to have the following result:
1st page: Bob, Alice. 2nd page: Claire.
 However, the result is:
1st page: Alice, Bob. 2nd page: Claire.
It may not be immediately clear from this small example, but the result is that per page the records on it are exactly the records I want, but the order within the page is wrong due to unwanted extra automatic sorting, in this case in alphabetic order.

To be clear, I only use the NeedDataSource event and when creating the query for the data source I take care of the sorting and paging. I do not use the SortCommand event. I have tried this but I still couldn't get rid of the unwanted automatic sorting (this could very well be my inexpertice) and I started to have problems with my own implemented sorting to be one step behind. So when ASCending was requested you would get NONE, when DESCending was requested you get ASCending and when NONE was requested you get DESCending. This hase something to do with me reading from MasterTable.SortExpressions what sort is requested and using this information to dynamically get the right lambda function.

It would be really great if I could leave everything as I have it and only turn of the automatic sorting, without having to use the SortCommand event, because we have set up the project such that almost all code for using the grid is in seperate classes (such as a child class of RadGrid) so that a page using the grid only has to have minimal code (such as telling wich columns should be displayed, making the base query for the data source and define the lambda functions for sorting).
If it is unavoidable to use the SortCommand event please be very specific how this event and the NeedDataSource have to work together to avoid the sorting to be one step behind.
I rather have some extra code in the classes that take care of most things around the grid than any extra code in the pages using the grid because then I only have to write this code once instead of each time I use the grid on a page (which is going to happen a lot!).

Regards,

Mink
Mink
Top achievements
Rank 1
 answered on 10 Sep 2009
2 answers
105 views
I have a grid and use a popup edit form that I have created a template for.  On the edit event it will bind my fields just fine but now I am trying to add insert functionality as well. The problem is that I have a radio button list on the edit form that I set using the following:

<

 

asp:RadioButtonList ID="rbAnalyst" runat="server" RepeatDirection="Horizontal" SelectedValue='<%# Bind("ANALYST_IND")%>'>

 

 

<asp:ListItem Value="Y">Yes</asp:ListItem>

 

 

<asp:ListItem Value="N">No</asp:ListItem>

 

 

</asp:RadioButtonList>

 


I am not positive but I think it is trying to bind a non-breaking space... &nbsp;

Obviously adding a new record will not be able to bind a N or Y.  Can I capture the "InitInsert" on the ItemCommand event and set the value of the new grid row record to a default of say 'N' before the edit form binding occurs?  If so, how do I do this?
Robert
Top achievements
Rank 1
 answered on 10 Sep 2009
2 answers
123 views
Hello I am having a problem with my rad editor.  I need the content area to show up in white.  It seems to be picking up the background color from my page which is red.  I have tried several different settings but can't seem to get it to work right.

Thanks
Rumen
Telerik team
 answered on 10 Sep 2009
3 answers
171 views

 

Hello,

My goal is to have a list of thumbnail images, on "onMouseOver" event it will show the tooltip (working).
However, when the user click on the image (div) then display a larger/print size image. I've tried various things such as by adding the onclick event in the div tag with no success.
Please advise.

Thanks,
Quan



Here's the code snippet:

<
telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Width="700px"

 

 

Height="370px" RelativeTo="Element" Animation="Slide" Position="BottomCenter"

 

 

OnAjaxUpdate="OnAjaxUpdate"

 

 

HideEvent="LeaveTargetAndToolTip" AutoCloseDelay="15000" />

 

 

 

<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound">

 

 

<ItemTemplate>

 

 

 

<div style="float: left; text-align: center;" id="smallImage" runat="server">

 

 

<div style="border: 1px solid #999999; margin: 5px; width: 100px; height: 100px; background-position: center; background-repeat: no-repeat; background-image: url('<%# Eval("Thumbnail", "../../../Images/Thumbs/{0}") %>');">

 

 

</div>

 

 

</div>

 

 

</ItemTemplate>

 

 

</asp:Repeater>

 

Svetlina Anati
Telerik team
 answered on 10 Sep 2009
1 answer
197 views
I have a site which are used in both classic and integrated both mode and its working fine in both the mode. I have created a web.config file which is working fine in both the mode. I have only got the problem with telerik rad editor.

Telerik Rad editor for asp.net ajax requires a http handler configuration in web.config. So i have given the httphandler in both way
so i can used in classic as well as integrated mode like following.

For classic mode:

I have given followin in http handler section of web.cofig:

<

 

add verb="*" validate="false" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI"/>

 


For integrated mode i have given following 

<add path="Telerik.Web.UI.WebResource.aspx" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false" />

But the problem is that its working fine with integrated mode in IIS 7.0 but Its not working with IIS 7.0 classic mode.

I want that my web.config should work in both mode of IIS I don't want to change every time.

For IIS 7.0 classic mode i am getting following error:

Web.config registration missing! The Telerik dialogs require a HttpHandler registration in the web.config file

Can anybody help me out for this?

Rumen
Telerik team
 answered on 10 Sep 2009
4 answers
71 views
Hi,

I am using RadWindowManger and displaying a Modal Popup. I am trying to customize the look and feel onMouseDrag using the client side event OnClientDragStart. I click on the titlebar to move the window, and the control never returns back i am not able to click on any other part of the browser. This is the code i have added

<

 

telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableEmbeddedSkins="true" OnClientPageLoad="OnClientPageLoad" VisibleStatusbar="false" OnClientClose="OnClientClose" IconUrl="favicon.ico" OnClientDragStart="OnClientDragStart" OnClientDragEnd="OnClientDragEnd">

 

 

 

</telerik:RadWindowManager>
 Please let me know if i am doing any thing wrong here. In the client side events i just have an alert statement.

Thanks,
Divya

 

Georgi Tunev
Telerik team
 answered on 10 Sep 2009
7 answers
239 views
Hi,

I want the pagination to be customized in such a way that the Page size in NextPrevNumericAndAdvanced except for the following things.
I don't need the controls in the second row. Instead I want a Dropdown to select the page size. I accomplished that by adding the control along with the Pager in NextPrevMumeric mode. The issue I am facing it is that the control I wrote for this purpose does not come to the second row. It remains before the PagerText. Please find the code below:

        protected void rgUserList_OnItemEvent(object sender, GridItemEventArgs e)
        {
            if (e.EventInfo is GridInitializePagerItem)
            {
                GridInitializePagerItem info = e.EventInfo as GridInitializePagerItem;
                (e.Item as GridPagerItem).PagerContentCell.Controls.Add(
                     new CustomRADGridPager(info.PagingManager, e.Item.OwnerTableView)
                     );
            }
        }
CustomRADGridPager is the class which has the dropdown control and the required events. Your suggestions are highly appreciated.
Anil Sahu
Top achievements
Rank 1
 answered on 10 Sep 2009
6 answers
359 views
hello to all,

                i would like to  ask from  you who are expert in telerik control, coz i wanted to use a radwindow control, anyway here's my question.. when the user click the show grid button, another window will popup with a grid inside plus the values of every column load from the database. how can i do that.

sample codes is highly appreciated

thanks to all 
rmh
Top achievements
Rank 1
 answered on 10 Sep 2009
1 answer
102 views
Hello,

I have PanelBar with embedded RadToolTipManager. Within that I have a repeater that generate a list of thumbnail images.
The problem that I'm having is when I hover over the first item (far left) of the second+ row the tooltip window display on the far right.
However, when I take the PanelBar out of the equation it works just fine.

               <telerik:RadPanelBar ID="RadPanelBar1" Runat="server" ExpandMode="MultipleExpandedItems" Width="1042px" AllowCollapseAllItems="True">  
                <Items>  
                  
                    <telerik:RadPanelItem Runat="server" Expanded="True" Text="Search Results" Font-Bold="True">  
                        <Items>  
                            <telerik:RadPanelItem Runat="server" Value="RadPanelItem1">  
                            <ItemTemplate>  
                              
                                 <div style="padding: 0px; float: left; width: 1042px">  
                                    
                                     <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Width="950px"   
                                         Height="370px" RelativeTo="Element" Animation="Slide" Position="BottomCenter"   
                                         OnAjaxUpdate="OnAjaxUpdate"    
                                         HideEvent="LeaveTargetAndToolTip" AutoCloseDelay="15000" ShowDelay="1000" />  
                                   
                                     <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound" >  
                                     <ItemTemplate>  
                                       
                                        <div style="float: left; text-align: center;" id="smallImage" runat="server">  
                                            <a href="<%# Eval("PrintSize", "../../../Images/Print/{0}") %>">  
                                            <div  style="border: 1px solid #999999; margin: 1px; width: 100px; height: 100px; background-position: center; background-repeat: no-repeat; background-image: url('<%# Eval("Thumbnail", "../../../Images/Thumbs/{0}") %>');">  
                                            </div>  
                                        </div>  
                                     </ItemTemplate>  
                                     </asp:Repeater>  
                                       
                                 </div>  
                                                         
                            </ItemTemplate>                             
                            </telerik:RadPanelItem>  
                            
                       </Items>  
                    
                    </telerik:RadPanelItem>  
                  
                      
                  
                </Items>  
                  
                </telerik:RadPanelBar> 
Paul
Telerik team
 answered on 10 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?