Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
92 views
Hi,

I have RadGrid in UserControl which is placed in a MasterPage.

Code in .aspx page:

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat
="server">
<ClientEvents OnRequestStart="onRequestStart" />
 <AjaxSettings>
 <telerik:AjaxSetting AjaxControlID="RadGridClntResult">
 <UpdatedControls>
 <telerik:AjaxUpdatedControl ControlID="RadGridClntResult" LoadingPanelID="RadAjaxLoadingPanel1"/>
 <%--<telerik:AjaxUpdatedControl ControlID="btnSrch" LoadingPanelID="RadAjaxLoadingPanel1" />--%>
 </UpdatedControls>
 </telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="btnEdit">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGridClntResult" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>

<telerik:RadTabStrip ID="rTabStrip" runat="server" SelectedIndex="0" 
                                        Width="950px" MultiPageID="radMultiPage" Skin="Outlook"
                                        OnClientTabSelecting="tabSelecting"
                                        OnClientTabUnSelected="tabUnSelect"
                                        OnClientTabSelected="tabSelected">
                                         <Tabs>
                                            <telerik:RadTab Text="Contact Information" Selected="True" runat="server">
                                            </telerik:RadTab>
                                           <telerik:RadTab Text="Customers" runat="server">
                                            </telerik:RadTab>
                                            <telerik:RadTab Text="Orders" runat="server">
                                            </telerik:RadTab>
                                           
                                         </Tabs>
                                    </telerik:RadTabStrip>
                                    <telerik:RadMultiPage ID="radMultiPage" runat="server" SelectedIndex="0" onOnPageViewCreated="radMultiPage_PageViewCreated" >
                                         <telerik:RadPageView ID="RPVCDetail" runat="server">
                                            <uc1:contactDet ID="ucCntDet" runat="server" />  <!-- control contains the grid -->
                                         </telerik:RadPageView>
                                         <telerik:RadPageView ID="rpcData" runat="server">
                                            <uc1:gDataFeed ID="ucBetaData" runat="server"></uc1:gDataFeed>
                                         </telerik:RadPageView>
                                        
                                    </telerik:RadMultiPage>

Web UserControl code:
<telerik:RadGrid ID="radCntDets" runat="server" GridLines="None" Width="938px"
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
OnNeedDataSource="radCntDets_OnNeedDataSource" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates
="True" HorizontalAlign="NotSet">
<ClientSettings EnableRowHoverStyle="True">
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
<MasterTableView GridLines="None" CommandItemDisplay="Top" DataKeyNames="ContactID" EditMode
="InPlace">
<Columns>
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ItemStyle-Width="100px" HeaderStyle-Width
="100px">
</telerik:GridEditCommandColumn> 
<telerik:GridBoundColumn UniqueName="First Name" HeaderText="First Name" DataField="FirstName" HeaderStyle-Width="100px" ItemStyle-Width="100px" > 
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="Last NAme" HeaderText="Last Name" DataField="LastName" HeaderStyle-Width="100px" ItemStyle-Width
="100px">
</telerik:GridBoundColumn>

<telerik:GridBoundColumn UniqueName="Contact Type" HeaderText="Contact Type" DataField="ContactType" HeaderStyle-Width="100px" ItemStyle-Width
="100px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="vchEmail" HeaderText="Email" DataField="EmailAddress" HeaderStyle-Width="100px" ItemStyle-Width
="100px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="Phone Number" HeaderText="Phone" DataField="PhoneNumber" HeaderStyle-Width="100px" ItemStyle-Width
="100px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="Role" HeaderText="Role" DataField="PhoneNumber" HeaderStyle-Width="100px" ItemStyle-Width
="100px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="Notes" HeaderText="Notes" DataField="Notes" HeaderStyle-Width="220px" ItemStyle-Width
="220px">
</telerik:GridBoundColumn>
</Columns>
<%--<EditFormSettings ColumnNumber="3" CaptionFormatString="Edit details for employee with ID {0}"
CaptionDataField="ContactID">
<FormTableItemStyle Wrap="False"></FormTableItemStyle>
<FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
<FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" />
<FormTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="2" CssClass="module"
Height="110px"/>
<FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
<FormStyle BackColor="#eef2ea"></FormStyle>
<EditColumn UpdateText="Update" UniqueName="EditCommandColumn1" CancelText="Cancel" ItemStyle-Font-Size="Smaller">
</EditColumn>
<FormTableButtonRowStyle HorizontalAlign="Left" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
</EditFormSettings>--%>
</MasterTableView>
</telerik:RadGrid>

