Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
173 views
I am a newbie using telerik in my visual estudio 2008  C# and i am trying to make a dropdownlist that update a column in my radgrid, it looks like all the texbox can update the columns.

what is weird is that it is updated on the database but in the column it doesnt so i have to stop debugging in order and then debug again so i can see the column updated.

i know there is an easy way to solve this but in the meantime while trying to solve this i wanted to use the forum to check or get solution faster.

here is the part of the radgrid that doesnt update
<telerik:GridBoundColumn ItemStyle-CssClass="UM_usertype"  UniqueName="UserType" HeaderText="User Type" DataField="Type">
                <HeaderStyle Width="60px"></HeaderStyle>
                </telerik:GridBoundColumn>

and the web user control that has the dropdownlist
<td>Usertype:</td>
                    <td><asp:dropdownlist id="ddlUT" runat="server" tabindex="2" Width="127px"></asp:dropdownlist>
                    </td>

thanks in adv.


Santos
Top achievements
Rank 1
 answered on 12 Jan 2011
1 answer
402 views
Hi,

I have a page with a Rad Toolbar on it.  This page is also using a master page.  I am trying to call a java script from code behind on the Toolbar OnButtonClick event.  The toolbar is inside a UpdatePanel.

When I click the toolbar button the javascript isn't called. 

To test my page, I added a regular asp:button to the page and put it inside the update panel and called the function, it didn't work. 
I did some research and found that I needed to trigger a postback on the button, so added the following code to the Load event and then when I clicked the asp button the javascript was executed.

 

 

 

Private Sub WebForm4_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    
Dim scriptManager As ScriptManager = scriptManager.GetCurrent(Me.Page)
    
scriptManager.RegisterPostBackControl(Button1)
End Sub

 


Thinking that I should do the same for the toolbar button, I then added the following to the Load event.  But, the javascript still did not run.

Dim

 

rtb As RadToolBarButton = DirectCast(rtbPDFInvoices.FindButtonByCommandName("tbtExportPDF"), RadToolBarButton)
scriptManager.RegisterPostBackControl(rtb)

 

I read on the forums about the client events being unattached after ajax update, but I don't think this is my problem.  I am using the OnButtonClick not the OnButtonClientClick.

Below is a simplified version of what I am trying to do.  In the real world I need to call the java script from code behind because it only gets called if certain conditions exist.

Thank you for your help.

ASPX PAGE
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/IPSMaster.Master" CodeBehind="WebForm4.aspx.vb" Inherits="IPS_Gateway.WebForm4" %>
<%@ Register assembly="Telerik.Web.UI"      namespace="Telerik.Web.UI"      tagprefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit"  namespace="AjaxControlToolkit"  tagprefix="act" %>
  
  
<asp:Content ID="Content2" ContentPlaceHolderID="cphMainContent" runat="server">
  <script type="text/javascript" language="javascript">
      function ShowMessage(strMsg) {
           alert(strMsg);
       }
         
</script>
  
    <asp:Panel ID="pnlPageContent"         runat="server"    cssClass="css_GPC01_Panel_PageContent" >
  
    <asp:panel ID="pnlPageHeader"                runat="server"     cssClass="css_GPC01_Panel_PageHeading" >    
        <asp:UpdatePanel ID="pnlToolbar"         runat="server" >
            <ContentTemplate>
                <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click"  />
                <telerik:RadToolBar ID="rtbPDFInvoices" runat="server"  AutoPostBack="true"          EnableEmbeddedSkins="True" Skin="Black" OnButtonClick="rtbPDFInvoices_ButtonClick"   >
                    <Items>
                        <telerik:RadToolBarButton runat="server" CommandName="tbtExportPDF"          ImageUrl="~/App_Themes/Images/Applications/Export PDF 16.png"    Text="Export To PDF"   />
                    </Items>
                </telerik:RadToolBar>
            </ContentTemplate>
        </asp:UpdatePanel>
    </asp:panel>
</asp:Panel>
</asp:Content>

CODE BEHIND
Imports Telerik.Web.UI
Partial Public Class WebForm4
    Inherits System.Web.UI.Page
    Protected Sub rtbPDFInvoices_ButtonClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadToolBarEventArgs) Handles rtbPDFInvoices.ButtonClick
  
        Dim btn As RadToolBarButton = TryCast(e.Item, RadToolBarButton)
  
        Select Case btn.CommandName
            Case "tbtExportPDF"
                ExportPDF()
                Exit Select
        End Select
  
    End Sub
    Protected Sub ExportPDF()
  
        Dim strBuilder As New StringBuilder()
        strBuilder.Append("<script laungauge='javascript'>")
        strBuilder.Append("ShowMessage('Hi')")
        strBuilder.Append("</script>")
        Page.ClientScript.RegisterStartupScript([GetType](), "ToPDF", strBuilder.ToString)
  
    End Sub
  
  
    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        ExportPDF()
    End Sub
  
    Private Sub WebForm4_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim scriptManager As ScriptManager = scriptManager.GetCurrent(Me.Page)
        Dim rtb As RadToolBarButton = DirectCast(rtbPDFInvoices.FindButtonByCommandName("tbtExportPDF"), RadToolBarButton)
        scriptManager.RegisterPostBackControl(Button1)
        scriptManager.RegisterPostBackControl(rtb)
  
    End Sub
