Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
133 views
I have a master page with a RadAjaxManager on it.

I want to handle the server-side event AjaxRequest, but I want to do it in my content page.

Now I can set this up programmatically, by saying this in my content page...
        protected void Page_Load(object sender, EventArgs e) 
        { 
            RadAjaxManager.GetCurrent(Page).AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(WebForm4_AjaxRequest); 
        } 
        protected void WebForm4_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) 
        { 
            string x = e.Argument; 
        } 
But for completeness (and 'cos I'm going to have to explain this to other people) I'd like to know if this can be done programmatically.

--
Stuart

Stuart Hemming
Top achievements
Rank 2
 answered on 26 May 2009
1 answer
218 views
Hi,

Wanted to export the data in the Grid (in a user control) to Excel. It's not working. Basically, the File Download dialog with the message "Do you want to open or save this file" itself is not appearing.

So tried to put a test RadGrid like the following. The same method works when it's inside an aspx but not when it's in an ascx.

Why is this? Can you please me with this?

Thanks.

Copying the method which would be called when a button in the aspx or in the ascx is clicked.

 

public

 

void ExportToExcelButtonClick(object sender, EventArgs e)

 

{

Telerik.Web.UI.

RadGrid gv = new Telerik.Web.UI.RadGrid();

 

gv.DataSource =

new ArrayList();

 

 

 

 

 

gv.ExportSettings.ExportOnlyData =

true;

 

gv.ExportSettings.IgnorePaging =

true;

 

gv.ExportSettings.OpenInNewWindow =

true;

 

gv.MasterTableView.Caption =

"my caption";

 

gv.ExportSettings.FileName =

"exportGrid";

 

 

this.Controls.Add(gv);

 

gv.DataBind();

gv.MasterTableView.ExportToExcel();

}

Daniel
Telerik team
 answered on 26 May 2009
1 answer
29 views
I'm not sure if this is fixed in a newer version, I only have Q1 2008 619 and my subscription has expired.