codebehind:

protected void radCntDets_OnNeedDataSource(object source, GridNeedDataSourceEventArgs e)
{

 radCntDets.DataSource = (DataSet)Session["CDetails"];

}

 

RadGrid control start jumping up and down when I mouse over on the grid or grid heading.
I am using VS2010 on windows7 OS.

Thanks in advance for your response.

-regards
Indra

 

 

Indranath
Top achievements
Rank 1
 answered on 01 Jun 2011
7 answers
118 views

Hi,

I have hard time finding some resources how to implement custom provider, in past I found this article

http://www.telerik.com/help/aspnet-ajax/schedule_databindingimplementingaprovider.html

but now I can’t access it.

Do you have any workaround to get that information, or it’s unavailable on purpose?

Thanks for info

Veronica
Telerik team
 answered on 01 Jun 2011
3 answers
59 views
I have a control which contains a telerik RadTabStrip.  There are 7 blank tabs which have the text dynamically set at runtime.  This control is used on 3 .aspx pages and one .ascx control.  On the three pages, everything works perfectly.  On the control, the tab appears blank.  But when you mouse over it, the tab text appears.  It then disappears again once you move the mouse off the tab.

Since this code is in a control, the same code is used in all 4 places.  But it's only working properly in 3.  So the only thing I can think of is how the control is being used between the 4 objects.  In the pages, the control is wrapped in an <asp:content><table><tr><td><div> section.  In the one control, it's in an <asp:panel><div> which is ultimately used by an <AJAXext:ModalPopupExtender>.

We are using version 2010.2.826.35.  Are there any known issues with that version's tabs being displayed properly within modal popups?

Thanks,
Donnovan
Kate
Telerik team
 answered on 01 Jun 2011
4 answers
112 views
Hi

Is there a way where i can preserve radgrid and its Template data.

My Scenario is

I retrieve  information from Database and bind it to Radgrid and there are few values i bind them to Template columns in ItemDataBound
I am saving Radgrid to Session When i come back to the same page second time i am able to bind the Radgrid with the session howevere  not the Template Columns.
Its binding all the template columns all over again which is a time consuming process. If its done for the first time can we just  Is there a way i can preserve the complete Radgrid along with Template coulmns
I am not sure if that can be done but just wanted to find out if there is an option

Thank you
Kavya

Kavya
Top achievements
Rank 2
 answered on 01 Jun 2011
6 answers
794 views
Hi ,

I try to implement the sample http://www.telerik.com/community/code-library/aspnet-ajax/calendar/disabling-calendar-days.aspx ti disable the weekend day.

But the result is very strange. He don't disable the weekend days but the 4 days of the first week and  3 day on the last week.
I say that the sample was from 2007 (little bit old ;-) ) and it was needed to change little think (like i found in other post).
But this change don't solve my problem.

Any issue would be appreciate.

Thanks

Edwin.

Here my code:

// necessary to disable the weekends on client-side navigation 
    function OnDayRender(calendarInstance, args) { 
        // convert the date-triplet to a javascript date 
        // we need Date.getDay() method to determine  
        // which days should be disabled (e.g. every Saturday (day = 6) and Sunday (day = 0))                 
        var jsDate = new Date(args._date[0], args._date[1] - 1, args._date[2]); 
        if (jsDate.getDay() == 0 || jsDate.getDay() == 6) { 
            var otherMonthCssClass = "otherMonth_" + calendarInstance.Skin; 
            args.Cell.className = otherMonthCssClass
            // replace the default cell content (anchor tag) with a span element  
            // that contains the processed calendar day number -- necessary for the calendar skinning mechanism  
            args.Cell.innerHTML = "<span>" + args._date[2] + "</span>"; 
            // disable selection and hover effect for the cell 
            args.Cell.DayId = ""
        } 
    } 
 
 
<telerik:RadDatePicker ID="Raddatepicker2" Style="vertical-align: middle;" Skin="Office2007" Width="200px" 
                            MinDate="2009-01-01" runat="server" MaxDate="2099-12-16" Culture="Dutch (Netherlands)"
                            <DateInput onclick="ToggleSecondPopup()" DateFormat="d" runat="server"></DateInput> 
                            <Calendar DayNameFormat="FirstTwoLetters" FirstDayOfWeek="Monday" runat="server" OnDayRender="Calendar_OnDayRender" Skin="Office2007" DisabledDayStyle-ForeColor="Gray"
                                <ClientEvents OnDayRender="OnDayRender" /> 
                            </Calendar> 
                        </telerik:RadDatePicker> 
 
 
 




protected void Page_Load(object sender, EventArgs e) 
        { 
            if(!Page.IsPostBack) 
            { 
                 
            } 
            if(!IsAlreadyLoaded) 
            { 
                Raddatepicker2.Calendar.SpecialDays.Clear(); 
                Raddatepicker2.SelectedDate = DateTime.Now; 
                FullPage(); 
                FullUpdate(); 
                IsAlreadyLoaded = true
            } 
        } 
 
 
protected void Calendar_OnDayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e) 
        { 
            if(e.Day.Date.DayOfWeek == DayOfWeek.Saturday || e.Day.Date.DayOfWeek == DayOfWeek.Sunday) 
            { 
                string calendarSkin = Raddatepicker2.Calendar.Skin != "" ? Raddatepicker2.Calendar.Skin : "Default"; 
                string otherMonthCssClass = String.Format("otherMonth_{0}", calendarSkin); 
 
                e.Cell.Text = ""
                e.Cell.CssClass = otherMonthCssClass
 
                Label label = new Label(); 
                label.Text = e.Day.Date.Day.ToString(); 
                e.Cell.Controls.Add(label); 
 
                RadCalendarDay calendarDay = new RadCalendarDay(); 
                calendarDay.Date = e.Day.Date; 
                calendarDay.IsSelectable = false
                calendarDay.ItemStyle.CssClass = otherMonthCssClass
                Raddatepicker2.Calendar.SpecialDays.Add(calendarDay); 
            } 
        } 
 

Karl
Top achievements
Rank 1
 answered on 01 Jun 2011
1 answer
106 views
Hi,
I am trying to export a RadGrid data to pdf/excel.
If I use the grid's inbuilt export button then it works fine, but if I call the ExportToExcel() from code behind it throws below exception:
Specified argument was out of the range of valid values on line- radGridShippedOrders.ExportSettings.IgnorePaging = true;

I tried to debug the code and found out that the radGridShippedOrders.MasterTableView.VirtualItemCount is returning 0.

protected void radGridShippedOrders_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{...............}

protected void btnExportToPDF_Click(object sender, EventArgs e)
        {
            radGridShippedOrders.PageSize = radGridShippedOrders.MasterTableView.VirtualItemCount;
            radGridShippedOrders.ExportSettings.IgnorePaging = true;
            radGridShippedOrders.ExportSettings.OpenInNewWindow = true;
            radGridShippedOrders.MasterTableView.ExportToPdf();
        }