End Class

Dimitar Terziev
Telerik team
 answered on 12 Jan 2011
1 answer
155 views
Hi,
I am using RadEditor and using the Imagemanager for uploading the images, currently the images uploaded  will be saved in the vertual folder of the application. Is there a way I can save my images in Database (SQL server 2008).
If there is a way to save the uploaded images in Database, please let me know.

Thanks,
Santosh
Rumen
Telerik team
 answered on 12 Jan 2011
1 answer
181 views
I'm using radtextbox with mode = "Password" with a radcombobox which do a postback to fill another radcombobox.. the problem is the radtextbox loses the data written in it when the radcombobox do the postback .... how can I make the radtextbox save its state

thanks for effort
Maria Ilieva
Telerik team
 answered on 12 Jan 2011
0 answers
60 views
Hi,

 i am having stored procedure has month name as a param , to get the holidays.. in my front page i am getting month number while navigating month... but i need to pass that month number to that stored procedure.. 

this is the line to display the holidays in the front page using webservice. insterad of 1 i need to pass month number. tell me how to do this..

HolidayData

 

 

[] demo = ConfigManager.TimeSheetService.GetHolidaysByMonth(1);

 

Brown
Top achievements
Rank 1
 asked on 12 Jan 2011
1 answer
93 views
hi,

how can i set the  rad editor ImageManager-UploadPaths to anther web site on the same server(uper folder),
can i use the ../ or "d:\..." or what?

the rad editor is inside rad grid.

thanks.

Udi 
Rumen
Telerik team
 answered on 12 Jan 2011
1 answer
89 views
Hello, i would like to aks if RadEditor could be used as Bussiness Card Designer.

Is that possible?
Do you need more details?
Rumen
Telerik team
 answered on 12 Jan 2011
1 answer
47 views
Hi,

Export to PDF functionality is not working when the Table's width attribute is set.

<table width="80%" .... ---> This is not working. It generates error.

I need my users to be able to set width using attribute and also it should be expoertable to pdf.

Thanks in advance for all replies.

Piyush
Rumen
Telerik team
 answered on 12 Jan 2011
9 answers
197 views
Hi,

I am using 2 radtooltipmanager controls on my page, I have a grid, in which I am displaying employee ID and employee address, I have tool tip for both, 1 tooltipmanager for employeeId and another for employee address.

Problem: both tooltips come fine if I hover over then alternately. Means, if I am hovering over employeeID it will show me that employees detail and if I hover over the address it will show me the address details. but now if I again hover over any other address, it caches the one which I hovered before it. Now, if I hover over the employee ID and then hover back over to the address, it will show me proper details. same problem on employeeID side, if I keep on hovering over the different employeeID it will show me details of the first one which I hovered.
If I view them alternately it works fine.

Can you please let me know what is wrong?

Thank you,
Jay Mehta.
Svetlina Anati
Telerik team
 answered on 12 Jan 2011
0 answers
641 views
Hello,

I attempted to update a user's shift on the Modify Shift window.  When I clicked the Update button, the processing loading graphic appeared, but processed for an unusually long time.  When it finally resolved, the window remained open and there was an exclamation point next to the Done message. When I clicked on the exclamation point there was a message about a timeout error.  See screen captures attached.

I have declare AsyncPostBackTimeout="3600" in <RadScriptManager>  and also executionTimeout="3600" in <httpRuntime>. After that also this error occurred.

Then I have create a js file (RequestManager.js) like:
--------------------------------------------------------------------------------------------------------
Sys.Application.add_init(AppInit);


function AppInit(sender) {
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
}


// Called when async postback ends
function EndRequestHandler(sender, args) {
    if (args.get_error()) {
        args.set_errorHandled(true);
    }
}
--------------------------------------------------------------------------------------------------------
In aspx page code is:

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" AsyncPostBackTimeout="3600">
        <Scripts>
            <asp:ScriptReference Path="~/Scripts/RequestManager.js" />
        </Scripts>
 </telerik:RadScriptManager>
--------------------------------------------------------------------------------------------------------

Still it is occurred. Please help me.


Thanks and Best Regards
Sabya



Joe
Top achievements
Rank 1
 asked on 12 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?