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

We have a grid having multiple columns. Few columns have text and few columns have links which take user to different pages.
I want that if user clicks any where in row ( not on links in columns ) the row gets selected ( like shown here ) and a server side event gets fired. I got success in this, but then the links in columns do not work too. Those links also fire the same Row click event.

How can I avoid this?

Shinu
Top achievements
Rank 2
 answered on 15 Sep 2011
5 answers
292 views
Hi Telerik,

I am attempting to make the follow scenario look visually more appealing to the end user:

-- User drag-and-drops a control onto the page. This starts a postback, I manually place a loading panel over the proper area.
-- User drag-and-drops a second control onto the page before the first postback has finished. I do not wish to cancel the firstpostback, I queue up the second postback and listen in the endRequest event.

Now, I would like to display a loading panel over both of these elements. I can do that perfectly fine. The problem lies in the fact that I cannot get a handle on whose request is ending inside of the endRequest method.

var dockZoneDroppedOnID = "";
var displayOverBaseID = "";
//Handles drawing the LoadingPanels over the correct elements when callbacks are occurring.
var loadingPanel = "";
var pageRequestManager = Sys.WebForms.PageRequestManager.getInstance();
var postBackElement = "";
pageRequestManager.add_initializeRequest(initializeRequest);
pageRequestManager.add_endRequest(endRequest);
 
//This will display a loading panel over a control. It's useful to change what the loading panel is being
//displayed over in some scenarios because it just doesn't look quite right. e.g. when moving between panels
//the loading panel should only be the size of the pane that the dock is moving to, not the full size of the dock currently.
function initializeRequest(sender, eventArgs) {
    loadingPanel = $find(radAjaxLoadingPanel1ID);
    loadingPanel.hide(postBackElement);
    postBackElement = eventArgs.get_postBackElement().id;
 
    //When drag and dropping the 'interesting' control isn't where we're coming from but where we're going to.
    if (dockZoneDroppedOnID != "") {
        postBackElement = $find(dockZoneDroppedOnID).get_parent().get_id();
        dockZoneDroppedOnID = "";
    }
    else if (displayOverBaseID != "") {
        postBackElement = displayOverBaseID;
        displayOverBaseID = "";
    }
 
    loadingPanel.show(postBackElement);
}
 
//This will hide the loading panel thats currently being displayed and,
//if the user decided to continue dropping things onto the page, it will fire
//the next event.
function endRequest(sender, eventArgs) {
    loadingPanel = $find(radAjaxLoadingPanel1ID);
    loadingPanel.hide(postBackElement);
 
    if (droppedItemQueue.length > 0) {
        droppedItemQueue.shift(); //Remove the ID of the control we just finished.
        droppedItemQueue.shift(); //Remove the data for the control we just finished.
    }
 
    //If we've got more ajax requests queued up.
    while (droppedItemQueue.length > 0) {
        var uniqueDockZoneID = droppedItemQueue.shift();
        var data = droppedItemQueue.shift();
        $find(radAjaxManagerID).ajaxRequestWithTarget(uniqueDockZoneID, $.toJSON(data));
    }
     
    if( resizeQueue.length > 0) {
        resizeQueue.shift(); //Remove the ID of the control we just finished.
    }
 
    while (resizeQueue.length > 0) {
        var resizedID = resizeQueue.shift();
        $find(radAjaxManagerID).ajaxRequestWithTarget(resizedID);
    }
}

What this currently does is hide any visible loading panel on the screen before drawing a new one. I would like to keep a list of currently displayed loading panels, then, in end request, hide the appropriate loading panel. Is it possible to do this? All the examples I see just keep a single global variable and hide it in endRequest -- which will not work for my situation.

Thanks

Sean
Maria Ilieva
Telerik team
 answered on 15 Sep 2011
6 answers
137 views
I have a problem with the rendering of the Radmenu on the remote server, its ok on my devlopment machine

On page load the top padding (margin) is missing as shown in Menu1.jpg.
Following a postbacj it corrects itself as shown in Menu2.jpg.

I'm using my own copies of the skins, but they are just copies of the standard ones.

What is causing this?

