Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
623 views
Hello -

I am using the RadAlert called from code behind to to mimic a modal messagebox and it is working quite well.

 

public void ShowRadAlert(string p_msg, string p_title)  
        {  
            //RadAlert(msg, height, width, title)  
            ScriptManager.RegisterStartupScript(Page, typeof(Page),  
                   "ShowAlert",  
                   string.Format(@"  
                        function _showAlert() {{Sys.Application.remove_load(_showAlert);     
                        radalert('{0}', null, 100, '{1}');}};     
                        Sys.Application.add_load(_showAlert);", p_msg, p_title), true);  
        }  
 

 

The question I have is this: Is there anyway to set focus to a control on the calling page after the OK button is clicked on the RadAlert. For example, I have validation on the main page to check to see if the value in a textbox (tbEmployeeCount) is entered and if it isn't display the RadAlert and then set tbEmployeeCount.focus() so the user can enter a value.

Thanks -

 

Svetlina Anati
Telerik team
 answered on 28 Dec 2009
7 answers
167 views
Hi,
In my web application, I use a master page for all pages.
This master page contains a RadSplitter (horizontal orientation) which first pane's contains the header of my pages.

The question is : is it possible to persit the Collapsed property when navigating from a page to another of the application.

There is no way to set this property on server side and to use the Session to persist it for example...

For example :
If (PageReferrer.Master.RadPaneHeader.Collapsed = true) Then (this.Master.RadPaneHeader.Collapsed = true)

Is there any solution to do that?
Thanks for any help.
Svetlina Anati
Telerik team
 answered on 28 Dec 2009
2 answers
168 views
Hi,

Please refer to the attached image -  I've modified the alignment of the RadTextbox controls in the Telerik Demo for RadMenu to reproduce the issue to make sure that it is not my implementation that is causing the problem.

The concern is that if a Textbox has focus set on it (cursor blinking inside the textbox), and radmenu is hovered-upon, the Rad SubMenu opens but the blinking cursor inside the Textbox is visible even across the radmenu layer.

The issue has been reported by the customer when we were using ComponentArt Menu, and now we migrated to Telerik Menu but the issue persists with Telerik also.
Any idea how this can be fixed - workaround is acceptable unless it is to be applied on Menu and not on every textbox in application ;)

Wish you a Merry Christmas and a Happy New Year!

Thanks and Best Regards,
Veenu Munjal
Kamen Bundev
Telerik team
 answered on 28 Dec 2009
1 answer
524 views
Hi,
I'm using a RadGrid with AllowPaging=true and AllowCustomPaging=true.
The grid also has the events PageSizeChanged and PageIndexChanged enabled.

In Page_Load I'm setting the grid PageSize to 50 but when running the page it only shows 10 rows and I figure it out the cause to be in the pageSizeChanged event.
It looks like this:
       protected void radGridCompanies_PageSizeChanged(object source, Telerik.Web.UI.GridPageSizeChangedEventArgs e) 
        { 
            //_take = radGridCompanies.PageSize; 
            //Label1.Text = "ny:" + radGridCompanies.PageSize.ToString(); 
            //radGridCompanies.PageSize = e.NewPageSize; 
            //_skip = e.NewPageIndex * radGridCompanies.PageSize; 
            //radGridCompanies.PageSize = radGridCompanies.PageSize; 
 
            //_skip = 0; 
             
            radGridCompanies.CurrentPageIndex = 0; 
            //radGridCompanies.DataSource = null; 
            radGridCompanies.Rebind(); 
        } 

The grid is only showing 10 rows because of the rebind() call.

Do I need to save the grids PageSize property in ViewState or Session or something and reset it somewhere or what is best practice when using custom paging?
(thou I have tried to reset the PageSize in the event above but the then the hole page times out)

/Mattias

Tsvetoslav
Telerik team
 answered on 28 Dec 2009
1 answer
115 views
WHat is the best solution to define a combo box value as optional when bounded to database view result set?

Right now ComboBox is attached to view result set and by default on page launch, first item in combo is selected. User is unable to pass null/empty value for this field.

Thanks,
Ali.
Genady Sergeev
Telerik team
 answered on 28 Dec 2009
7 answers
244 views
Is there a way to set a maximum height on the ComboBox's dropdown?  We have several ComboBoxes on forms where we do not know how many items will be in the list.  We want the dropdown to be as small as possible, and if it will be longer than say 300px, display scroll bars.  The problem is if we just set the height to 300px right now, if the list only has 3 items in it there is a large blank space.

Right now we are just setting the height of the ComboBox server side if the count exceeds a certain amount, but this is very inconsistant as not only can some of the items wrap around to multiple lines of text but also as different font sizes are chosen on the browser other problems occur.

I guess ideally we want the control to behave like a traditional html dropdown within the browser in terms of having it automatically figure out if it will fit within the current window and if not introduce then introduce scroll bars.  Any suggestions?
Shinu
Top achievements
Rank 2
 answered on 28 Dec 2009
2 answers
127 views

I think I encountered a bug with the image manager for the 2009 Q3 radeditor. It works fine in 2009 Q1.

I am using the RadEditor in DotNetNuke 5.2. When inserting an image, the image has a url which looks like this:
 src="/portals%09estt/images/logo.gif" or  src="/portalstestt/images/logo.gif. Notice the '%09' in the first case and the missing '/' in the second. This is for a parent portal for a site which looks like testt.example.com. This site has a portal folder called 'testt' under DNN's portals folder.
I did several tests and I think I found a pattern.

The image manager works fine if the url is a domain name like example.com. If the site is for a subdomain like sub1.example.com then the path to the images are broken as mentioned above and the image manager doesn't show any image previews.

When I did the same tests for 2009 Q1 version, everything worked fine. The Q3 version I used was 2009.3.1104.35.

Rumen
Telerik team
 answered on 28 Dec 2009
1 answer
144 views

Hi All,
I have a RadGrid and a lable as shown below.

<telerik:AjaxSetting AjaxControlID="grdOverdue">  
        <UpdatedControls> 
            <telerik:AjaxUpdatedControl ControlID="grdOverdue"/>              
            <telerik:AjaxUpdatedControl ControlID="lblError"/>    
        </UpdatedControls> 
</telerik:AjaxSetting>     
<asp:Label ID="lblError" runat="server" Text="" Visible="false" SkinID="Error"></asp:Label>    
    <telerik:RadGrid ID="grdOverdue" runat="server"   
            ....  
            <CommandItemTemplate> 
                    <span style="float:left;margin-left:5px;">  
                        <asp:Label ID="lblJobCount" runat="server" Text=""></asp:Label> 
                    </span> 
                    <span style="float:right;margin-right:5px;">                          
                       <asp:LinkButton ID="lbExportAll" runat="server" CommandName="ExportToExcel">Export All</asp:LinkButton>&nbsp;&nbsp;  | &nbsp;&nbsp;  
                       <asp:LinkButton ID="lbExportSelected" runat="server" CommandName="ExportSelectedToExcel">  Export Selected</asp:LinkButton>                     
                   </span> 
               </CommandItemTemplate> 
               ....  
</telerik:RadGrid> 

and in the grdOverdue_ItemCommand event I am displaying error message if the user has not selected atleast one item in the grid.
protected void grdOverdue_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)  
    {  
      
        if (e.CommandName == "ExportSelectedToExcel")  
        {  
            if (selectedJobs.Count == 0)  
            {  
                lblError.Visible = true;  
                lblError.Text = "Please select atleast one job to export.";        
            }  
            else{  
                lblError.Visible = false// this is not working.  
            }  
          
        }  
    } 

