Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
183 views
I am using the RADGrid with a self-referencing hierarchy. The markup for this is (columns omitted):

    <telerik:RadGrid ID="RadGrid1" runat="server" PageSize="50" AutoGenerateColumns="False" GridLines="None" Skin="Vista" ShowHeader="true" CommandItemStyle-Height="30px" Width="100%" HorizontalAlign="Center" AllowPaging="true" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemCreated="RadGrid1_ItemCreated"
        <MasterTableView HierarchyDefaultExpanded="false" HierarchyLoadMode="Client" EnableNoRecordsTemplate="true" DataKeyNames="NETT_IS_ID,NETT_ID" Width="100%"
            <SelfHierarchySettings KeyName="ID" ParentKeyName="IS_ID" />             
            <Columns>                 
 
            </Columns> 
            <EditFormSettings> 
                <PopUpSettings ScrollBars="None"></PopUpSettings> 
            </EditFormSettings> 
            <PagerTemplate> 
                    <table border="0" cellpadding="0" cellspacing="0" style="height: 20px" align="center"
                        <tr> 
                            <td width="100px"
                                <asp:LinkButton ID="LinkButton1" CommandName="Page" CausesValidation="false" CommandArgument="First" runat="server" style="text-decoration: none;"><img src="_assets/images/first.gif" alt="" style="vertical-align:middle; border: none; "/> <span class="pager">First</span></asp:LinkButton> 
                            </td> 
                            <td width="100px"
                                <asp:LinkButton ID="LinkButton5" CommandName="Page" CausesValidation="false" CommandArgument="Prev" runat="server" style="text-decoration: none;"><img src="_assets/images/arrow.gif" alt="" style="vertical-align:middle; border: none;" /> <span class="pager">Prev</span></asp:LinkButton> 
                            </td> 
                            <td align="center" width="100px"
                                <asp:LinkButton ID="LinkButton6" CommandName="RebindGrid" CausesValidation="false" runat="server" style="text-decoration: none;"><img src="_assets/images/refresh.gif" alt="" style="margin-right: 2px; vertical-align: middle; border: none;" /> <span class="pager">Refresh</span></asp:LinkButton> 
                            </td>                             
                            <td align="right" width="100px"
                                <asp:LinkButton ID="LinkButton3" CommandName="Page" CausesValidation="false" CommandArgument="Next" runat="server" style="text-decoration: none;"><span class="pager">Next</span> <img src="_assets/images/arrowRight.gif" style="vertical-align:middle; border: none;" alt="" /></asp:LinkButton> 
                            </td> 
                            <td align="right" width="100px"
                                <asp:LinkButton ID="LinkButton2" CommandName="Page" CausesValidation="false" CommandArgument="Last" runat="server" style="text-decoration: none;"><span class="pager">Last</span> <img src="_assets/images/last.gif" style="vertical-align:middle; border: none;" alt="" /></asp:LinkButton> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td colspan="5" align="center"
                                Page <%# (int)DataBinder.Eval(Container, "Paging.CurrentPageIndex") + 1 %> of <%# DataBinder.Eval(Container, "Paging.PageCount")%>, items from <%# (int)DataBinder.Eval(Container, "Paging.FirstIndexInPage") + 1 %> to <%# (int)DataBinder.Eval(Container, "Paging.LastIndexInPage") + 1 %> of <%# DataBinder.Eval(Container, "Paging.DataSourceCount")%>
                            </td> 
                        </tr> 
                    </table> 
                </PagerTemplate> 
        </MasterTableView> 
        <PagerStyle Mode="Advanced" /> 
    </telerik:RadGrid> 

The total record count in the database is 150. If I set the page size to 50, when I get to the third page the child records don't show (nor do the arrows indicating child records are present), however pages 1 and 2 worked fine. If I change the page size to 100 or higher the records with issues originally on page 3+ work flawlessly, but then I get the annoying "This script is taking a long time to run, do you wish to cancel?" error message from IE. It is only when the records get to the third page or more that their correlating child entries stop displaying.

The grid is being bound in the code-behind (Oracle is the provider) using the NeedDataSource event handler. Whenever that event is fired the grid's data source is set to a data table containing the entries (which is retrieved every time that event fires - all records returned according to the stored procedure).

Any thoughts on why pages 3+ would break, but 1 or 2 function fine no matter the page count?
Tsvetoslav
Telerik team
 answered on 02 Mar 2011
