Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
104 views
Hi,

I have two grids, deleting an item from one grid pops up a radprompt for a deletion reason before a ajaxRequest is called to mark the record as deleted on the server. I then get both grids to rebind however the grids are then not being updated.

The AjaxManager declaration:

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"

 

EnableAJAX="True" onajaxrequest="RadAjaxManager1_AjaxRequest" >

 

<AjaxSettings>

 

<telerik:AjaxSetting AjaxControlID="RadGridInStock">

 

<UpdatedControls>

 

<telerik:AjaxUpdatedControl ControlID="RadGridInStock" LoadingPanelID="RadAjaxLoadingPanel1" />

 

<telerik:AjaxUpdatedControl ControlID="RadGridDeleted" LoadingPanelID="RadAjaxLoadingPanel1" />

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

On the top grid is a column to trigger the delete:

 

<telerik:GridTemplateColumn UniqueName="DeleteLink">

 

 

<ItemTemplate>

 

 

<asp:LinkButton ID="DeleteLink" runat="server" Text="Delete" />

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

 

I associate the javascript with the column with this code:

 

 

protected void RadGridInStock_ItemCreated(object sender, GridItemEventArgs e)

{

 

if (e.Item is GridDataItem)

{

 

GridDataItem item = e.Item as GridDataItem;

 

 

LinkButton button = item["DeleteLink"].Controls[1] as LinkButton;

 

 

APO_Vehicle vehicle = item.DataItem as APO_Vehicle;

 

 

if (vehicle != null)

{

button.Attributes.Add(

 

"onclick",

 

 

String.Format("return deleteClick({0});",

vehicle.Id));

}

}

}

 

This calls this javascript:

 

 

var deleteId;

 

 

function deleteClick(id) {

deleteId = id;

radprompt(

 

'What is your reason for deleting this car?', promptCallBackFn, 330, 100);

 

 

return false;

}

 

 

function promptCallBackFn(args) {

 

 

// Call an ajax method to delete the record

 

if (args != null && args.length > 0) {

 

var arguments;

arguments.id = deleteId;

arguments.reason = args;

$find(

 

"<%=RadAjaxManager1.ClientID%>").ajaxRequest('{ "id" : ' + arguments.id + ', "reason" : "' + arguments.reason + '" }');

}

}

 

 

The Ajax request code is as follows:

 

 

protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)

{

 

// Code to delete record from db ..

 RadGridInStock.Rebind();

RadGridDeleted.Rebind();

}

 

 

Is there a way to get the RadAjaxManager to update the grids from the AjaxRequest method? I kind of thought this should happen automatically.

Thanks,

Stuart

 

Iana Tsolova
Telerik team
 answered on 06 Jul 2009
3 answers
135 views

Hi,

How to avoid only vertical scroll bar in the rad grid. 
My rad grid  has 10 columns in the grid and i set AllowScroll=false 
in the ClientSettings. When radgrid has loaded with the data, i could not see the veritical scroll bar. This is ok for me. But now i could not see the horizontal scroll bar also. Because of this i could see only 5 columns of the grid. Remaining 5 columns are missing. 

I need to avoid only vertical scroll bar of the grid not horizontal scroll bar.


Please sugguest.

Thanks 
Satya.
 
satya
Top achievements
Rank 1
 answered on 06 Jul 2009
3 answers
149 views
I am successfully subscribing to OnClientSelectedIndexChanged when the user selects an item, but this does not fire when a user clears the selection.

Is there any way to pick up this event?
Simon
Telerik team
 answered on 06 Jul 2009
1 answer
164 views
Is anyone having issues with the new 2009 Q2 release? I have just installed Vista (32 bit) , Visual Studio 2008, and the lastest Telerik controls on a clean machine. When I use the Telerik extension to create a new VB web project, everything works ok. When I try to add another telerik control to the webpage ( i tried a grid and a menu) I get all kinds of errors in the deisgn window. Sometimes they seem to work other times they don't. Even the script mamanger seems to error even though it had rendered just fine before I added another control. 

System.Web.UI.scriptreferenceCollection must have items of type 'System.Web.UIi.ScriptReference'. 'asp:ScriptReference' is of type 'System.Web.UIi.ScriptReference'

No runtime errors so far. Removing the script control and adding again seems to work. Just wierd. Never seen this behaviour before.
Erjan Gavalji
Telerik team
 answered on 06 Jul 2009
6 answers
139 views
Hi,

We have a situation that can be reproduced all time where the web browser seems to hang. I think it's some javascript from Telerik that calculates client heights that is responsible for it. This is our scenario;

We have a user control with a RadComboBox that gets loaded with OnItemsRequested. This user control is used on multiple places on our webplace, and works as excepted. On one of our pages we are using a modal popup window that contains several of theese user control. When we are going to search on one (and only one) of theese control, the app freezes. The other controls are working as expected (and there are controls both above and under the problem control). If we make the modal window bigger the problem goes away! - But really, we dont want to have a window with a lof of empty space.

We are using Q1 2008

Thanks
Simon
Telerik team
 answered on 06 Jul 2009
