Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
190 views
Hi,

I have some slider inside asp:panel.
but the slider exceed the boundary of the panel.
How to fix it?

http://www.freeimagehosting.net/uploads/bf494e033e.jpg

Thanks,
Vincent

Tsvetie
Telerik team
 answered on 23 Jul 2009
2 answers
112 views

Hi,

I'm using Rad grid in one my page. The page has a master page and I placed the grid in its child page. I'm binding the grid with the below code, since the code is called on the search button click event , we placed this separately
 

function BindUnAssignedPeopleGrid(result) {
var grid = $find("<%= grdUnassigned.ClientID %>")
var masterTableView = grid.get_masterTableView();
RemoveNoRecordRow(masterTableView.get_element());
if (result == null || result == '' || result == 'undefined') {
result = new Array();
}
masterTableView.set_dataSource(result);
masterTableView.dataBind();
}

and the designer page grid

<telerik:RadGrid ID="grdUnassigned" runat="server" Height="253px" AutoGenerateColumns="False"
GridLines="None" AllowMultiRowSelection="True" Skin="Vista" AllowSorting="true" OnSortCommand="grdUnassigned_SortCommand">
<MasterTableView DataKeyNames="PersonID,Name" TableLayout="Fixed" ClientDataKeyNames="PersonID,Name">
<Columns>
<telerik:GridBoundColumn DataField="Name" HeaderText="Name" ItemStyle-Width="100%">
</telerik:GridBoundColumn>
</Columns>
<RowIndicatorColumn>
<HeaderStyle Width="30px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="30px"></HeaderStyle>
</ExpandCollapseColumn>
</MasterTableView>
<ClientSettings AllowColumnHide="True" EnablePostBackOnRowClick="false">
<Selecting AllowRowSelect="True" />
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
<FilterMenu EnableTheming="True">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</FilterMenu>
<FilterItemStyle BackColor="#CCFFFF" />
</telerik:RadGrid>

and in serverside sorting( we need everything to be done in client side, help me in this to sort in client side itself)

protected void grdUnassigned_SortCommand(object source, GridSortCommandEventArgs e)
{
try 
{

if (!e.Item.OwnerTableView.SortExpressions.ContainsExpression(e.SortExpression))
 {
GridSortExpression sortExpr = new GridSortExpression();
sortExpr.FieldName = e.SortExpression;
sortExpr.SortOrder = GridSortOrder.Descending;
e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);
}
}
catch (Exception ex)
 
{
}}

but when i do sorting i'm getting "Sys.webforms.pagerequestmanagerparserErrorexception " error. please help me to solve this. I need everything to be done in client side.

Thanks in advance

Its urgent please help me ASAP. 

 

 

Sebastian
Telerik team
 answered on 23 Jul 2009
1 answer
114 views
Hello,

I have been trying to use the collapse method with the splitter.  My first try has left me with a strange visual problem: when I click open the slidingzonepane, it shows me the content of the pane, namely a button which triggers the pane's collapse() method.

When I click on the button, the icon for the frame disappears but the content remains.  Shouldn't it disappear too?

This was tested on IE7 and a machine running ,NET 3.5 SP1.  There is nothing in the code behind.

My code:

<%

@ 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>

 

</

 

head>

 

<

 

body>

 

 

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

 

 

<div id="dvError">

 

 

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

 

 

</asp:ScriptManager>

 

 

</div>

 

 

<div>

 

 

<telerik:RadSplitter BackColor="Transparent" ID="Radsplitter1" runat="server" Height="707px"

 

 

Width="940" Skin="Default" BorderSize="0" BorderStyle="None" PanesBorderSize="0">

 

 

<telerik:RadPane BorderStyle="None" ID="MiddlePane" runat="server" BorderWidth="0px">

 

 

<div id="reportPane">

 

REPORT GOES HERE

 

</div>

 

 

</telerik:RadPane>

 

 

<telerik:RadPane BorderStyle="None" ID="RightPane" BackColor="Transparent" runat="server"

 

 

Width="32" Scrolling="none">

 

 

<telerik:RadSlidingZone ID="RightSlidingZone1" runat="server" BorderStyle="None"

 

 

ClickToOpen="True" SlideDirection="left" Width="32">

 

 

<telerik:RadSlidingPane ID="RightSlidingPane1" runat="server" EnableTheming="true"

 

 

IconUrl="Images/expandpanel-label-closed.gif" Scrolling="None" Width="910px">

 

 

<div id="divTest" style="display: block">

 

 

<table>

 

 

<tr>

 

 

<td>

 

 

<input type="button" onclick="testfunction()" value="collapse" />

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</div>

 

 

</telerik:RadSlidingPane>

 

 

</telerik:RadSlidingZone>

 

 

</telerik:RadPane>

 

 

</telerik:RadSplitter>

 

 

</div>

 

 

</form>

 

 

 

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

<script type="text/javascript">

 

 

var slidingZone = <%= RightSlidingZone1.ClientID %>;

 

 

var splitter = <%= Radsplitter1.ClientID %>;

 

 

var slidingpane = <%=RightPane.ClientID %>

 

 

 

function testfunction()

 

{

paneId =

"<%= RightPane.ClientID %>";

 

 

var splitter = $find("<%= RadSplitter1.ClientID %>");

 

 

var pane = splitter.getPaneById(paneId);

 

 

if (pane)

 

{

alert(pane);

pane.collapse();

 

//$get("divTest").style.display = "none";

 

}

 

else

 

{

alert(

"Pane with ID '" + paneId + "' not found.");

 

}

}

 