1 answer
177 views
Hi,

I have Tree View with three parent node. I wanted to use parent node just as title for those Child Nodes. User can't select it or no operation should happen when they select it.

In my application On select of node we need to update panel and grid is loading based on selected tree view node value. But when user select parent node i don't want to do that.

Is there any way i can make parent node read only ?

Thanks,
Shinu
Top achievements
Rank 2
 answered on 02 Mar 2011
3 answers
71 views
Hi,
I am using RadEditor control, and when i click on toggle mode, it correctly makes it to full screen mode. But as soon as i type the first word in full screen mode, the editor shrinks vertically.
I am using this RadEditor control in a Usercontrol (".ascx file").

Please let me know if this is a bug or i am doing something wrong?

Thanks,
Santosh
Rumen
Telerik team
 answered on 02 Mar 2011
3 answers
108 views
The following is my aspx code...
When the page first loads it displays the contents properly (datagrid).  When I click on another tab the contents from the first tab is placed underneath the contents for the current tab.  Same thing happens if I click on the first tab...I now get two datagrids appearing with the same information ie. the grids are duplicated.

Any help would be greatly appreciated...I must be missing something small....I am at a total loss..
thanks,
scott


radtsYear_tabclick event code

 

 

protected void radtsYear_TabClick(object sender, Telerik.Web.UI.RadTabStripEventArgs e)

 

 

{

 

 

 

int ItemID = int.Parse(e.Tab.Text);

 

 

Session[

 

"ItemID"] = ItemID;

 

 

 

 

DataSet dsTemp = (DataSet) Session["dsGetGrowerOfferDetail"];

 

 

 

 

switch (ItemID)

 

 

{

 

 

 

case 2011:

 

 

 

if (dsTemp.Tables[2].Rows.Count > 0)

 

 

{

 

gvOffers2011.DataSource = dsTemp.Tables[2];

 

gvOffers2011.DataBind();

 

}

 

 

 

break;

 

 

 

 

case 2010:

 

 

 

if (dsTemp.Tables[1].Rows.Count > 0)

 

 

{

 

gvOffers2010.DataSource = dsTemp.Tables[1];

 

gvOffers2010.DataBind();

 

}

 

 

 

 

 

break;

 

 

 

 

case 2009:

 

 

 

if (dsTemp.Tables[0].Rows.Count > 0)

 

 

{

 

gvOffers2009.DataSource = dsTemp.Tables[0];

 

gvOffers2009.DataBind();

 

}

 

 

 

break;

 

}

}





 

 

<telerik:RadAjaxPanel runat="server" EnableHistory="false" HorizontalAlign="NotSet"

 

 

 

 

LoadingPanelID="RadAjaxLoadingPanel1">

 

 

 

<telerik:RadTabStrip ID="radtsYear" runat="server"

 

 

 

 

Skin="Forest" MultiPageID="radMultiPage" ontabclick="radtsYear_TabClick" SelectedIndex="0">

 

 

 

<Tabs>

 

 

 

<telerik:RadTab runat="server" Text="2011" >

 

 

 

</telerik:RadTab>

 

 

 

<telerik:RadTab runat="server" Text="2010" >

 

 

 

</telerik:RadTab>

 

 

 

<telerik:RadTab runat="server" Text="2009" >

 

 

 

</telerik:RadTab>

 

 

 

</Tabs>

 

 

 

</telerik:RadTabStrip>

 

 

 

<telerik:RadMultiPage ID="radMultiPage" runat="server" Width="100%" SelectedIndex="0" RenderSelectedPageOnly="true">

 

 

 

<telerik:RadPageView ID="pv2011" runat="server" ToolTip="2011 Grower Registrations">

 

 

 

<tr>

 

 

 

<td>

 

 

 

<asp:GridView ID="gvOffers2011" runat="server"

 

 

 

 

AlternatingRowStyle-BackColor="Gainsboro" AutoGenerateColumns="False"

 

 

 

 

Caption="2011 Offers" CaptionAlign="Top" EmptyDataText="No 2011 Offers Found"

 

 

 

 

HeaderStyle-BackColor="Green" HeaderStyle-ForeColor="White"

 

 

 

 

HeaderStyle-HorizontalAlign="Center" OnRowDataBound="gvOffers2010_RowDataBound"

 

 

 

 

