Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
96 views
(solved)
Sarah
Top achievements
Rank 1
 asked on 21 Feb 2010
2 answers
83 views

  I just experienced using a RadInputManager to optimize my page returning no value when a value of zero (0) is entered into the Number of Currency control.  Upon searching here I found this page

  In that reply it was stated that this may be correct soon (that was March 2009).  I am using 2009.2.701.20 (July 2009) so it does not look like this problem was fixed. 

  Has there been any other work done to correct this?  Or do I need to get rid of using RadInputManager for these controls?

Alex Occhipinti
Top achievements
Rank 1
 answered on 21 Feb 2010
1 answer
277 views
Hello Friends,
                     I want to open radwindow on button click event from server side. I have write following code for open radwindow but it is not working. Please reply me what is wrong and how to overcome this solution.
My aspx page look like,
<asp:content..........>
<asp:RadAjaxPanel...................>
 <asp:button  ................. onclick="Event_name"/>

</asp:RadAjaxPanel>


</asp:content>

Coding have been written on button click event,
protected void InsertButton_Click(object sender, ImageClickEventArgs e)
{
               RadWindow newwindow = new RadWindow();
                newwindow.ID = "SolutionRadWindow1";
                newwindow.NavigateUrl = "Page.aspx";
                newwindow.Width = Unit.Pixel(800);
                newwindow.Height = Unit.Pixel(500);
                Singleton.Windows.Add(newwindow);
}

Regards,
Bhavesh Rana
Shinu
Top achievements
Rank 2
 answered on 20 Feb 2010
2 answers
320 views
Hi
        I have to disable delete button for some of the rows based on the some flag condition returned from DB. I need to set the delete permission to certain role users.

I used template based edit button to invoke delete operation
<telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" 
                                    HeaderText="Options" AllowFiltering="false" HeaderStyle-Width="13%">  
                                    <ItemTemplate> 
                                        <asp:LinkButton CommandName="Edit" Text="Edit" runat="server"></asp:LinkButton> 
                                      
                                        <asp:HyperLink ID="lnkDel" Text="Del" runat="server"></asp:HyperLink> 
                                                                          
                                    </ItemTemplate> 
                                </telerik:GridTemplateColumn> 

So i have to dynamically enable delete button only for admin users. So help me to get the desired result

-Thanks in advance
John John
Top achievements
Rank 1
 answered on 20 Feb 2010
3 answers
101 views
Hi
I require a new column for edit link button in the self referencing radgrid. The edit button should not appear for the parent folder alone.

Krishnan
Princy
Top achievements
Rank 2
 answered on 20 Feb 2010
4 answers
131 views
hello , 
i am using panel at rtl direction but the collapse button doen't work when the direction of the panel is rtl , and works fine when the direction is ltr.
is this a bug at the control  ??? 
Michael
Top achievements
Rank 2
 answered on 20 Feb 2010
0 answers
56 views
I am using vs 2008sp1 and after I installed telerik trial version, I found that when I try to debug my web page, all of my aspx.vb file in the text editor will be locked (Read-only). But I am sure that would not be happened b4 I install this tool kit. Why?
Stephen Lam
Top achievements
Rank 1
 asked on 20 Feb 2010
3 answers
178 views
Hi,

I'm using ASP.NET Ajax RadGrid. Is there a way to specify the column width programmatically from the code behind?
I need store column widths on the server side or cookies and further load those values, so the next time user opens the web page he get same columns size.

Thanks,
Ruben.
Princy
Top achievements
Rank 2
 answered on 20 Feb 2010
1 answer
120 views
Hi,

I am getting the following error when I try to edit a Grid Row. One of the columns in the grid is a templated column (created programatically):

Microsoft Jscript runtime error:
Sys.WebForms.PageRequestManagerServerErrorException: Unable to cast object of Type RadLookupTextBox to type System.Web.UI.IBindableTemplate.

Below is the source code of the function that creates the Templated Column as well as the Templated Class.
Please let me know where the problem is.

private void CreateTemplatedColumn(string caption, string datafield, string hyperlinkfield, int width)  
    {  
        RadLookupTextBox txt = new RadLookupTextBox();  
        txt.BindingName = datafield;  
        txt.ControlName = "gridtextboxcoleditor_" + datafield;  
        txt.FieldName = datafield;  
        txt.HyperlinkFieldName = hyperlinkfield;  
        txt.Skin = "Office2007";  
        txt.Width = width;  
        txt.ButtonCssClass = "RadInputButton";  
        txt.ButtonClickFunctionName = "RadTextBoxButtonClick";  
        txt.EditMode = true;  
 
        RadLookupTextBox link = new RadLookupTextBox();  
        link.BindingName = datafield;  
        link.ControlName = "gridhyperlinkcoleditor_" + datafield;  
        link.FieldName = datafield;  
        link.HyperlinkFieldName = hyperlinkfield;  
        link.Width = width;  
        link.EditMode = false;  
          
        GridTemplateColumn col = new GridTemplateColumn();  
        col.EditItemTemplate = txt;  
        col.ItemTemplate = link;  
        col.UniqueName = datafield;  
        col.DataField = datafield;  
        col.HeaderText = caption;  
        col.ItemStyle.Width = Unit.Pixel(width);  
          
        rgEntity.MasterTableView.Columns.Add(col);  
                  
    }  
 

