Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
233 views

Hi,

 I have a RadTreelist inside RadTreeviewNodes.
 My requirement is to expand RadTreelist at first level when expanding the treeview node.
I have given the code below

function

 

 

ClientNodeExpanded()

 

{

 

 

var treeView = $find("<%= tree.ClientID %>");

 

 

 

 

var nodes = treeView.get_allNodes();

 

 

 

for (var i = 0; i < nodes.length; i++) {

 

 

 

if (nodes[i].get_nodes() != null) {

 

alert(

 

'hi');

 

 

 

var treelist = nodes[i].get_nodes().getNode(i).findControl("RadTreeList1");

 

treelist.ExpandAllItems();

 

}

}

 

}

treelist.ExpandAllItems() is not workng ...how can I expand treelist at clientside?

 

list.ExpandAllItems();list.ExpandItemToLevel(1) ; these are the C# code for expanding treelist to all items and expand the firstlevel only.
what are the corresponding functions in clientside (javascript)?

 

 

 

Iana Tsolova
Telerik team
 answered on 22 Nov 2011
10 answers
123 views
Hi,

I am creating a website, which needs to have the controls formatting and other stuff get loaded dynamically.Do the telerik control support this feature, out of the box.
Or alternatively do it have the options of creating some XML/XSL files from the controls layout, and loading from the same files to build the UI.

I have find the same utility in Dev-Ex controls for windows application, and was curious if the same is with telerik then it will encourage me to have your product on-board with us.


Thanks

Amit Kothari
Top achievements
Rank 1
 answered on 22 Nov 2011
4 answers
73 views
At least for me it was.  I have a generic list of data i'm binding to the RadChart, where each item contains:
  Name, Quarter, Value

I'd like to display a bar for each quarter, grouped on the Name's.  I can get it to display either by just name, or just Quarter, but not both.  There are variable numbers of items per name, if there is not data present for a quarter there is no item in the list.

I assume from the examples and documentation that I would set,
    series[0].DataYColumn to Value
    DataGroupColumn to Quarter
    PlotArea.XAxis.DataLabelsColumn to Name

But that only yields one bar per Name.  I also tried setting the DataManager.ValuesXColumn, but achieve only the same results.

For some reason though, not explicitly setting series[0].DataYColumn to anything gave me the output that I wanted.  Rather counterinuitive, but it seems to have worked.
Russ
Top achievements
Rank 1
 answered on 22 Nov 2011
0 answers
69 views
Hi,
Environment:
MOSS2007, Visual Studio2010. Target Framework:3.5, SQl Server2008

I am working with telerik controls in MOSS2007. I am able to get the controls by adding manually on the Application page (registering Telerik). when i am adding as a user control as the way we will add user controls in ASp.net its not populating on the page.  when i am trying to bind the Data to the RadGrid, i am getting the gridControl on the page but the data is not populating in the  Grid. I tried with all the ways of bindings as per the Telerik SDK. In all the ways i am facing the same issue. And i didnt find anything in the log's also.
Please provide me a solution step by step as soon as possible for these two issues.
1. Adding Telerik controls as Usercontrols on the Sharepoint2007 pages.
2. How to bind the data to the RadGrid to work in MOSS2007 pages




Regards  
mallikarjun
Mallikarjun Rao
Top achievements
Rank 1
 asked on 22 Nov 2011
1 answer
170 views
Hi

  On my main page I have a button which brings up a radwindow when clicked. The button event on the server side does some processing which determines the URL querystring elements.

How can I set the URL on server side and then open the rad window?

Or is it possible for me to send the URL back to the client side and open from there?

Please help,

Thanks :-)
Stuart Hemming
Top achievements
Rank 2
 answered on 22 Nov 2011
0 answers
67 views
Hi Telerik treeview experts,
greetings..
We use rad treeview 1.1 in one of our asp.net 1.1 websites to populate hierarchical data.
Our customers are often encountering errors when they use the drag and drop feature of treeview control. This occurs when the number of nodes in the tree are more (100 + nodes).
Is that a known performance issue with telerik treeview control version 1 ?. Are there any solutions to this problem?
Appreciate if you could provide some guidance on this. thanks.

Regards,
Sreeraj
 
Sreeraj
Top achievements
Rank 1
 asked on 22 Nov 2011
2 answers
311 views
Hello,

