Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
108 views
I just finished upgrading our codebase to the Q3 2009 build for ASP.NET Ajax controls.

I have a RadControlBox inside a Web User Control.

The Web User Control is used inside a RadPanelBar.

When the page loads, the RadControlBox is loaded with my items, but is disabled.  I tried explicity setting the Enabled property to True, but this doesn't work either.

If I move the Web User control outside of the Panel Bar, it works fine.  If I move the RadControlBox from the Web User Control to a Rad Panel, it works fine.

So the problem has something to do with a RadControlBox inside a Web User Control that is used in Panel Item.

This was working fine before the Q3 upgrade.

Thoughts?
Yana
Telerik team
 answered on 10 Nov 2009
2 answers
423 views

Hi,

I have two issues.

1.  I have a RadComboBox whose selectedIndex to be reassigned at runtime based on some other actions on the page.  Though I tried setting the ComboBox.SelectedIndex = some number, ComboBox.SelectedValue = some value   - None of the ways I tried seem to work.  The Combo.SelectedItem still stays as the old selected item.  Does not change.  What am I doing wrong?

2.  I have three Image buttons in a CommandItemTemplate on my RadGrid.  These buttons are "Editall", "UpdateAll" and "CancelAll". 

Update and cancel button are initially hidden and the only button visible is Edit.  These buttons are meant to make the grid

bulk-editable and bulk-updateable.  I don't have any per row Command Items.  All the columns are created at runtime.  On inital page load, everything seem to be normal and I can only see the Edit button as expected.  When I click the button, the Grid goes goes into Edit mode (I have the code in ItemCommand event handler).  At this point I can only "see" the Update and Cancel buttons on the Command bar (again as expected).  But the problem is nothing happens when I click on either the update button or the Cancel button.  Seemingly, no event handlers get called.  What am I doing wrong?   I can give you a clue about the scenario.  If I have all the three buttons visible on the initial page load, and I click the Update button, the ItemCommand event handler does get called.  But none of the buttons fires any events on any subsequent page loads.  So, I am thinking, there must be something wrong with my postbacks.  Here is my code.  Please tell me where all do I have to do the ReBind(). The code fragment is partial only.

My aspx file:

<telerik:RadGrid ID="rgForecast" runat="server" AllowSorting="True" AutoGenerateColumns="False"
   ShowStatusBar="True" Width="800px" Skin="Forest" OnNeedDataSource="rgForecast_NeedDataSource"
   OnPreRender="rgForecast_PreRender" GroupingEnabled="False" OnItemCommand="rgForecast_ItemCommand"
   OnItemCreated="rgForecast_ItemCreated" AllowMultiRowEdit="True">
   <MasterTableView CommandItemDisplay="Top" EditMode="InPlace">
    <CommandItemTemplate>
     <div id="EditButtonDiv" runat="server" style="position: relative; float: left;

padding-right: 20px;">
      <asp:ImageButton ID="EditGrid" Text="Edit Items" AlternateText="Edit"

runat="server"
       CommandName="EditAll" ImageUrl="~/Images/Edit.gif" ToolTip="Click to Edit

the Grid" />
     </div>
     <div id="UpdateButtonDiv" runat="server" style="position: relative; float: left;

padding-right: 20px;">
      <asp:ImageButton ID="UpdateGrid" Text="Update Items" AlternateText="Update"

runat="server"
       CommandName="UpdateAll" ImageUrl="~/Images/Update.gif" ToolTip="Click to

update the Grid" />
     </div>
     <div id="CancelButtonDiv" runat="server" style="position: relative; float: left;

padding-right: 20px;">
      <asp:ImageButton ID="CancelUpdate" Text="Cancel Updates" AlternateText="Cancel"

runat="server"
       CommandName="CancelAll" ImageUrl="~/Images/Cancel.gif" ToolTip="Click to

cancel updates" />
     </div>
     <div style="position: relative; float: right; padding-right: 20px;">
      <asp:ImageButton ID="Export2Excel" Text="Export to Excel" AlternateText="Excel

Export" runat="server"
       CommandName="ExportToExcel" ImageUrl="~/Images/MoveUp.gif" ToolTip="Click

to Export grid to Excel" />
     </div>
    </CommandItemTemplate>
   </MasterTableView>
   <ClientSettings>
    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
   </ClientSettings>
   <EditItemStyle BackColor="#FFFF99" />
   <SortingSettings SortedAscToolTip="Sorted Asc" SortedDescToolTip="Sorted Desc" />
   <StatusBarSettings LoadingText="Loading. Please wait....." />
  </telerik:RadGrid>

My cs file:

 protected void rgForecast_PreRender(object sender, EventArgs e)
 {
  RadGrid grid = (RadGrid)sender;
  foreach (GridColumn col in grid.Columns)
  {
   if (Array.IndexOf(strInvisibleCols, col.UniqueName) >= 0)
    col.Visible = false;
   else
   {
    col.ItemStyle.Wrap = false;
    col.HeaderStyle.Wrap = false;
   }
  }
  //grid.Rebind();
 }

 

 protected void rgForecast_ItemCommand(object source, GridCommandEventArgs e)
 {
  if (e.CommandName == "UpdateAll")
  {UpdateGrid();}
  else if (e.CommandName == "EditAll")
  {EditGrid();}
  else if (e.CommandName == "CancelAll")
  {CancelUpdate();}
  //rgForecast.Rebind();
 }

 

 protected void rgForecast_ItemCreated(object sender, GridItemEventArgs e)
 {
  if (e.Item is GridCommandItem)
  {
   GridCommandItem commandItem = e.Item as GridCommandItem;
   ImageButton btnEdit = commandItem.FindControl("EditGrid") as ImageButton;
   btnEdit.Visible = IsKeyerUser((string)Session[Role]) && rgForecast.EditIndexes.Count == 0;
   ImageButton btnUpdate = commandItem.FindControl("UpdateGrid") as ImageButton;
   btnUpdate.Visible = rgForecast.EditIndexes.Count > 0;
   ImageButton btnCancel = commandItem.FindControl("CancelUpdate") as ImageButton;
   btnCancel.Visible = rgForecast.EditIndexes.Count > 0;
  }

 }