</script>

 

 

</telerik:RadCodeBlock>

 

 

</

 

body>

 

</

 

html>

 

Svetlina Anati
Telerik team
 answered on 23 Jul 2009
3 answers
351 views
Hi there

I using the radgrid and i'm trying to change the readonly attribute in a cell in the code behind

I'm looping thru the griditm and would like to change the readonly

For

 

Each grdItem As GridDataItem In radResourcesList.MasterTableView.Items

 

 

    If TypeOf grdItem Is GridEditableItem Then

 

 

        Dim editableItem As GridEditableItem = CType(grdItem, GridDataItem)

 

        editableItem.Edit =

True

 

        If bchange = true then
            ' I would like ot change the griditem("attend") readonly attibute from true ot false 
        End If        

        

    

 

 

 

    End If        
Next

you help is appreciated

thanks
Tony

 

Daniel
Telerik team
 answered on 23 Jul 2009
1 answer
150 views
I have a DropDownList inside of a PageView on my tabstrip.  Can someone give me a javascript example of how I would reference the DropDownList and more importantly, how to find the SelectedText of the DropDownList?

I am using the following code to reference the DropDownList, but cannot get the selected text:

var filterName = $telerik.findElement(pageView1.get_element(), "ddlFilterNames");  
 
Paul
Telerik team
 answered on 23 Jul 2009
1 answer
91 views
How to get grid data values from detail table when expand=false.
mease i have not expanded the detail table view and i want to extract those values from the grid.

i m not geting the values in this scenerio.
please help me to find the values from the detail table view
Shinu
Top achievements
Rank 2
 answered on 23 Jul 2009
5 answers
673 views
I like to get the values with the right type (not strings) from GridDateTimeColumn and GridNumericColumn.
 GridColumnCollection columns = e.Item.OwnerTableView.Columns;     
        foreach (GridColumn column in columns) 
            { 
                if (column is GridDateTimeColumn) 
                { 
 
                    if (startdatetime.Equals(column.UniqueName)) 
                    { 
                        // How do i get the value as a DateTime?
 
                    } 
                    else 
                    { 
                        throw new Exception( 
                            String.Format("No implementation for column.UniqueName: {0} (UpdateResourceTimeOff) ", 
                                          column.UniqueName)); 
                    } 
                } 
                else if (column is GridNumericColumn) 
                { 
 
                    if ("someTextString".Equals(column.UniqueName)) 
                    { 
                        // How do i get the double value 
                    } 
                    else 
                    { 
                        throw new Exception( 
                            String.Format("No implementation for column.UniqueName: {0} (UpdateResourceTimeOff) ", 
                                          column.UniqueName)); 
                    } 
                } 


Daniel
Telerik team
 answered on 23 Jul 2009
1 answer
61 views
Hello,
        When i change telerik reference version 2008.2.826.35 to 2009.2.701.20 then control theme messed up. So give me solution to overcome this problem and give me steps to solve it.


Regards,

Bhavesh Rana


Paul
Telerik team
 answered on 23 Jul 2009
1 answer
992 views
When I do a radgrid (q2, 2009) databind on the client side, I want to set the column command argument (GridButtonColumn in this case). Alternatively, I'd like to set the command argument of the button inside this column.

I'd also like to set the command argument and name in the server side radgrid ItemDataBound event handler.

I have found no documentation or examples on how to do this. Any ideas?
Princy
Top achievements
Rank 2
 answered on 23 Jul 2009
6 answers
366 views
Hi,

I have a web-usercontrol which works fine - on a normal (ajax enabled) page.
But when I place the control in a Grid's Edit FormTemplate the emitted script no longer works.
The control is only used in edit mode - and I looked around a lot here - but I could not get it to work.
By the way - the script is in the source of the page - but it is somehow ignored.

My Control renders some script in it's OnPreRender handler.
The approach is to add an "OnLoad" handler for a contained control.
Again - it works well as long as it is not in a grid.

Here is my (I tried what ever I found and could imagine) PreRender function:
protected override void OnPreRender(EventArgs e) {  
    string strScript="alert('Hello');";  
    base.OnPreRender(e);  
    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MyBlock" + ClientID, strScript, true);  
    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "MyBlock1" + ClientID, strScript, true);  
    RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "MyBlock2" + ClientID, strScript, true);  
    aM.ResponseScripts.Add("<script type=\"text/javascript\">\r\n" + strScript + "\r\n</script>");  
    this.Controls.Add(new LiteralControl("<script type=\"text/javascript\">\r\n" + strScript + "\r\n</script>"));  
        //rtBox.ClientEvents.OnLoad = "OnLoad_" + ClientID;  
} 
To keep the things simple - I used just an alert to this script - which should alter when the script is seen by the client.
But it does nothing!!
Although the alert is there in source code!!

Being a bit frustrated - I tried the "direct approach" and changed my control to this:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WSTextBox.ascx.cs" Inherits="VJF09.Classes.WSTextBox" %> 
<script type="text/javascript">  
    function OnThisloaded() {  
        alert("Tet");  
    }  
</script> 
<telerik:RadTextBox runat="server" ID="rtBox" ClientEvents-OnLoad="OnThisloaded">  
</telerik:RadTextBox> 
 
 
The result - after I switch to edit I get an error message: "Onthisloaded" not found.

Regards

Manfred


ManniAT
Top achievements
Rank 2
 answered on 23 Jul 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?