I have created a grid wich shows datas following the value of a Combo Box (nomenclature name).
For many nomenclature i need only 2 colums in the grid but for one i need 5 columns.
So i created 5 columns in my grid and I change the "visible" attribute of the GridTemplateColumn when necessary to show or not the 3 last columns.
I have a problem when i click on the edit or Insert command. I have everytime 5 fields (even if the GridTemplateColumn is not visible)

How can i set the visible attribute of the field in the edit form ? I need to hide those three fields (isocountrycode, phoneID, nationality)


  • cs:
    protected void RadGridNomenclature_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
            {
     
               [....]
                if (RadComboBoxNomenclaturesList.SelectedItem.Text.ToString().Equals("Code pays"))
                {
                    RadGridNomenclature.Columns.FindByUniqueName("isoCountryCode").Visible = true;
                    RadGridNomenclature.Columns.FindByUniqueName("phoneID").Visible = true;
                    RadGridNomenclature.Columns.FindByUniqueName("nationality").Visible = true;
     
                    RadGridNomenclature.Columns.FindByUniqueName("description").HeaderStyle.Width = Unit.Pixel(175);
                }
                else
                {
                    RadGridNomenclature.Columns.FindByUniqueName("isoCountryCode").Visible = false;
                    RadGridNomenclature.Columns.FindByUniqueName("phoneID").Visible = false;
                    RadGridNomenclature.Columns.FindByUniqueName("nationality").Visible = false;
     
                    RadGridNomenclature.Columns.FindByUniqueName("description").HeaderStyle.Width = Unit.Pixel(500);
                }
     
                [....]
            }

  • aspx:

<telerik:RadComboBox ID="RadComboBoxNomenclaturesList" Runat="server"
        AutoPostBack="True"
        onselectedindexchanged="RadComboBoxNomenclaturesList_SelectedIndexChanged"
        Skin="Windows7">
    </telerik:RadComboBox>