1 answer
404 views
Hi,
I'm trying to use JQuery. I read Telerik documentation about this and I want to make a sample:
<telerik:RadScriptManager runat="server" ID="RadScriptManager1">  
</telerik:RadScriptManager> 
<telerik:RadComboBox runat="server" ID="RadComboBox1" Width="300px" Skin="Telerik">  
   <Items> 
       <telerik:RadComboBoxItem Text="ASP.NET AJAX UI Controls" /> 
       <telerik:RadComboBoxItem Text="WinForms UI Controls" /> 
       <telerik:RadComboBoxItem Text="WPF UI Controls" /> 
       <telerik:RadComboBoxItem Text="Silverlight UI Controls" /> 
       <telerik:RadComboBoxItem Text="Telerik Reporting" /> 
       <telerik:RadComboBoxItem Text="Telerik OpenAccess ORM" /> 
       <telerik:RadComboBoxItem Text="Telerik Sitefinity CMS" /> 
   </Items> 
</telerik:RadComboBox> 
<script type="text/javascript">  
   (function($) {  
       $(document).ready(function() {  
           $('.rcbItem')  
           .mouseover(function() {  
               $(this).stop().animate({ paddingLeft: "30px" }, { duration: 300 });  
           })  
           .mouseout(function() {  
               $(this).stop().animate({ paddingLeft: "4px" }, { duration: 300 });  
           });  
       });  
   })($telerik.$);  
</script> 
It's OK. But I don't want to have javascript inside body element so I moved javascript to head section of my site:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
    <script type="text/javascript">  
   (function($) {  
       $(document).ready(function() {  
           $('.rcbItem')  
           .mouseover(function() {  
               $(this).stop().animate({ paddingLeft: "30px" }, { duration: 300 });  
           })  
           .mouseout(function() {  
               $(this).stop().animate({ paddingLeft: "4px" }, { duration: 300 });  
           });  
       });  
   })($telerik.$);  
</script> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager> 
    <div> 
        <telerik:RadComboBox runat="server" ID="RadComboBox1" Width="300px" Skin="Telerik">  
   <Items> 
       <telerik:RadComboBoxItem Text="ASP.NET AJAX UI Controls" /> 
       <telerik:RadComboBoxItem Text="WinForms UI Controls" /> 
       <telerik:RadComboBoxItem Text="WPF UI Controls" /> 
       <telerik:RadComboBoxItem Text="Silverlight UI Controls" /> 
       <telerik:RadComboBoxItem Text="Telerik Reporting" /> 
       <telerik:RadComboBoxItem Text="Telerik OpenAccess ORM" /> 
       <telerik:RadComboBoxItem Text="Telerik Sitefinity CMS" /> 
   </Items> 
</telerik:RadComboBox> 
 
    </div> 
    </form> 
</body> 
</html> 

And now there is an error:
http://img229.imageshack.us/img229/1006/telerikjquerybug.jpg ('$telerik' is undefined).
Is it the proper behaviour? I want to put all javascript code into seperate file and include with sigle line:
<script type="text/javascript" src="file.js">
 
 

 

 

What do I wrong?

Veselin Vasilev
Telerik team
 answered on 06 Jul 2009
4 answers
93 views
Hi All,
         Is there a way to prevent the user from dragging an dropping appointments over existing appointments ?

Thanks,
Aditya
Aditya
Top achievements
Rank 1
 answered on 06 Jul 2009
3 answers
199 views
Pointers needed with the following
I need to hide the image / functionality below if the data value is null

<telerik:GridTemplateColumn ItemStyle-Width="22px" UniqueName="CertFileName">
          <ItemTemplate>
            <asp:ImageButton ID="CertFileName" Runat="server" AlternateText="Download Certificate" ToolTip="Download Certificate"
            ImageUrl="../Images/Cert.gif" CommandArgument='<%# DataBinder.Eval(Container,"DataItem.CertFileName")%>' CommandName="CertFileName"/>
          </ItemTemplate>
       </telerik:GridTemplateColumn> 

Thanks

Jeff Wickersham
Top achievements
Rank 1
 answered on 06 Jul 2009
2 answers
125 views
How can i show some thing such as a panel or some text box in rad window?
Svetlina Anati
Telerik team
 answered on 06 Jul 2009
3 answers
104 views

I have a custom telerik skin and am creating a tooltip on the client side using the tooltip manager and client side code. I'm not able to get the tooltip working with my custom skin. After I applied the custom skin, the tooltip will still show, but without a skin, it's background is transparent.

I created a server side tooltip control to test my custom skin and it works.
I tried adding the custom skin on the tooltip manager control, this had no effect.

Is there a way to specify a custom skin for a tooltip when creating the tooltip from the client side.

Here is snipets of my code:

All css files for my skin are registered in default.aspx, here is the tooltip css:
<link rel="stylesheet" type="text/css" href="/dnn51/Portals/_default/WebControlSkins/MySkin/ToolTip.MySkin.css" />

 

My tooltip manager is registered in the code behind:

RadToolTipManager tooltipMgr = new RadToolTipManager();
tooltipMgr.Skin = "MySkin";
tooltipMgr.EnableEmbeddedSkins = false;
tooltipMgr.ID = "DefaultToolTipMgr";

Page.FindControl("ToolTipMgrPlaceHolder").Controls.Add(tooltipMgr);

In javascript, I create the tooltips:
function pageLoad() {

  jQuery(".myLabel").each(function() {
    var html = jQuery(this).children("div").html();
    if (html != null && html != "") {
      var tooltip = $find(__DefaultTooltipManagerID).createToolTip(jQuery(this).children("img")[0]);
      tooltip.set_title("<span style=\"padding:15px\">" + html + "</span>");
      }
  });

}






Svetlina Anati
Telerik team
 answered on 06 Jul 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?