Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
116 views
Hi,

 We use iframe to show another page in RadWindow.

We create windows dynamically in code.

 

  function openNewWindow(itemUrl, itemText) {

                    if (itemUrl) {

                        var wHeigh = 400;

                        var wWidth = 550;

 

                        var windowURL = itemUrl;

                       

                        var oWnd = radopen(itemUrl, null);

                        var iconUrl = oWnd.get_iconUrl();

                        // set the new ICon

                        oWnd._titleIconElement.style.background = "transparent url('" + iconUrl + "') no-repeat scroll 0px 0px";

 

                        if (itemText != "") {

                            oWnd.set_title(itemText);

                        }

                        oWnd.moveTo(20, 20);

 

                        oWnd.add_resize(OnClientResize);

 

                        var restZoneDiv = document.getElementById("RestrictionZone");

 

                        oWnd.set_width(wWidth);

                        oWnd.set_height(wHeigh);

                    }

                }

 

 

When resizing RadWindow for the first time height never changes. There is no problem with width but height does not change.

On second attempt all work fine. Good height is retrieved in code and RadWindow is resized correctly.

Do you know where could be a problem?

Thanks for answers

Rado
Georgi Tunev
Telerik team
 answered on 24 Jan 2011
1 answer
63 views
I can use the client side method GridView.get_isItemInserted() to see whether a grid is in Insert Mode but I can't find anything about Edit Mode. I would like to prevent in javascript the user from leaving the page if the user is currently editing or inserting a grid item.
Thanks.
Princy
Top achievements
Rank 2
 answered on 24 Jan 2011
1 answer
93 views
I want to create a combo-box same as product combobox in this page:

http://demos.telerik.com/aspnet-ajax/combobox/examples/default/defaultcs.aspx


I want to create at completely at runtime, is there any code-example for it?

Regards
Mazdak
Shinu
Top achievements
Rank 2
 answered on 24 Jan 2011
0 answers
67 views


(This issue was a PICNIC - Problem in chair, not in Computer)..

If I could delete this post I would.

Brad
Brad
Top achievements
Rank 1
 asked on 24 Jan 2011
0 answers
73 views
I have a project that need use Tabstrip to show different category type, when user click a tab, it will dynamic load treeview based on category type id. when the treeview loaded, it will have checkbox with each node, also some nodes will come with textbox for user comment. My initial thought was to load whole treeview at beginning in CreateChildControls method, but client complaint the slowness of the treeview render. Then I adopted load on demand mechanism. I first only load top 2 level tree nodes and when user click plus sign to expand, it will load all tree nodes for that top level node. But in this way, the value in textbox is always empty in postback. I guess that because the BuildTreeview method is called multiple times in CreateChildControls method. Can anyone help me out on this one. I can't post code since they are a lot.

Thanks a lot in advance for your help.

Anthony 
Anthony
Top achievements
Rank 1
 asked on 24 Jan 2011
3 answers
85 views
Unless I am mistaken (or the property has recently changed and the demo not upgraded to the latest version), the Captcha - Localization demo contains a property setting of TEXTCHARS="Numbers" which doesn't exist on my system. Instead, my controls have a property for setting the image text to all numbers of   

CaptchaImage-TextChars

 

 

="Numbers"

Does the demo need to be upgraded or changed or is my Captcha control somehow wrong?

Lynn

 

Lynn
Top achievements
Rank 2
 answered on 24 Jan 2011
2 answers
789 views
I have a grid that is being populated OnNeeddDataSource
<telerik:RadGrid runat="server" ID="RadGrid1" AllowPaging="True" AllowSorting="True"
 PageSize="20" AllowFilteringByColumn="True" EnableViewState="False"  AutoGenerateColumns="False" Skin="Office2007" GridLines="None" OnItemCreated="RadGrid1_ItemCreated" OnPreRender="RadGrid1_PreRender"
OnNeedDataSource="PC_NeedDataSource">

In this grid the client column has a Filter Template that is a RadComboBox