Visible="True" Width="100%">

 

 

 

<Columns>

 

 

 

<asp:BoundField DataField="Offer_name" HeaderText="Program" />

 

 

 

<asp:BoundField DataField="Offer_description" HeaderText="Details" />

 

 

 

<asp:TemplateField HeaderText="Registration" ItemStyle-HorizontalAlign="Center">

 

 

 

<ItemTemplate>

 

 

 

<asp:Image ID="ImageRegistration" runat="server"

 

 

 

 

ImageUrl="Images/checkboxno.gif">

 

 

 

</asp:Image>

 

 

 

</ItemTemplate>

 

 

 

</asp:TemplateField>

 

 

 

<asp:TemplateField HeaderText="Paid" ItemStyle-HorizontalAlign="Center">

 

 

 

<ItemTemplate>

 

 

 

<asp:Image ID="ImagePaid" runat="server" ImageUrl="Images/checkboxno.gif">

 

 

 

</asp:Image>

 

 

 

</ItemTemplate>

 

 

 

</asp:TemplateField>

 

 

 

</Columns>

 

 

 

<HeaderStyle BackColor="Green" ForeColor="White" />

 

 

 

<AlternatingRowStyle BackColor="Gainsboro" />

 

 

 

</asp:GridView>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</telerik:RadPageView>

 

 

 

<telerik:RadPageView ID="pv2010" runat="server"

 

 

 

 

ToolTip="2010 Grower Registrations">

 

 

 

<tr>

 

 

 

<td>

 

 

 

<asp:GridView ID="gvOffers2010" runat="server"

 

 

 

 

AlternatingRowStyle-BackColor="Gainsboro" AutoGenerateColumns="False"

 

 

 

 

Caption="2010 Offers" CaptionAlign="Top" EmptyDataText="No Offers Found"

 

 

 

 

HeaderStyle-BackColor="Green" HeaderStyle-ForeColor="White"

 

 

 

 

HeaderStyle-HorizontalAlign="Center" OnRowDataBound="gvOffers2010_RowDataBound"

 

 

 

 

Visible="true" Width="100%">

 

 

 

<Columns>

 

 

 

<asp:BoundField DataField="Offer_name" HeaderText="Program" />

 

 

 

<asp:BoundField DataField="Offer_description" HeaderText="Details" />

 

 

 

<asp:TemplateField HeaderText="Registration" ItemStyle-HorizontalAlign="Center">

 

 

 

<ItemTemplate>

 

 

 

<asp:Image ID="ImageRegistration" runat="server"

 

 

 

 

ImageUrl="Images/checkboxno.gif">

 

 

 

</asp:Image>

 

 

 

</ItemTemplate>

 

 

 

</asp:TemplateField>

 

 

 

<asp:TemplateField HeaderText="Paid" ItemStyle-HorizontalAlign="Center">

 

 

 

<ItemTemplate>

 

 

 

<asp:Image ID="ImagePaid" runat="server" ImageUrl="Images/checkboxno.gif">

 

 

 

</asp:Image>

 

 

 

</ItemTemplate>

 

 

 

</asp:TemplateField>

 

 

 

</Columns>

 

 

 

<HeaderStyle BackColor="Green" ForeColor="White" />

 

 

 

<AlternatingRowStyle BackColor="Gainsboro" />

 

 

 

</asp:GridView>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</telerik:RadPageView>

 

 

 

<telerik:RadPageView ID="pv2009" runat="server"

 

 

 

 

ToolTip="2009 Grower Registrations">

 

 

 

<tr>

 

 

 

<td>

 

 

 

<asp:GridView ID="gvOffers2009" runat="server"

 

 

 

 

AlternatingRowStyle-BackColor="Gainsboro" AutoGenerateColumns="False"

 

 

 

 

Caption="2009 Offers" CaptionAlign="Top" EmptyDataText="No Offers Found"

 

 

 

 

HeaderStyle-BackColor="Green" HeaderStyle-ForeColor="White"

 

 

 

 

OnRowDataBound="gvOffers2010_RowDataBound" Visible="true" Width="100%">

 

 

 

<HeaderStyle BackColor="Green" ForeColor="White" />

 

 

 

<AlternatingRowStyle BackColor="Gainsboro" />

 

 

 

<Columns>

 

 

 

<asp:BoundField DataField="Offer_name" HeaderText="Program" />

 

 

 