public class RadLookupTextBox : ITemplate   
{  
    // Make Properties  
    private string m_controlName = "", m_bindingName = "";  
    private string m_fieldName = "", m_hyperlinkFieldName;  
    private string m_skin = "", m_buttonCssClass = "";  
    private string m_functionButtonClick;  
    private int m_width = 0;  
    private bool m_editMode = false;  
 
    public string ControlName  
    {  
        set 
        {  
            m_controlName = value;  
        }  
    }  
    public string BindingName  
    {  
        set 
        {  
            m_bindingName = value;  
        }  
    }  
    public string FieldName  
    {  
        set 
        {  
            m_fieldName = value;  
        }  
    }  
    public string HyperlinkFieldName  
    {  
        set 
        {  
            m_hyperlinkFieldName = value;  
        }  
    }  
    public string Skin  
    {  
        set 
        {  
            m_skin = value;  
        }  
    }  
    public string ButtonCssClass  
    {  
        set 
        {  
            m_buttonCssClass = value;  
        }  
    }  
    public string ButtonClickFunctionName  
    {  
        set 
        {  
            m_functionButtonClick = value;  
        }  
    }  
    public int Width  
    {  
        set 
        {  
            m_width = value;  
        }  
    }  
    public bool EditMode  
    {  
        set 
        {  
            m_editMode = value;  
        }  
    }  
 
 
    public RadLookupTextBox()  
    {  
        //  
        // TODO: Add constructor logic here  
        //  
    }  
 
    public RadLookupTextBox(string controlName, string bindingName)  
    {  
        this.m_controlName = controlName;  
        if (bindingName != string.Empty)  
            this.m_bindingName = bindingName;  
    }  
 
    public void InstantiateIn(System.Web.UI.Control container)  
    {  
        if (m_editMode)  
        {  
            RadTextBox textbox = new RadTextBox();  
            textbox.DataBinding += new EventHandler(textbox_DataBinding);  
            textbox.ID = this.m_controlName;  
            textbox.Skin = m_skin;  
            textbox.Width = Unit.Pixel(m_width);  
            textbox.ShowButton = true;  
            textbox.ButtonCssClass = m_buttonCssClass;  
            textbox.ClientEvents.OnButtonClick = m_functionButtonClick;  
            container.Controls.Add(textbox);  
        }  
        else 
        {  
            HyperLink hl = new HyperLink();  
            hl.DataBinding += new EventHandler(hyperlink_DataBinding);  
            hl.ID = this.m_controlName;  
            hl.Width = Unit.Pixel(m_width);  
            container.Controls.Add(hl);  
        }  
    }  
 
    private void textbox_DataBinding(object sender, EventArgs e)  
    {  
        RadTextBox textbox = (RadTextBox)sender;  
        GridEditableItem container = (GridEditableItem)textbox.NamingContainer;  
        textbox.Text = ((DataRowView)container.DataItem)[m_fieldName].ToString();  
    }  
 
    private void hyperlink_DataBinding(object sender, EventArgs e)  
    {  
        HyperLink hl = (HyperLink)sender;  
        GridItem container = (GridItem)hl.NamingContainer;  
        hl.Text = ((DataRowView)container.DataItem)[m_fieldName].ToString();  
        hl.NavigateUrl = ((DataRowView)container.DataItem)[m_hyperlinkFieldName].ToString();  
    }  
 
 
}  

Thanks.
Princy
Top achievements
Rank 2
 answered on 20 Feb 2010
1 answer
85 views
Using a RadGrid that has 'WebUserControl' as EditFormType:

<EditFormSettings EditFormType="WebUserControl" UserControlName="UserControls/NewsAddUpdate.ascx"> 
    <EditColumn UniqueName="EditCommandColumn1"></EditColumn> 
</EditFormSettings> 

In the WebUserControl I would love to use a RadToolbar to issue commands. That is instead of
<asp:Button ID="buttonAddUpdate" Text='<%# DataItem is Telerik.Web.UI.GridInsertionObject ? "Insert" : "Update" %>' runat="server" CommandName='<%# DataItem is Telerik.Web.UI.GridInsertionObject ? "PerformInsert" : "Update"%>' /> 
<asp:Button ID="buttonCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel" /> 
 

I want to use
<telerik:RadToolBar runat="server" ID="toolbarCommands" Skin="Office2007"  > 
    <Items> 
        <telerik:RadToolBarButton runat="server" Text="Cancel" CommandName="Cancel" CausesValidation="false" /> 
        <telerik:RadToolBarButton runat="server" CommandName="Update" /> 
        <telerik:RadToolBarButton runat="server" CommandName="PerformInsert" /> 
    </Items> 
</telerik:RadToolBar> 

However, clicking the RadToolBarButtons has no effect.
What am I missing

Shinu
Top achievements
Rank 2
 answered on 20 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?