<telerik:RadGrid ID="radGridShippedOrders" runat="server" GridLines="None" AllowPaging="True"
            PageSize="10" AllowSorting="True" AutoGenerateColumns="false" ShowStatusBar="true"
            HorizontalAlign="NotSet" AllowMultiRowEdit="false" OnNeedDataSource="radGridShippedOrders_NeedDataSource" 
             OnItemCommand="radGridShippedOrders_OnItemCommand"
            Width="800px" AllowMultiRowSelection="False" AllowFilteringByColumn="true" ShowGroupPanel="True">
            <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
            
            <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true">
                 <Pdf PageTitle="Shipped Orders" />
            </ExportSettings>


            <MasterTableView GroupLoadMode="Client" CommandItemDisplay="Bottom" DataKeyNames="OAHSSQ" Name="MTVShippedOrders">
                <CommandItemTemplate>
                    <asp:Button ID="DownloadPDF" runat="server" CommandName="ExportToPdf" Text="Export" />
                </CommandItemTemplate>
                <CommandItemSettings ShowExportToExcelButton="true" />
                <Columns>
                    <telerik:GridBoundColumn UniqueName="OACONO" HeaderText="OACONO" DataField="OACONO">
                    </telerik:GridBoundColumn>                
                    <telerik:GridBoundColumn UniqueName="OAINNO" HeaderText="OAINNO" DataField="OAINNO">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn UniqueName="OAORNO" HeaderText="OAORNO" DataField="OAORNO">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn UniqueName="OAORGN" HeaderText="OAORGN" DataField="OAORGN">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn UniqueName="OAHSSQ" HeaderText="OAHSSQ" DataField="OAHSSQ">
                    </telerik:GridBoundColumn>
                </Columns>
                
                <NestedViewTemplate>
                    <b>Invoice Header</b><br />
                    <telerik:RadGrid ID="radGridInvoiceHeader" runat="server" GridLines="None" AllowPaging="True"
                        PageSize="20" AllowSorting="True" AutoGenerateColumns="false" ShowStatusBar="true"
                        HorizontalAlign="NotSet" AllowMultiRowEdit="false" OnNeedDataSource="radGridInvoiceHeader_NeedDataSource"
                        Width="100%" AllowMultiRowSelection="False" AllowFilteringByColumn="false">
                        <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
                        <ExportSettings ExportOnlyData="false" IgnorePaging="true" OpenInNewWindow="true">
                            <Pdf PageTitle="Invoice Header" />
                        </ExportSettings>
                        <MasterTableView CommandItemDisplay="Bottom">
                            <CommandItemTemplate>
                                <asp:Button ID="DownloadPDF" runat="server" CommandName="ExportToPdf" Text="Export" />
                            </CommandItemTemplate>
                            <CommandItemSettings ShowExportToPdfButton="true" ExportToPdfText="Export to PDF" />
                            <Columns>
                                <telerik:GridBoundColumn UniqueName="OHORNO" HeaderText="Order Number" DataField="OHORNO"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHCSNM" HeaderText="Customer Name" DataField="OHCSNM"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHCAD1" HeaderText="Sold To Add 1" DataField="OHCAD1"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHCAD2" HeaderText="Sold To Add 2" DataField="OHCAD2"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHBLCY" HeaderText="Sold To City" DataField="OHBLCY"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHBLST" HeaderText="Sold To State" DataField="OHBLST"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHBLZP" HeaderText="Sold To Zip" DataField="OHBLZP"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHSHNM" HeaderText="Customer Name 2" DataField="OHSHNM"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHSAD1" HeaderText="Ship To Address 1" DataField="OHSAD1"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHSAD2" HeaderText="Ship To Address 2" DataField="OHSAD2"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHSCTY" HeaderText="Ship To City" DataField="OHSCTY"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHSHST" HeaderText="Ship To State" DataField="OHSHST"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHSZIP" HeaderText="Ship To Zip" DataField="OHSZIP"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHCSPO" HeaderText="PO Number" DataField="OHCSPO"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHINAM" HeaderText="Invoice Amount" DataField="OHINAM"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHISAM" HeaderText="Sub Total" DataField="OHISAM"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHSCAM" HeaderText="Special Charges" DataField="OHSCAM"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHTXAM" HeaderText="Sales Tax" DataField="OHTXAM"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="OHINAM" HeaderText="Order Total" DataField="OHINAM"></telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                    
                    <br />
                    <b>Invoice Details</b><br />
                    <telerik:RadGrid ID="radGridInvoiceDetails" runat="server" GridLines="None" AllowPaging="True"
                        PageSize="20" AllowSorting="True" AutoGenerateColumns="false" ShowStatusBar="true"
                        HorizontalAlign="NotSet" AllowMultiRowEdit="false" OnNeedDataSource="radGridInvoiceDetails_NeedDataSource"
                        Width="100%" AllowMultiRowSelection="False" AllowFilteringByColumn="false" OnItemDataBound="radGridInvoiceDetails_ItemDataBound">
                        <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
                        <ExportSettings ExportOnlyData="false" IgnorePaging="true" OpenInNewWindow="true">
                            <Pdf PageTitle="Invoice Header" />
                        </ExportSettings>
                        <MasterTableView CommandItemDisplay="Bottom">
                            <CommandItemTemplate>
                                <asp:Button ID="DownloadPDF" runat="server" CommandName="ExportToPdf" Text="Export" />
                            </CommandItemTemplate>
                            <CommandItemSettings ShowExportToPdfButton="true" ExportToPdfText="Export to PDF" />
                            <Columns>
                                <telerik:GridBoundColumn UniqueName="ODITNO" HeaderText="Item Number" DataField="ODITNO"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="ODITD1" HeaderText="Item Description" DataField="ODITD1"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="ODQTOR" HeaderText="Quantity Ordered" DataField="ODQTOR"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="ODQTSH" HeaderText="Quantity Shipped" DataField="ODQTSH"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="ODBOQT" HeaderText="Quantity Backordered" DataField="ODBOQT"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="ODASLP" HeaderText="Sell Price" DataField="ODASLP"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="ODLNAM" HeaderText="Extended" DataField="ODLNAM"></telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                
                </NestedViewTemplate>
                                               
            </MasterTableView>
             <ClientSettings AllowGroupExpandCollapse="True" ReorderColumnsOnClient="True" AllowDragToGroup="True"
                AllowColumnsReorder="True">
            </ClientSettings>
             <GroupingSettings ShowUnGroupButton="true" />
        </telerik:RadGrid>