<asp:BoundField DataField="Offer_description" HeaderText="Details" />

 

 

 

<asp:TemplateField HeaderText="Registration" ItemStyle-HorizontalAlign="Center">

 

 

 

<ItemTemplate>

 

 

 

<asp:Image ID="ImageRegistration" runat="server"

 

 

 

 

ImageUrl="Images/checkboxno.gif">

 

 

 

</asp:Image>

 

 

 

</ItemTemplate>

 

 

 

 

</asp:TemplateField>

 

 

 

</Columns>

 

 

 

</asp:GridView>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</telerik:RadPageView>

 

 

 

</telerik:RadMultiPage>

 

 

 

</telerik:RadAjaxPanel>

 

 

 

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

 

 

 

 

Skin="Forest" MinDisplayTime="5" InitialDelayTime="2">

 

 

 

</telerik:RadAjaxLoadingPanel>

 

Veronica
Telerik team
 answered on 02 Mar 2011
1 answer
123 views


Table

menuid   navigationurl  text           parentmenuid    isheadermenu
1 NULL InternetSites NULL True
2 NULL Yahoo 1 False
3 www.yahoo1.com Yahoo1 2 False
4 www.yahoo2.com Yahoo2 2 False
5 NULL Google 1 False
6 www.google1.com Google1 5 False
7 www.google2.com Google2 5 False
8 NULL Services NULL True
9 NULL IT 8 False
10 www.it1.com it1 9 False
11 www.it2.com it2 9 False
12 NULL Infrastructure 9 False
13 www.infra1.com infra1 12 False
14 www.infra2.com infra2 12 False

IsHeaderMenu represents menus which are present in the menubar.

This is my table structure.
User can add more menus from the UI provided.

I have to create the menu dynamically by using the above table structure.
I want to prepare xml for the above structure and want to do.

Can you give me some sample ?

Regards
Sreedhar Ambati



Shinu
Top achievements
Rank 2
 answered on 02 Mar 2011
1 answer
266 views
Hello,

I'm following this example: http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/treeviewcombobox/defaultcs.aspx

This works great.  But what I want is for the RadComboBox drop down not to collapse when clicking on the root element.  My tree is two levels deep always, and for the child only do I want the selection to happen.  I have this working great, but I need to cancel the drop down collapse, is there something passed in through the event arg for this?

Thanks.
Princy
Top achievements
Rank 2
 answered on 02 Mar 2011
1 answer
119 views
Hi Telerik,

I have a RadComboBox inside a RadComboBox ItemTemplate and the inner combobox is loading the items but the items are displayed behind the main combobox. Please look at the attached image to understand clearly. I want to get the items in the front so user can see all the items clearly and feel as the normal behavior of combobox.

Let me know how I can get out of this issue.

Thanks in advance,
Ravi
Princy
Top achievements
Rank 2
 answered on 02 Mar 2011
1 answer
250 views
Hello,
The RadDatePicker has default validation for any invalid date. It is working fine. But ,this does not work for me. For a invalid date , current as is implementation keeps the focus on the RadDatePicker control with a Warning image (like a triangle).

My requirement is to put the error message just below the RadDatePicker control, Not inside the control. I want to get rid of the image. Is there way I can disable the default behaviour and implement the custom behaviour using a javascript ?

Thanks,
Deba 
Shinu
Top achievements
Rank 2
 answered on 02 Mar 2011
1 answer
161 views
Hi
I am working on a problem where I need to fire a javascript function when a value is selected in the GridDateTimeColumn of PickerType= "DatePicker". But I couldn't find a relevant event for that. Kindly provide some inputs

Thanks
Sudhanshu
Princy
Top achievements
Rank 2
 answered on 02 Mar 2011
8 answers
87 views
Hi ,
I got an issue while adding reusable content in RadEditor for sharepoint

If we insert the reusable content (which has Automatic update =yes) and check- in the page (you are at Design mode), the Rad Editor remove the reusable content automatically. But if you insert the reusable content and you are at HTML Mode of editor and doing the page checked in it doesn’t remove the reusable content. Also if the Automatic Update =No in the content then there is on issue in RadEditor.

if anybody has faced the same issue, please let me know the resolution  ?

Thanks a lot 
Rajesh Soni
shrikant
Top achievements
Rank 1
 answered on 02 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?