Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
266 views
Hello,

I have a RadGrid control having the following hierarchical structure

Master table: header ----> CompanyName, ContactName, Address

Detail table  : header ----> OrderId, OrderDate, ShippedDate

Issue
======

I'd like to export all current grid data with headers (master and detail); However on export to Excel, only the detail header is exported.  Is there a setting that would allow both master and detail headers to get exported?

many thanks
J

Princy
Top achievements
Rank 2
 answered on 08 Aug 2011
1 answer
79 views
How do you move the "57 items in 4 pages" over to the left with the page selectors?

Shinu
Top achievements
Rank 2
 answered on 08 Aug 2011
4 answers
467 views
I have two radgrid , for the first radgrid i am binding the data from serverside , and for the second radgrid i am binding the data through sqldatasource from clientside.
 The radgrid2 for which i bind the data through clientside,pagination property works fine , and my grid gets refresh each time.
 But the major problem is when bind the radgrid from serverside my pagination property is not working,is their any property i have to set for pagination to work when i am binding the data from serverside, can any one please help to figure out the problem.

This is my aspx page code which contains the radgrid

   
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadGridRefreshTest.aspx.cs" Inherits="RadGridTest.RadGridRefreshTest" enableEventValidation="false" %><br>    <br>    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br>    <br>    <html xmlns="http://www.w3.org/1999/xhtml"><br>    <head runat="server"><br>        <title></title><br>    </head><br>    <body><br>        <form id="form1" runat="server"><br>        <div><br>            <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="true"><br>            </telerik:RadScriptManager><br>            <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="true"  PageSize="10" AllowCustomPaging="True" onpageindexchanged="RadGrid1PageIndexChanged" ><br>            <PagerStyle Mode="NextPrevAndNumeric"  /><br>            </telerik:RadGrid><br>    <br>            second grid<br>            <telerik:RadGrid ID="RadGrid2" runat="server" CellSpacing="0" <br>                DataSourceID="SqlDataSource" GridLines="None" <br>                onpageindexchanged="RadGrid2PageIndexChanged" ><br>    <MasterTableView AutoGenerateColumns="False" DataKeyNames="CustomerID" <br>                    DataSourceID="SqlDataSource" AllowPaging="true" PageSize="10" ><br>    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings><br>    <br>    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"><br>    <HeaderStyle Width="20px"></HeaderStyle><br>    </RowIndicatorColumn><br>    <br>    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"><br>    <HeaderStyle Width="20px"></HeaderStyle><br>    </ExpandCollapseColumn><br>    <br>        <Columns><br>            <telerik:GridBoundColumn DataField="CustomerID" <br>                FilterControlAltText="Filter CustomerID column" HeaderText="CustomerID" <br>                ReadOnly="True" SortExpression="CustomerID" UniqueName="CustomerID"><br>            </telerik:GridBoundColumn><br>            <telerik:GridBoundColumn DataField="CompanyName" <br>                FilterControlAltText="Filter CompanyName column" HeaderText="CompanyName" <br>                SortExpression="CompanyName" UniqueName="CompanyName"><br>            </telerik:GridBoundColumn><br>            <telerik:GridBoundColumn DataField="ContactName" <br>                FilterControlAltText="Filter ContactName column" HeaderText="ContactName" <br>                SortExpression="ContactName" UniqueName="ContactName"><br>            </telerik:GridBoundColumn><br>            <telerik:GridBoundColumn DataField="ContactTitle" <br>                FilterControlAltText="Filter ContactTitle column" HeaderText="ContactTitle" <br>                SortExpression="ContactTitle" UniqueName="ContactTitle"><br>            </telerik:GridBoundColumn><br>            <telerik:GridBoundColumn DataField="Address" <br>                FilterControlAltText="Filter Address column" HeaderText="Address" <br>                SortExpression="Address" UniqueName="Address"><br>            </telerik:GridBoundColumn><br>            <telerik:GridBoundColumn DataField="City" <br>                FilterControlAltText="Filter City column" HeaderText="City" <br>                SortExpression="City" UniqueName="City"><br>            </telerik:GridBoundColumn><br>            <telerik:GridBoundColumn DataField="Region" <br>                FilterControlAltText="Filter Region column" HeaderText="Region" <br>                SortExpression="Region" UniqueName="Region"><br>            </telerik:GridBoundColumn><br>            <telerik:GridBoundColumn DataField="PostalCode" <br>                FilterControlAltText="Filter PostalCode column" HeaderText="PostalCode" <br>                SortExpression="PostalCode" UniqueName="PostalCode"><br>            </telerik:GridBoundColumn><br>            <telerik:GridBoundColumn DataField="Country" <br>                FilterControlAltText="Filter Country column" HeaderText="Country" <br>                SortExpression="Country" UniqueName="Country"><br>            </telerik:GridBoundColumn><br>            <telerik:GridBoundColumn DataField="Phone" <br>                FilterControlAltText="Filter Phone column" HeaderText="Phone" <br>                SortExpression="Phone" UniqueName="Phone"><br>            </telerik:GridBoundColumn><br>            <telerik:GridBoundColumn DataField="Fax" <br>                FilterControlAltText="Filter Fax column" HeaderText="Fax" SortExpression="Fax" <br>                UniqueName="Fax"><br>            </telerik:GridBoundColumn><br>        </Columns><br>    <br>    <EditFormSettings><br>    <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn><br>    </EditFormSettings><br>    </MasterTableView><br>    <br>    <FilterMenu EnableImageSprites="False"></FilterMenu><br>    <br>    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu><br>            </telerik:RadGrid><br>            <asp:SqlDataSource ID="SqlDataSource" runat="server" <br>                ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString2 %>" <br>                SelectCommand="SELECT * FROM [Customers]"></asp:SqlDataSource><br>        </div><br>        </form><br>    </body><br>    </html>

 
This is the code behind file where i am writing the code for grid binding using datasource

   
using System;<br>    using System.Collections.Generic;<br>    using System.Linq;<br>    using System.Web;<br>    using System.Web.UI;<br>    using System.Web.UI.WebControls;<br>    using System.Data.Sql;<br>    using System.Data.SqlClient;<br>    using System.Data;<br>    using Telerik.Web.UI;<br>    using Telerik.Web.Data;<br>    <br>    <br>    namespace RadGridTest<br>    {<br>        public partial class RadGridRefreshTest : System.Web.UI.Page<br>        {<br>            protected void Page_Load(object sender, EventArgs e)<br>            {<br>                SqlConnection con = new SqlConnection();<br>                con.ConnectionString ="data source=ADMIN-PC1;uid=sa;password=sql;database=NorthWind";<br>                DataSet ds = new DataSet("CustOrders");<br>                SqlDataAdapter da1 = new SqlDataAdapter("SELECT * FROM Customers", con);<br>                da1.TableMappings.Add("Table", "Customers");<br>                da1.Fill(ds);<br>                RadGrid1.DataSource = ds;<br>                RadGrid1.DataBind();<br>            }<br>            protected void RadGrid1PageIndexChanged(object sender, Telerik.Web.UI.GridPageChangedEventArgs e)<br>            {<br>                int index = e.NewPageIndex;<br>                int current = RadGrid1.CurrentPageIndex;<br>            }<br>    <br>            protected void RadGrid2PageIndexChanged(object sender, Telerik.Web.UI.GridPageChangedEventArgs e)<br>            {<br>                int index = e.NewPageIndex;<br>                int current = RadGrid1.CurrentPageIndex;<br>            }<br>    }


 
Maria Ilieva
Telerik team
 answered on 08 Aug 2011
5 answers
134 views
I have a custom silverlight control that is placed inside the ContentTemplate of the RadNotification control.  I am having problems finding this custom silverlight control within Javascript so that I can pass values to the silverlight control through a scriptable member.  Basically, what I am trying to do is use the RadNotification control to check for any changes in value using the UpdateInterval and OnCallbackUpdate members.  The OnCallbackUpdate sets static variables on the server side that is used by javascript to pass to the silverlight control.  If the values have changed then the Nofication control is told to show, if the values are the same then the control remains hidden.  I have everything working except being able to find my silverlight control embeded within the RadNotification contentTemplate so that I can reference the object in my javascript and call my silverlight scriptable member.

RadNotification Declaration:
<telerik:RadNotification ID="RadNotification1" runat="server" Width="380" Height="100"
        Animation="Fade" EnableRoundedCorners="true" VisibleTitlebar="false" OnClientUpdated="showNotification"
        OffsetY="-400" OffsetX="-500" Value="false"  AutoCloseDelay="3000" UpdateInterval="6000" LoadContentOn="TimeInterval" OnCallbackUpdate="resetNotification">
        <ContentTemplate>
        <object id="silver2" data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="380" height="100">
                      <param name="source" value="../ClientBin/Notification.xap"/>
                      <param name="onError" value="onSilverlightError" />
                      <param name="background" value="Transparent" />
                      <param name="windowless" value="true" />
                      <param name="pluginbackground" value="Transparent" />
                      <param name="minRuntimeVersion" value="4.0.50826.0" />
                      <param name="autoUpgrade" value="true" />
                      <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0" style="text-decoration:none">
                          <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
                      </a>
                    </object>
        </ContentTemplate>
        </telerik:RadNotification>


OnCallbackUpdate
protected void resetNotification(object sender, RadNotificationEventArgs e)
       {
           RadNotification1.Value = "false";
           if(Queue.Count>0)
           {
                     var s = Queue.Dequeue();
                   value 1 = s.Value1;
                   value 2 = s.value2;        
                   value3 = s.value3;
                 RadNotification1.Value = "true";
                 
           }
            
       }

Javascript
function showNotification(sender, args) {
                 
  
                var showMsg = sender.get_value()
                if (showMsg == "true") {
                    sender.show();
                      
               var silverlightplugin = $get("silver2");
  
               var content = silverlightplugin.content;
               content.MainPage.BindValues(value1,value2,value3);
                }
                 
  
            }

Marin Bratanov
Telerik team
 answered on 08 Aug 2011
3 answers
428 views
Hi,

I have a column in my table which consists of both date and time.

when i am filtering that column in a radgrid it is filtring the values only whose time is equal to 12:00AM.

scenario:My column values are like
 12-Jul-2011 11:20PM
12-Jul-2011 12:00AM
12-Jul-2011 08:15AM

when i am filtering with 12-jul-2011 in radgrid it is dsiplaying only 2nd row("12-Jul-2011 12:00AM") and first and third rows are being neglected

Any pointers to solve this problem will be of great help.
Tsvetina
Telerik team
 answered on 08 Aug 2011
5 answers
83 views
Hi,

is there a way to open a new browser window when the user clicks on a ribbon button?
Thnx.
Kate
Telerik team
 answered on 08 Aug 2011
2 answers
95 views
hello

I use RadAjaxManagerProxy in a usercontrol and it dosenot work in one of mypage and i recieve error (only in IE browser):
sys.webforms.pageReqestManagerServerErrorException:An unknown error occurrred while processing the request on the server...400

I resolve this error with machinekey in web.config but when I upload my site ,again I recieve this error.


please help...

 

Princy
Top achievements
Rank 2
 answered on 08 Aug 2011
3 answers
281 views
Hi, we are scratching our heads on how to set the time. The value in the database (StartTime) is

2011-07-22 07:00:00.000

and our dateTimePicker looks like this

 <telerik:RadDateTimePicker ID="RadDateTimePicker3" runat="server" Culture="English (United States)" DbSelectedDate='<%# Bind("StartTime") %>'  >
                                 <DateInput ID="DateInput3" runat="server" />
                                 </telerik:RadDateTimePicker>


But it always displays 12:00 AM in the time picker. I looked all over the support forums and there are many many examples for the timepicker itself, but nothing all that clear on raddateTimePicker. If anyone can help, that would be greatly appreciated. Thanks!
Mira
Telerik team
 answered on 08 Aug 2011
1 answer
117 views
I'm trying to add fields to a RadFilter component, and I'm using this code:

	Telerik.Web.UI.RadFilterNumericFieldEditor testNum = new Telerik.Web.UI.RadFilterNumericFieldEditor();
        testNum.FieldName = "OrderID";
        testNum.DataType = Type.GetType("System.Int32");
 
        RadFilterQueryFilter.FieldEditors.Add(testNum);

However, when I execute, the field is not visible on the field list. What I am missing?
Andrey
Telerik team
 answered on 08 Aug 2011
7 answers
183 views
Hi,

while filtering a combox column within an item template, i received the following runtime error. This only happens on the radgrid combox column.

Microsoft JScript runtime

error: Sys.WebForms.PageRequestManagerServerErrorException: is neither a DataColumn nor a DataRelation for table DefaultView.

 


thanks,
Minh Bui
Jayesh Goyani
Top achievements
Rank 2
 answered on 08 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?