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

I have built a grid dynamically including the following button column...
...

GridButtonColumn buttonColumn = new GridButtonColumn();

buttonColumn.ButtonType =

GridButtonColumnType.ImageButton;

buttonColumn.ImageUrl =

"~/images/delete.png";

buttonColumn.CommandName =

"Delete";

buttonColumn.UniqueName =

"deleteColumn";

buttonColumn.HeaderStyle.Width = 16;

buttonColumn.ConfirmText = (

"Confirm Delete");

buttonColumn.ConfirmTitle =

"Delete Item";

RadGrid1.Columns.Add(buttonColumn);

....

and then added 
...
RadGrid1.DeleteCommand += new GridCommandEventHandler(RadGrid1_DeleteCommand);
...

I have the setup the event as follows...

protected
void RadGrid1_DeleteCommand(object source, GridCommandEventArgs e)

{
    Code here...

}

However, when I run up the application and click on the delete button in the grid, it never reaches the DeleteCommand event, it just does a postback. Please can someone help with this.

Many thanks
Dave

Missing User
 answered on 28 Aug 2008
1 answer
118 views
I need to programatically disable and enable form elements in the grid edit form at run time. I have not found a resource for this in your documentation. Is this possible?
Missing User
 answered on 28 Aug 2008
2 answers
176 views
I have a user control as the edit form in a grid. After entering some initial information in the edit form the information needs to be saved to return  some key fields/DataItems which are then used to populate other sections/controls on the edit form for entering the remaining data.

Rather than making the initial insert and then having to find the record in the grid reopen it, and fill out the remaining data I am trying to reopen it in edit mode automatically after saving it using "PerformInsert" in the RadGrid1_ItemCommand.

Is This possible?

Thanks,

Dave

protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)

{

switch (e.CommandName)

{

case "PerformInsert":

// Code to save to database

// How to reopen record in edit mode

break;

}

}

Dave Miller
Top achievements
Rank 2
 answered on 28 Aug 2008
7 answers
276 views
I used RadNumericTextBox for credit card number as follows:

<

telerik:RadNumericTextBox ID="CCNum" runat="server" MaxLength="16" EmptyMessage="Enter Card Number" NumberFormat-AllowRounding="False" NumberFormat-DecimalDigits="0" MinValue="0" MaxValue="9999999999999999" NumberFormat-GroupSeparator=" " NumberFormat-GroupSizes="4"></telerik:RadNumericTextBox>

The only issue I have is that after postback the number is displayed in a scientific format, e.g. 1.234567890123456E+15. When I set focus to the field and unfocus it the number is back to the proper format: 1234 5678 9012 3456.

How to fix it?

Missing User
 answered on 28 Aug 2008
5 answers
239 views
I have a Grid, that is using a single datasource, but one of the columns is a text field and can be exceptionally long. I would like to use the a detail table to host this information so that it is hidden down below, so if they want to see the MessageBody of the row, they have to expand the details view, is this possible?

The data look something like this:

ID    Name    Date    Action     MessageBody

Matt Dowling
Top achievements
Rank 1
 answered on 28 Aug 2008
1 answer
90 views
Hi all,

I use dropdown and grid.

I have attach client side event to dropdown.

From javascript function i am checking the condition and called pageload event by ' _doPostBack' method. to process serverside coding to fill the grid acoording to dropdown value.

I have added Ajaxsetting for button to show loading panel on grid
but it not showing me loading panel.

   <telerik:AjaxSetting AjaxControlID="DropDown1">
              <updatedcontrols>
                  <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
              </updatedcontrols>
          </telerik:AjaxSetting>


How can i show the loading panel.?

          

Sebastian
Telerik team
 answered on 28 Aug 2008
10 answers
461 views
Hello,
after hours and hours trying to figure this out i know have to turn to the forum.

I have a master page containing a Splitter. Within a sliding pane i have my menu.
Now i just want to be able to preserve the splitter/slidingpane state whenever i click on a menu item. Somehow i cant get it to work. 

Following the guides and ideas on 
http://www.telerik.com/community/forums/thread/b311D-geege.aspx
 works but thats just a defult state i can maintain without using complex session code.

Is there a somehow easyway around this?
(setting=preservestateeventhoughitsfromamasterandcantkeepitsid ="true" :) )
or do i have to use session to get the states of my panels?


/confused

Why cant it just save its state!!! Help Telerik!!

master.master
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="master.master.cs" Inherits="contents_master" %> 
 
<%@ 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 id="Head1" runat="server">  
    <title>Master</title> 
<link href="../css/main.css" rel="stylesheet" type="text/css" /> 
 
 
 
 
<asp:ContentPlaceHolder id="head" runat="server">  
</asp:ContentPlaceHolder> 
      
      
</head> 
 
<body> 
 
<form id="form1" runat="server">  
<table style="width: 100%">  
        <tr> 
            <td valign="top"><div id="mastheadVersionText">SalocSoft PBS v1.0 Beta<telerik:RadScriptManager   
                    ID="RadScriptManager1" Runat="server">  
                </telerik:RadScriptManager> 
                    </div></td>  
            <td valign="top" align="right">  
            <div id="logininfo">  
                <asp:Button runat="server" Text="Logga ut" id="btnLogout" onclick="btnLogout_Click" Font-Size="X-Small"></asp:Button> 
                  
            </div> 
            </td> 
        </tr> 
        <tr><td valign="top">  
        <div id="top_nav">  
        <asp:SiteMapPath id="SiteMapPath1" runat="server" Font-Names="Verdana" Font-Size="0.8em" PathSeparator=" > ">  
            <PathSeparatorStyle Font-Bold="True" ForeColor="Black" /> 
            <CurrentNodeStyle ForeColor="Black" /> 
            <NodeStyle Font-Bold="True" ForeColor="#666666" /> 
            <RootNodeStyle Font-Bold="True" ForeColor="#1C5E55" /> 
        </asp:SiteMapPath>  </div> 
            </td><td></td></tr>  
    </table> 
<telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%">  
    <telerik:RadPane ID="RadPane1" runat="server" Width="22px">  
        <telerik:RadSlidingZone ID="RadSlidingZone1" runat="server">  
            <telerik:RadSlidingPane ID="RadSlidingPane1" runat="server">  
                <asp:HyperLink ID="hlTest1" runat="server"          
                            NavigateUrl="workerapplications/view_w_applications.aspx"   
                            Text="Test">  
                        </asp:HyperLink> 
               </telerik:RadSlidingPane> 
            <telerik:RadSlidingPane ID="RadSlidingPane2" runat="server">  
            </telerik:RadSlidingPane> 
        </telerik:RadSlidingZone> 
    </telerik:RadPane> 
    <telerik:RadSplitBar ID="RadSplitBar1" runat="server" /> 
    <telerik:RadPane ID="RadPane2" runat="server" Width="100%">  
    <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"></asp:ContentPlaceHolder> 
    </telerik:RadPane> 
</telerik:RadSplitter> 
      
      
 
          
</form> 
 
</body> 
 
</html> 

the files beeing lodaded inside the placeholder.
<%@ Page Language="C#" MasterPageFile="~/contents/master.master" AutoEventWireup="true" CodeFile="view_w_applications.aspx.cs" Inherits="contents_workerapplications_view_w_applications" Title="Untitled Page" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">  
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">  
</asp:Content> 


Paul
Telerik team
 answered on 28 Aug 2008
2 answers
404 views
I have a RadWindow that I am launching, I want to show a second RadWindow automatically if the user has opted to use my wizard.

If I use a button to launch the second window it works fine, if I try to do it automatically on Page_Load I get the error 'undefined is null or not an object'.

Here is the code behind:
if (!IsPostBack && Profile.UseOrderWizard)  
        {  
            ClientScript.RegisterStartupScript(this.GetType(), "NewOrderWizard", "<script type='text/javascript'>ShowOrderWizard();</script>");    
        } 

Here is the javascript:
<script type="text/javascript">  
        function ShowOrderWizard() {  
            window.radopen("NewOrderWizard.aspx", "NewOrderWizard");  
            return false;  
        }  
    </script> 

Here is the RadWindow Object:

<telerik:RadWindowManager ID="rwmNewOrder" runat="server" Behaviors="Reload,Close" Skin="Vista" Modal="true"   
    VisibleStatusbar="false" ReloadOnShow="true" ShowContentDuringLoad="false">  
        <Windows>      
            <telerik:RadWindow ID="NewOrderWizard" runat="server" Width="700" Height="460" /> 
        </Windows> 
    </telerik:RadWindowManager>    
urbanBaldGuy
Top achievements
Rank 1
 answered on 28 Aug 2008
2 answers
146 views
Hi

I am attempting to add some client-side code to open a new window when a node which has it's nagivateUrl is clicked and this is what I have so far.
       function ClientNodeClicking(sender, eventArgs)  
        { 
            var node = eventArgs.get_node();   
            if (node.get_navigateUrl())
            {
                    window.open(node.get_navigateUrl());
            }
        } 

Although this does open a new window it caused the parent window to redirect with the [object] error. How can I open a new window or redirect the exsisting window to the navigateURL on a node click?


Veselin Vasilev
Telerik team
 answered on 28 Aug 2008
1 answer
501 views
Hello, i have my master page set up like so:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                  <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                  </asp:ContentPlaceHolder>
            </ContentTemplate>
                <triggers>
                </triggers>
              </asp:UpdatePanel>

- But in one of my content pages, i have a radscheduler, which will not work properly within an updatepanel, because it needs a full postback for most of the events i need, so I added the following to the code behind in that page, to allow for a full postback with this control (this approach has worked with the asp.net upload control):

<%@ MasterType virtualPath="~/Default.master"%>, this line is in the source html, so i can access with master page below:

protected void Page_Init(object sender, EventArgs e)
    {
        //Scheduler needs a full page postback, need to add trigger.
        PostBackTrigger trigger = new PostBackTrigger();
        trigger.ControlID = RadScheduler1.UniqueID;
        Master.MasterUpdatePanel.Triggers.Add(trigger);
    }

- when i add this, i get the following error:

Control with ID 'RadScheduler1' cannot be registered through both RegisterAsyncPostBackControl and RegisterPostBackControl. This can happen if you have conflicting triggers associated with the target control.



- My question is, is there a way to get my scenario above to work?  Having a RadScheduler in a content page, that is wrapped in an update panel within the master page, and allowing the full postback for my scheduler??

-
I know i could just create another content template, not within an update panel, and use that for this page, but there is a lot of other layout in the master page not shown above, that is preventing this. 
Thank you
Joe
Top achievements
Rank 1
 answered on 28 Aug 2008
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?