<telerik:RadGrid ID="RadGridNomenclature" OnUnload="RadGridNomenclature_Unload" OnNeedDataSource="RadGridNomenclature_NeedDataSource" OnInsertCommand="RadGridNomenclature_InsertCommand" OnDeleteCommand="RadGridNomenclature_DeleteCommand" OnUpdateCommand="RadGridNomenclature_UpdateCommand" runat="server" Skin="Windows7" PageSize="20" Width="777px">
    <MasterTableView AutoGenerateColumns="false" DataKeyNames="uid" InsertItemPageIndexAction="ShowItemOnCurrentPage" AllowPaging="True" CommandItemDisplay="Top">
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                <ItemStyle CssClass="MyImageButton" />
            </telerik:GridEditCommandColumn>
 
            <telerik:GridTemplateColumn HeaderText="UID" SortExpression="uid" UniqueName="uid" Visible="True" ShowFilterIcon="true">
                <HeaderStyle Width="175px" />
                <ItemTemplate>
                    <asp:Label runat="server" ID="uid" Text='<%# Eval("uid") %>'></asp:Label>
                </ItemTemplate>
                <InsertItemTemplate>
                    <telerik:RadTextBox ID="RadTextBoxUid" runat="server" Text='Calculated by the system' Width="175px" ReadOnly="True" Enabled="false" />
                </InsertItemTemplate>
                <EditItemTemplate>
                   <telerik:RadTextBox ID="RadTextBoxUid" runat="server" Text='<%# Bind("uid") %>' Width="175px" ReadOnly="True" />
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
 
            <telerik:GridTemplateColumn HeaderText="Description" SortExpression="description" UniqueName="description" Visible="True">
                <HeaderStyle Width="500px" />
                <ItemTemplate>
                    <asp:Label runat="server" ID="description" Text='<%# Eval("description") %>'></asp:Label>
                </ItemTemplate>
                <InsertItemTemplate>
                    <telerik:RadTextBox ID="RadTextBoxDescription" runat="server" Width="450px" />
                </InsertItemTemplate>
                <EditItemTemplate>
                   <telerik:RadTextBox ID="RadTextBoxDescription" runat="server" Text='<%# Bind("description") %>' Width="450px" />
                </EditItemTemplate>               
            </telerik:GridTemplateColumn>
 
            <telerik:GridTemplateColumn HeaderText="ISO country code" SortExpression="isoCountryCode" UniqueName="isoCountryCode" Visible="False">
                <HeaderStyle Width="75px" />
                <ItemTemplate>
                    <asp:Label runat="server" ID="isoCountryCode" Text='<%# Eval("isoCountryCode") %>'></asp:Label>
                </ItemTemplate>
                <InsertItemTemplate>
                    <telerik:RadTextBox ID="RadTextBoxIsoCountryCode" runat="server" Width="100px"/>
                </InsertItemTemplate>
                <EditItemTemplate>
                   <telerik:RadTextBox ID="RadTextBoxIsoCountryCode" runat="server" Text='<%# Bind("isoCountryCode") %>' Width="100px" />
                </EditItemTemplate>               
            </telerik:GridTemplateColumn>
 
            <telerik:GridTemplateColumn HeaderText="Identifiant telephonique" SortExpression="phoneID" UniqueName="phoneID" Visible="False">
                <HeaderStyle Width="75px" />
                <ItemTemplate>
                    <asp:Label runat="server" ID="phoneID" Text='<%# Eval("phoneID") %>'></asp:Label>
                </ItemTemplate>
                <InsertItemTemplate>
                    <telerik:RadTextBox ID="RadTextBoxPhoneID" runat="server" Width="100px"/>
                </InsertItemTemplate>
                <EditItemTemplate>
                   <telerik:RadTextBox ID="RadTextBoxPhoneID" runat="server" Text='<%# Bind("phoneID") %>' Width="100px" />
                </EditItemTemplate>               
            </telerik:GridTemplateColumn>
 
            <telerik:GridTemplateColumn HeaderText="Nationality" SortExpression="nationality" UniqueName="nationality" Visible="False">
                <HeaderStyle Width="175px" />
                <ItemTemplate>
                    <asp:Label runat="server" ID="nationality" Text='<%# Eval("nationality") %>'></asp:Label>
                </ItemTemplate>
                <InsertItemTemplate>
                    <telerik:RadTextBox ID="RadTextBoxNationality" runat="server" Width="450px"/>
                </InsertItemTemplate>
                <EditItemTemplate>
                   <telerik:RadTextBox ID="RadTextBoxNationality" runat="server" Text='<%# Bind("nationality") %>' Width="450px" />
                </EditItemTemplate>               
            </telerik:GridTemplateColumn>
 
            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmText="Delete this product?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ConfirmDialogWidth="220px">
                <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
            </telerik:GridButtonColumn>
        </Columns>
        <EditFormSettings CaptionDataField="Description" CaptionFormatString="Edit description of {0}" InsertCaption="New Nomenclature">
            <EditColumn ButtonType="ImageButton" InsertText="Insert Order" UpdateText="Update" UniqueName="EditCommandColumn1" CancelText="Cancel edit">
            </EditColumn>
            <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>


Hope you understand me and my problem ...

Regards,
Princy
Top achievements
Rank 2
 answered on 22 Nov 2011
3 answers
133 views
Hi all,

I would like to know how I can style the edit & the delete buttons and still use the auto generate columns option.
I can get both columns add the beginning of the grid, with text Edit & Delete,  I would like to know how I can get both columns add the end of the grid, and use an image for the edit and delete buttons.

thanks.
Shinu
Top achievements
Rank 2
 answered on 22 Nov 2011
1 answer
146 views
Hello,

I'm using a RadGrid that is bound to a list of objects which gets set on page load (not postback). 
        RadGrid1.DataSource = myList;  
        RadGrid1.DataBind();

I've added columns that cause post backs such as imagebuttons and regular telerik button controls. When I click one of these buttons, the application throws an error in "RadGrid1_ItemCreated". The error occurs when attempting to access the grid data item and cast as my business object (Schedule). It seems the grid is no longer bound to my datasource since I'm no longer able to access this.

protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
if (e.Item is GridDataItem) {
  Schedule tempSchedule = (Schedule)e.Item.DataItem;

I thought it may need to be reloaded on page load, but when I put a break point on page load it doesn't hit. When clicking a button in the grid it seems to go straight to "RadGrid1_ItemCreated". Could you please give me some suggestions for correcting this issue? Do I need to cache my business object list "myList"? 
Jayesh Goyani
Top achievements
Rank 2
 answered on 22 Nov 2011
4 answers
119 views
I have a radgrid in my application in which i am openig a window in button click(server side)to show a pop up. But whenever the page refreshes the window is loading again.How can i resolve this?
Shinu
Top achievements
Rank 2
 answered on 22 Nov 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
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
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?