Andy
PS My Radmenu is in a User Control on a Masterpage.

Peter
Telerik team
 answered on 15 Sep 2011
2 answers
131 views
how can i set focus on radcombobox on page load event.
mihir
Top achievements
Rank 1
 answered on 15 Sep 2011
2 answers
52 views
Hi,

I'm basing my question off of the example here:
http://www.telerik.com/help/aspnet-ajax/window-programming-calling-functions.html

The example has this nice and simple javascript function:

function CallFn()
{
  var oWnd = GetRadWindowManager().getWindowByName("RadWindow1");
  oWnd.get_contentFrame().contentWindow.CalledFn();
}   


What I would like is to make the function that gets called a parameter like this (which of course won't work, but that's where you geniuses come in!)

function CallFn(WindowName,FunctionName)
{
  var oWnd = GetRadWindowManager().getWindowByName(WindowName);
  oWnd.get_contentFrame().contentWindow.FunctionName
}   

Help!
Thank you!
Marin Bratanov
Telerik team
 answered on 15 Sep 2011
1 answer
90 views

 

 

Hi,
I am using telerik grid. On delete an item i want to confirm delete from user. If i increase the Confirm Text more than below then the grid deletes the item without confirmation.Is there any fixed size for RadWindow message?

My code:-
<
telerik:GridButtonColumn ConfirmText="Instesd of using 'Delete', you can use the 'Sell' option and have 

the records stored in your 'Transaction History'. Do you still want to proceed with 'Delete'?Yes(OK) or No(Cancel)"

ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" 

 

CommandName="Delete" Text="Delete" ImageUrl="/images/ImgDelete.gif" UniqueName="DeleteColumn"

 

HeaderText="Delete">

 

Marin Bratanov
Telerik team
 answered on 15 Sep 2011
9 answers
106 views
Hi,
I am creating the sliding zone and sliding panes dynamically on a button click inside an update panel.
I will attach the code below.
The problem scenario:
1.Click on the postback button to create the controls
2.Controls are created.I pin the sliding pane created dynamically.
3.Then on clicking the postback button again,the width of the RadPane increases to the RadSlidingPaneWidth and on pinning the control goes back to the previous position.
NOTE: I cannot avoid using updatepanel as it is must for my application not to postback entire page on clicking the postback button.

Default.aspx:

<%

@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

 

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<!

 

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>

 

 

<style type="text/css">

 

 

</style>

 

 

</

 

head>

 

 

<

 

script type="text/javascript">

 

 

var postbackButtonClientID = "<%=HdnVCCommandBtn.ClientID%>";

 

 

 

function RequestForControl() {

 

 

 

debugger

 

 

var requestType = "Create Control";

 

 

 

var Arguments = requestType;

 

 

__doPostBack(postbackButtonClientID, Arguments);

 

}

</

 

script>

 

 

<

 

body>

 

 

<form id="form1" runat="server">

 

 

<asp:ScriptManager ID="ScriptManager1" runat="server">

 

 

</asp:ScriptManager>

 

 

<telerik:RadSplitter ID="RadSplitter1" runat="server" Height="300" Width="400">

 

 

<telerik:RadPane ID="MiddlePane" runat="server">

 

 

<input id="button" value="postback" onclick="javascript:RequestForControl();" type="button"/>

 

 

</telerik:RadPane>

 

 

<telerik:RadSplitBar ID="RadSplitBar2" runat="server" />

 

 

<telerik:RadPane ID="RightPane" Width="20px" runat="server" Height="98px">

 

 

<asp:UpdatePanel ID="VideoControlUpdatePanel" runat="server">

 

 

<ContentTemplate>

 

 

<asp:Panel ID="TestPanel" runat="server" BackColor="#898989" Height="100%" Width="100%">

 

 

<input id="HdnVCCommandBtn" runat="server" onclick="PostbackButton_Click" type="hidden" />

 

 

</asp:Panel>

 

 

</ContentTemplate>

 

 

</asp:UpdatePanel>

 

 

</telerik:RadPane>

 

 

</telerik:RadSplitter>

 

 

</form>

 

 

</

 

body>

 

 

</

 