One of the styles is missing a double quote for the background image.
backgroundtransparent   
url(<%=WebResource("Telerik.Web.UI.Skins.Default2006.Calendar.MonthYearFastNavBtnBg.gif)%>)   
repeat-x; 

After '.gif' there should be a double quote. Because of this the web resource image is not inserted and the styles become invalid.  In IE8 this makes the Time popup not have any styles (I'm using the RadDateTimePicker).

Anyhoo, I have my own skin now but I thought I'd let you know.
Dimo
Telerik team
 answered on 26 May 2009
1 answer
107 views
In my code I have used RadTextBox for Search functionality. I have a textbox in which if I type any name, and click on search button next to it, the RadGrid below will get populated with the search result. But with this implementation I found few bugs in it:

When I click on any other button or refresh a page, the textbox still persist the name type into it.

I want to clear this textbox on refreshing a page and while invoking any other event of the page except search button click. I have done
RadTextBox.Text = ""; on every other event but it is not working.
Can any one help me in this?
Dimo
Telerik team
 answered on 26 May 2009
1 answer
245 views
Hi,

i want to use Password strength meter with telerik input control


.............

Thanks
Dimo
Telerik team
 answered on 26 May 2009
2 answers
92 views

I like the demo below and plan to use this concept to my project.
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx

Can I change the filter function based on the data type automatically?
For instance, when the data in the column is
1. data type: int...it will use slidebar filter
2. data type: datetime... it will use calendar filter
3. and so on...

Can anyone suggest how to do it?

Thanks,
Billy
Yi-Chien Chen
Top achievements
Rank 1
 answered on 26 May 2009
1 answer
81 views
Hi all,

I need to display column values of when user clicks on edit button in row of grid.
I am using "ASPNET AJAX Q1 2009".

Thanks,
Amol
Shinu
Top achievements
Rank 2
 answered on 26 May 2009
3 answers
148 views
Hi all,
 I have created user control with date picker.I would like to know if how can we use properties/methods of the RadDateInput client-side object:.
 Let me know 

 Thank you
John
Top achievements
Rank 1
 answered on 26 May 2009
3 answers
241 views
Hi,

I am trying to get a reference of a RadWindow but the $find returns null on form load. My radwindow is like this:
 < telerik:RadWindow ID="rwinLogOn" Title="asset Toolbox - LogOn" runat="server"

 

 

NavigateUrl="LogOn.aspx" Behavior="None" IconUrl="img/userGroup.png"

 

 

 

VisibleStatusbar="False" DestroyOnClose="True"

 

 

 

OnClientClose="onClientClose" Modal="False" Skin="Black" Height="160"

 

 

 

Width="230" AutoSize="True" style="display: none">

 

 

 

</telerik:RadWindow>

 

 

 

It is a logon window and must be opened at the start of the application. When the first form is opened. I am using jQuery and I have a ready event like this:
$(document).ready(

 

 

function() { 

   showLogOn();

});

 

 

function showLogOn() {

 

 

 

var oWnd = $find("rwinLogOn");

 

 

oWnd.show();

}

 

 

The oWnd variable in showLogOn is allways returning "null" at the form load. To check if the problem was really because of the form load event I put a button in the main form like this:
<input id="btnShow" type="button" value="show window" onclick="showLogOn(); return false;" />

 

 

 

When the form is loaded normally and I press the button above the RadWindow is showned without any problems. So the problem is really because the RadWidown is not avaiable at the jQuery ready event.

I tried to call showLogOn() in the Body onLoad and OnInit events and it did not worked. The curious thing is that all other html tags can be accessed normally in the jQuery ready event. But the RadWindow is only avaiable after the page is displayied.

I need to know which event I must drive to access the radWindow after the form is completelly loaded.

Thanks in advance.

 

mvbaffa
Top achievements
Rank 1
 answered on 25 May 2009
1 answer
142 views
Hi,

How do I get key value of parent table from detail table's Command Template?

Hopefully  I get answer for this question. I did not get none of for my week ago questions.

Code
<telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1NeedDataSource" OnDetailTableDataBind = "DetailTableDataBind"  > 
        <MasterTableView AutoGenerateColumns="false"  AllowAutomaticInserts="true" DataKeyNames="CompanyID" Name="Company" 
         HierarchyLoadMode="Client">                  
         
        <Columns> 
        <telerik:GridBoundColumn DataField="CompanyID" UniqueName="CompanyID"  Display="false" DataType="System.Int32" >    
         
        </telerik:GridBoundColumn>               
         
        <telerik:GridBoundColumn DataField="CompanyName" UniqueName="CompanyName" HeaderText="Company Name">               
        <ItemStyle Width="100px" /> 
        </telerik:GridBoundColumn>                           
                                                                                                 
        </Columns> 
         
        <DetailTables> 
            <telerik:GridTableView runat="server" DataKeyNames="EmployeeID" AutoGenerateColumns="false" Name="Employee" CommandItemDisplay="Top"  > 
             <CommandItemTemplate > 
             <input type="button" value="Add Employee" id="addE"  onclick="popupAddEmployee('<%# DataBinder.Eval(Container.DataItem, "CompanyID") %>')" /> 
             </CommandItemTemplate> 
             <ParentTableRelation> 
                 <telerik:GridRelationFields DetailKeyField="CompanyID" MasterKeyField="CompanyID" /> 
             </ParentTableRelation> 
              
            <ExpandCollapseColumn Visible="False"
                <HeaderStyle Width="19px" /> 
            </ExpandCollapseColumn> 
             
            <RowIndicatorColumn Visible="False"
               <HeaderStyle Width="20px" /> 
            </RowIndicatorColumn> 
             
            <Columns> 
                <telerik:GridBoundColumn DataField="CompanyID" Display="false" DataType="System.Int32" >    
                 
                </telerik:GridBoundColumn>  
                <telerik:GridBoundColumn DataField="EmployeeID" Display="false" DataType="System.Int32" >    
                 
                </telerik:GridBoundColumn>               
                 
                <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name">               
                <ItemStyle Width="100px" /> 
                </telerik:GridBoundColumn> 
                
                <telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name">               
                <ItemStyle Width="100px" /> 
                </telerik:GridBoundColumn> 
                 
                <telerik:GridBoundColumn DataField="TitleId" Display="false" DataType="System.Int32">                     
                </telerik:GridBoundColumn> 
                 
                <telerik:GridBoundColumn DataField="Title" HeaderText="Title" UniqueName="Title" >             
                <ItemStyle Width="100px" /> 
                </telerik:GridBoundColumn>         
                 
                <telerik:GridBoundColumn DataField="BirthDate"  HeaderText="BirthDate" >             
                <ItemStyle Width="100px" /> 
                </telerik:GridBoundColumn> 
                    
                <telerik:GridBoundColumn DataField="ShiftStart" UniqueName="ShiftStart" HeaderText="Shift Start" >             
                <ItemStyle Width="150px" /> 
                </telerik:GridBoundColumn>      
                 
                <telerik:GridBoundColumn DataField="JoinDate" UniqueName="JoinDate" HeaderText="JoinDate" >             
                <ItemStyle Width="150px" /> 
                </telerik:GridBoundColumn>    
                                                                                                 
            </Columns> 
            
             
            </telerik:GridTableView> 
             
        </DetailTables> 
                 
       <%-- <CommandItemTemplate> 
        <input type="button" value="Add Company" id="addC" onclick="popupAddCompany();" /> 
        </CommandItemTemplate>--%> 
                 
        </MasterTableView> 
        <ClientSettings> 
        <ClientEvents OnCommand="OnCommand" OnRowDataBound="OnRowDataBound" OnRowCreated = "OnRowCreated"  
          /> 
        </ClientSettings> 
        </telerik:RadGrid> 
Daniel
Telerik team
 answered on 25 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?