Please help!!

Babu.
 

Pavlina
Telerik team
 answered on 10 Nov 2009
17 answers
348 views
I first set the values server side on not postback.

tcCalEnd.DateFrom = Date.Now().AddMonths(-6)
tcCalEnd.DateSelected = Date.Now()

Then when I click a radio button via javascript I run the function on the client side
var datePickerTo = $find("ctl00_cphBody_tcCalEnd_RadDatePicker1");              
datePickerTo.set_maxDate(MaxDate);
datePickerTo.set_minDate(MinDate);
datePickerTo.set_selectedDate(MaxDate);

The value in the input box is the date from the client side function. 

But when I click submit - the value from the raddatepicker is set to the original serverside values.  It doesn't save the client side values.  Which I ran after the serverside.  Is there something else I have to do to save it?



Pavel
Telerik team
 answered on 10 Nov 2009
1 answer
120 views
I have a Default.aspx page, it contains a splitter control which divides the page to two parts, the leftpane and mainpane. The leftpane ContentUrl is set to LeftNav.aspx and mainpane ContentUrl is set to Main.aspx.

My question is, how do I call the javascript ajaxrequest that resides in LeftNav.aspx from Main.aspx? Basically I want certain action inside Main.aspx page to trigger an Ajax request on the LeftNav.aspx.

I know I can always use javascript function set_contentUrl('LeftNav.aspx') to refresh the LeftNav.aspx page URL, but the page refresh doesn't look as good as an Ajax request where you don't see the whole LeftNav refreshed.

Is this doable?

Thanks!
Svetlina Anati
Telerik team
 answered on 10 Nov 2009
1 answer
127 views
When I copy some text with some formatting (bullets etc) from word and paste it onto the editor, it does not get rendered properly.
For example, pasted text has had some additional spacing in between bullets which was not there in the original text. I have not seen this issue on the Telerik demo site. Is it something to do with the version or am i missing something? Is there any issue with the html and the formatting of ms-word?

Please help. Thanks in advance.
Stanimir
Telerik team
 answered on 10 Nov 2009
4 answers
139 views
http://demos.telerik.com/aspnet-ajax/grid/examples/performance/linq/defaultcs.aspx

In your above performance with LINQ example, does the control return all the 300,000 rows to the memory and display only what the page require? or  does it return only what the individual page need when you click on them?

Thanks
Veli
Telerik team
 answered on 10 Nov 2009
3 answers
102 views

I have the Rad editor being used at two site collections, one being the root site collection and one which comes under the root.
I have an Image Library at the Root Site Collection and I want to show the same library items inside the second site collection instead of creating another replica library at that particular site collection. I tried using the '/ImagesLibrary' but it points to the corresponding Site collection. I was going through the below post and wanted to know if the feature has been made available in the current versions.

http://www.telerik.com/community/forums/sharepoint-2007/full-featured-editor/image-manager-in-radeditor-5-2-0.aspx

Please help. Thanks in advance.

Stanimir
Telerik team
 answered on 10 Nov 2009
3 answers
169 views
I have a page that contains several RadDatePicker controls as well as an AjaxManager control that updates other (not any RadDatePicker) controls. This has worked fine using the old Rad Controls ASP.Net library (Telerik.WebControls.UI). I just upgraded to Q3 2009 release (Telerik.Web.UI), and popup calendar does not work unless I remove the RadAjax Manager (this took a while to find)... anyone else having this issue?
Thanks
ford

UPDATE: I added the old reference back in :
<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="radA" %>

And replaced the tags on the AjaxManager to use the old radA and it works now... so it would appear there is an issue with RadAjaxManager and RadDatePicker in the lastest release of RadAjax Q3 2009 (Telerik.Web.UI)


Pavel
Telerik team
 answered on 10 Nov 2009
3 answers
103 views
Hello,

I have a Serie with personalized images instead of the default item image. I don't have problem to display my images (with zoom enabled or disabled).

I define the size of my images in the BeforeLayout event as following:

protected void rcChart_BeforeLayout(object sender, EventArgs e)  
    {  
            // Configure the icons  
            foreach (ChartSeriesItem item in rcChart.Series[0].Items)  
            {  
                item.PointAppearance.Dimensions.Width = 25;  
                item.PointAppearance.Dimensions.Height = 35;  
            }  
    } 
The images are displayed correctly when the EnableZoom property is set to "false" but when this property is set to "true" the new size is not applied for my images.
I have the correct images with the default size defined automatically and the consequence is that my images are unreadable.

I used the debug mode to check if the BeforeLayout event is correctly executed and I confirm that the dimensions are correctly modified for every images.

Thank you for your help.

Joël
Quantesys IT
Top achievements
Rank 1
 answered on 10 Nov 2009
3 answers
162 views

Hi

I have i a Radgrid a formtemplate that includes 3 Dateinput fields all surrended by RadDateTimePicker

By inserting new rows:
The first datefield should be defaulted with a parameter commig from a  globdate = Request["globdate"].

The second and third datefield should after modify from datafield1 be defaulted with a value depending an this modified value.

how do I achive this with ClientEvents code ?.

 

 

 

thx
Torben

Veli
Telerik team
 answered on 10 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?