html>

 

Default.aspx.cs:

using

 

System;

 

using

 

System.Collections.Generic;

 

using

 

System.Linq;

 

using

 

System.Web;

 

using

 

System.Web.UI;

 

using

 

System.Web.UI.WebControls;

 

using

 

Telerik.Web.UI;

 

public

 

partial class _Default : System.Web.UI.Page

 

 

{

 

 

protected void Page_Load(object sender, EventArgs e)

 

 

{

 

ClientScript.GetPostBackEventReference(

this, string.Empty);

 

 

}

 

 

protected override void OnInit(EventArgs e)

 

 

{

 

 

base.OnInit(e);

 

 

 

if (IsPostBack)

 

 

{

 

 

if (Request.Form.Get("__EVENTTARGET") == HdnVCCommandBtn.ClientID.Replace("_", "$"))

 

 

{

 

 

RadSlidingZone rightZone = new RadSlidingZone();

 

 

rightZone.ID =

"RightZone";

 

 

rightZone.SlideDirection = Telerik.Web.UI.

SplitterSlideDirection.Left;

 

 

rightZone.Width = RightPane.Width;

 

 

RadSlidingPane rightSlidingPane1 = new RadSlidingPane();

 

 

rightSlidingPane1.ID =

"RightSlidingPane1";

 

 

rightSlidingPane1.Title =

"Right1";

 

 

rightSlidingPane1.Width =

new Unit(150);

 

 

rightZone.Items.Add(rightSlidingPane1);

 

 

RadSlidingPane rightSlidingPane2 = new RadSlidingPane();

 

 

rightSlidingPane2.ID =

"RightSlidingPane2";

 

 

rightSlidingPane2.Title =

"Right2";

 

 

rightSlidingPane2.Width =

new Unit(150);

 

 

rightZone.Items.Add(rightSlidingPane2);

 

RightPane.Controls.Add(rightZone);

 

TestPanel.Controls.Add(rightZone);

 

}

 

}

 

}

 

 

protected void PostbackButton_Click(object sender, EventArgs e)

 

 

{

 

}

 

}

 

 


Please help me with this issue asap.

Thanks in advance.


Regards,
Bhavya

Bhavya
Top achievements
Rank 1
 answered on 15 Sep 2011
1 answer
135 views
I'm dynamically setting the height of a chart based on the number of rows I have in my data. This is working fine with the exception of a large area of white space above and below the bar chart.

Here is my chart:
<telerik:RadChart ID="MetricsRadChart" runat="server" AutoLayout="true" SeriesOrientation="Horizontal" Skin="GrayStripes" Width="922px">
     <Series>
          <telerik:ChartSeries Name="Series1" />
     </Series>
     <PlotArea>
          <Appearance Dimensions-Margins-Top="0" Dimensions-Margins-Bottom="0" />
          <EmptySeriesMessage TextBlock-Text="No data available for this chart." />
          <XAxis DataLabelsColumn="ln_fi" />
     </PlotArea>
     <Legend Visible="false" />
</telerik:RadChart>

This is the line of code setting the height:
MetricsRadChart.Appearance.Dimensions.Height = Telerik.Charting.Styles.Unit.Pixel(data.Rows.Count * 25);

How can I remove the extra space between the title & chart and all the white space below it?

Thanks!

Paul
Peshito
Telerik team
 answered on 15 Sep 2011
2 answers
183 views
Hi,

Please have a look at the attached image. I want to have double headers for Rad Grid. How can I do that?
Riz
Top achievements
Rank 1
 answered on 15 Sep 2011
4 answers
78 views
Hello,
I created a custom AJAX control and try to update values in InPlace edit mode. But each time I call masterView.updateItem() function, there is no updated data in the list of new values. I use ItemCommand method and parse values like this:
if (e.CommandName == Grid.UpdateCommandName)
            {
                GridEditableItem editItem = (GridEditableItem)e.Item;
                Hashtable newValues = new Hashtable();
                editItem.ExtractValues(newValues);
            }
What should I do in my control to make new values seen by grid?
Thank you.
Dmitry
Top achievements
Rank 1
 answered on 15 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?