Shinu
Top achievements
Rank 2
 answered on 01 Jun 2011
1 answer
35 views
When I change page in RadGrid, does not fire the event "PageIndexChanged. " The EnableViewState is equal to "True. "

What could be happening?
Carlos Rdz.
Vasil
Telerik team
 answered on 01 Jun 2011
8 answers
600 views
HI,

I am using RadTabstrip in my application,inside RadTabstrip i am having tabs,my requirement is to have space between the tabs with round corners

Hiren
Top achievements
Rank 1
 answered on 01 Jun 2011
2 answers
128 views
Is there any plan to fix the display of modal windows that are larger than the browser window so they can automatically be positioned at the top left of the page instead of the middle?  When they are positioned in the middle, you have no way to get to the modal window's toolbar to drag it to where you can see it because the top of the modal window is beyond the top scroll area for the browser window.

see attached image--note that I made the browser window a bit bigger after the modal popped up so you could actually see where it is.

TechSavvySam
Top achievements
Rank 1
 answered on 01 Jun 2011
2 answers
51 views
Hi Team;

Is there any guidelines to develop ASP.Net Apps [using Telerik controls] that would run on Mobile & tables regardless of the OS?
Compared to Desktop, what are the issues that we need to take into considerations.
Thank you in advance!
..Ben
Ben Hayat
Top achievements
Rank 2
 answered on 01 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?