Please suggest how to clear the error message and make the label invisible? Thank you.
Princy
Top achievements
Rank 2
 answered on 28 Dec 2009
1 answer
119 views
hi,

is there any property to set for treeview for reordering/sorting the nodes according to values? how can i accomplish this.

thanks
Shinu
Top achievements
Rank 2
 answered on 28 Dec 2009
1 answer
136 views
Hi,

My find control is always return  null value.

 </Columns>            
              <EditFormSettings EditFormType="Template">                  
              <EditColumn UniqueName="EditCommandColumn" ButtonType="ImageButton">                
                </EditColumn>                  
                    <FormTemplate>                    
                    <table id="Table2" cellspacing="2" cellpadding="1"  border="0" rules="none"
                            style="border-collapse: collapse; background: white;">
                        
                        <tr>
                             <td>
                                    <table >
                                         
                                                <tr>
                                                <td>
                                                 <b>MaxTickets</b>
                                                </td>                                                
                                                <td>
                                                
                                                         <asp:TextBox ID="txtMaxTickets" Text='<%# Bind("MaxTickets") %>' runat="server"></asp:TextBox>

                                                </td>
                                            </tr>
                                            
             

protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
    {
        
            if (e.CommandName == "cmdTicket")
            {
              
                GridDataItem item = (GridDataItem)e.Item;
                TextBox txtMaxTickets = (TextBox)item.FindControl("txtMaxTickets");  


                DbConnection Con = new DbConnection();
                SqlConnection Conn = new SqlConnection();
                Conn = Con.SQLConnection();
                Conn.Open();
                string sqlStr = "CreateTicket";
                SqlCommand cmd = new SqlCommand(sqlStr, Conn);
    

How can i use findcontrol?

lakmal
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 27 Dec 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?