<telerik:GridBoundColumn SortExpression="ClientName" DataField="ClientName" HeaderText="Client Name"                                               HeaderStyle-Width="300px">
     <FilterTemplate>
           <telerik:RadComboBox ID="RadComboBoxClientName" DataTextField="ClientName" DataValueField="ClientName"                                                      AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("ClientName").CurrentFilterValue %>'    runat="server" OnClientSelectedIndexChanged="ClientNameIndexChanged" Skin="Office2007">
     </telerik:RadComboBox>
     <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
        <script type="text/javascript">
             function ClientNameIndexChanged(sender, args) {
               var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
               if (args.get_item().get_value() == "0") {             tableView.filter("ClientName", args.get_item().get_value(), "NoFilter");
         }
    else {
           tableView.filter("ClientName", args.get_item().get_value(), "EqualTo");
         }
   }
 </script> </telerik:RadScriptBlock>
</FilterTemplate>
</telerik:GridBoundColumn>

This all works fine except when I try to sort on the grid when I have set a filter.  The data in the grid is correct but the DropDown gets changed to *** ALL ***.

I have tried the following code to select the by value
protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
       {
            
               if (e.Item is GridFilteringItem)
               {
                   GridFilteringItem filterItem = (GridFilteringItem)e.Item;
                   RadComboBox combo = (RadComboBox)filterItem["ClientName"].FindControl("RadComboBoxClientName");
                   if (Session["AdvisorClientID"] == null)
                   {
                       ClientDataContext db = new ClientDataContext();
                       var clients = (from c in db.Clients
                                      select new
                                      {
                                          c.ClientID,
                                          c.ClientName,
                                      })
                                     .OrderBy(c => c.ClientName);
                       combo.DataSource = clients;
                       RadComboBoxItem newItem = new RadComboBoxItem();
                       newItem.Text = "*** ALL ***";
                       newItem.Value = "0";
                       combo.Items.Insert(0, newItem);
                         
                       int test = RadGrid1.MasterTableView.FilterExpression.IndexOf("ClientName = \"");
                       if (test > 0)
                       {
                           string clientName = RadGrid1.MasterTableView.FilterExpression.Replace("(ClientName = \"", "");
                           clientName = clientName.Replace("\")", "");
                           combo.SelectedValue = clientName;// combo.FindItemByValue(clientName);
                       }
                         
                   }
                   else
                   {
                       combo.Visible = false;
                   }
               }
           }

Is there a way to keep the selected value in the combobox when the grid gets reloaded on sort?
Brad H
Top achievements
Rank 2
 answered on 23 Jan 2011
5 answers
63 views
Hi,
 I am using RadCalendar , in that click on the particular date opening the radwindow. in that window i am entering values those values are displayed on the date (daycell).. I need to display those values in the database .. Could you please tell me how to do this?
Tsvetina
Telerik team
 answered on 23 Jan 2011
14 answers
305 views
I am having an issue where regardless of the page it is placed on, the FormDecorator causes a JavaScript error.  The error is 'Sys.WebForms.PageRequestManager' is null or not an object and while it does not stop the user from using most regular pages, the error is ever present.

Is there a known cause and a way to remove this error?

Thank you,
Jonathan

Mahdi
Top achievements
Rank 1
 answered on 23 Jan 2011
4 answers
92 views
I want my appointments to render color coded, and what I've done looks good in FireFox, but not in IE.
I've set up a series of CSS styles like this:

.PlannerItemColorScheme12Color00 { background-color: #72EDDE; }

Now I want to I assign them to appointments, based upon values contained in the underlying data table from which I'm constructing the appointments.

I see this example from the RadScheduler documentation:

protected void RadScheduler1_AppointmentDataBound(object sender, Telerik.Web.UI.SchedulerEventArgs e)
   {
       e.Appointment.CssClass = "MyCustomAppointmentStyle";
   }

The problem is that I need to compute which style to apply, and I don't know how to pull that data out of "sender" or "e".

What's the smart way to do this?
WombatEd
Top achievements
Rank 1
 answered on 22 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?