Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
174 views
Hi Everyone,

I have been trying to accomplish something that should be rather simple.
I have a RadWindow with a treeview that allows users to select items by checking nodes .
When the RadWindow closes it is not destroyed so that next time they open the window the treeview does not need to reload but I want to uncheck all their previous selections.

I can manage to do this using the following script in the ASPX code:

var nodes = tree.get_checkedNodes();

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

 var node = nodes[i];

 node.set_checked(false);

 }

This script is called when either the OK or Cancel button is clicked, but if the user clicks the "X" this script is not run.

Also the rest of our application uses separate script files instead of embedding the javascript in the ASPX page.

I have tried adding a beforeonclose event handler but that appears to be too late in the cycle.

Please could someone suggest a way to accomplish this.


many thanks
Antony

Fiko
Telerik team
 answered on 21 May 2009
1 answer
128 views

(The whole escaping issue in FF3.1 is really, really annoying.)
One more time. I'm running into an issue whereby the styles from the skin of the RadGrid are interferring with a RadComboBox located in a custom CommandItemTemplate. I have the stylesheetTheme set to my Theme name in the web.config file (i.e., I have it set to Default and I have a Theme called Default). I have a screenshot but am not sure how to post it.

Here are the relevant skins located in a .skin file in my Theme directory:

<telerik:RadGrid runat="server" SkinID="NonPagingGrid" 
    Skin="Web20" 
    AllowPaging="false" 
    AllowSorting="true" 
    AutoGenerateColumns="false" 
    GridLines="None" 
    ShowStatusBar="true" 
    SortingSettings-EnableSkinSortStyles="false" 
    Width="100%">      
    <StatusBarSettings LoadingText="Loading..." ReadyText="Ready" /> 
    <MasterTableView  
        AllowMultiColumnSorting="true" 
        AllowNaturalSort="true" 
        AllowSorting="true" 
        NoMasterRecordsText="" 
        ShowHeader="true" 
        ShowHeadersWhenNoRecords="true" 
        TableLayout="Fixed" 
        Width="100%">  
        <NoRecordsTemplate> 
            <div style="text-align:left;padding-left:15px;padding-top:5px;">No matching records were found.</div> 
        </NoRecordsTemplate> 
    </MasterTableView> 
    <ClientSettings   
        AllowColumnsReorder="true" 
        AllowGroupExpandCollapse="true" 
        AllowKeyboardNavigation="true" 
        ClientEvents-OnRowCreated="RowCreated">  
        <ClientEvents   
           OnGridCreated="AutoFitGridHeight" />           
        <Resizing   
            AllowColumnResize="true"   
            EnableRealTimeResize="true" /> 
        <Scrolling   
            AllowScroll="true" 
            UseStaticHeaders="true" 
            SaveScrollPosition="true" /> 
    </ClientSettings> 
 
<telerik:RadComboBox runat="server" SkinID="BorderedComboBox"      
    Skin="Vista"      
    Font-Size="11px"   
    MarkFirstMatch="true" 
    NoWrap="true" /> 

Obviously, I have the SkinID attribute on the RadGrid set to NonPagingGrid. Here is the CommandItemTemplate:

<CommandItemTemplate> 
    <div id="CP_Cmd">  
        <div class="CP_Cmd_C CP_Cmd_IB">  
            <asp:ImageButton ID="AddProjectButtonImage" runat="server" meta:resourcekey="AddProjectButtonImage"   
                ImageUrl="~/App_Themes/Default/buttons/add_button.png" 
                CommandName="InitInsert" /> 
        </div> 
        <div class="CP_Cmd_C CP_Cmd_LB">  
            <asp:LinkButton ID="AddProjectButton" runat="server" meta:resourcekey="AddProjectButton" 
                CommandName="InitInsert" /> 
        </div> 
        <div class="CP_Cmd_C CP_Cmd_IB">  
            <asp:ImageButton ID="FillProjectButtonImage" runat="server" meta:resourcekey="FillProjectButtonImage"   
                ImageUrl="~/App_Themes/Default/buttons/add_button.png" 
                OnClick="FillProjectButton_Click" /> 
        </div> 
        <div class="CP_Cmd_C CP_Cmd_LB">  
            <asp:LinkButton ID="FillProjectButton" runat="server" meta:resourcekey="FillProjectButton"   
                OnClick="FillProjectButton_Click" /> 
        </div> 
        <div class="CP_Cmd_C CP_Cmd_IB">  
            <asp:ImageButton ID="FillSubprojectsImageButton" runat="server" meta:resourcekey="FillSubProjectsButton"   
                ImageUrl="~/App_Themes/Default/buttons/add_button.png" 
                OnClick="FillSubProjectButton_Click" /> 
        </div> 
        <div class="CP_Cmd_C CP_Cmd_LB">  
            <asp:LinkButton ID="FillSubprojectsLinkButton" runat="server" meta:resourcekey="FillSubProjectsButton"   
                OnClick="FillSubProjectButton_Click" /> 
        </div> 
        <div class="reset CP_Cmd_C CP_Cmd_TempDDL" style="margin:0;padding:0;">  
            <telerik:RadComboBox ID="TemplateSelectionEdit" runat="server"   
                SkinID="BorderedComboBox"   
                meta:resourcekey="TemplateSelectionEdit" /> 
        </div> 
        <div class="CP_Cmd_C CP_Cmd_IB">  
        </div> 
        <div class="CP_Cmd_C CP_Cmd_IB CP_Cmd_R">  
            <asp:ImageButton ID="RefreshGridImageButton" runat="server" meta:resourcekey="RefreshGridImageButton"   
                ImageUrl="~/App_Themes/Default/buttons/grid_refresh.gif" 
                CommandName="RebindGrid" /> 
        </div> 
        <div class="CP_Cmd_C CP_Cmd_LB CP_Cmd_R CP_Cmd_RLB">  
            <asp:LinkButton ID="RefreshGridButton" runat="server" meta:resourcekey="RefreshGridButton"   
                CommandName="RebindGrid" /> 
        </div> 
    </div> 
</CommandItemTemplate> 

And finally here is the relavant CSS:

div#CP_Cmd  
{  
    height: 2.5em;  
    padding-top: 0.5em;  
    padding-left: 1em;  
}  
div#CP_Cmd div.CP_Cmd_C  
{  
    float: left;  
    display:block;  
}  
/*Image button*/ 
div#CP_Cmd div.CP_Cmd_IB  
{  
    width: 2em;  
}  
/*Link button*/ 
div#CP_Cmd div.CP_Cmd_LB  
{  
    width: 8em;  
}  
/*Refresh buttons*/ 
div#CP_Cmd div.CP_Cmd_R  
{  
    float:rightright;  
    padding-right: 1em;  
}  
/*Refresh link buttons*/ 
div#CP_Cmd div.CP_Cmd_RLB  
{  
    width: 4em;  
    padding-right: 0.5em;  
}  
/* Template dropdown*/ 
div#CP_Cmd div.CP_Cmd_TempDDL  
{  
    width: 15em;  
}  
/* Template button*/ 
div#CP_Cmd div.CP_Cmd_TempB  
{  
}             




Pavlina
Telerik team
 answered on 21 May 2009
0 answers
153 views
Hi, first off it's a great idea to provide this visual style builder. but the import and edit skin tool is not working. Every time I upload a zip file, it gave me an error. The zip file is composed exactly structure as your example. Menu.Custom.css and Image folder named Menu.
Anthony
Top achievements
Rank 1
 asked on 21 May 2009
1 answer
168 views

<

 

telerik:RadDockZone ID="RadDockZone1" runat="server" BorderStyle="None">

 

 

 

 

 

<telerik:RadDock ID="RadZone1" runat="server" Width="100%" Title="Group" BorderStyle="None"

 

 

 

 

 

BorderWidth="0px" Height="652px" Top="155px" Left="245px" DefaultCommands="None"

 

 

 

 

 

EnableDrag="False">

 

<telerik

 

:RadComboBox ID="ddlgroupCategory" AllowCustomText="True" ShowMoreResultsBox="true"

 

 

EnableVirtualScrolling="true" runat="server" skin="Outlook"

 

 

EmptyMessage="Select the category..."

 

 

onitemsrequested="ddlgroupCategory_ItemsRequested"></telerik:RadComboBox>

<telerik:RadDock

 

</telerik:RadDockZone>

The combo box dropdown text is displayes only on move over.Otherwise a dropdown with invisible text is seen.
But when the skin is Black dropdown text is displayed.

Why dropdown text is not displayed when a skin other than Black is Chosen?
Paul
Telerik team
 answered on 21 May 2009
2 answers
346 views
Hi,

my question is can i change the color of a rad tab text in client side.... if it is possible how..??????....  i have 5 tabs i need to change the color of each tab according to my condition.


Thanks in advance,



Regards,
Suresh S
Paul
Telerik team
 answered on 21 May 2009
1 answer
154 views
I have some problems about exporting to excel.

I wrote a single mail program. Calls the static page and gets the data and sends it. So when i tried to use telerik grid My application couldnt reach the excel sheet that the page gives. I need to save that excel programmatically. Like ExporttoExcel("C:\inetpub\.....").

How can i save the excel sheet to upper directory in my project?




Daniel
Telerik team
 answered on 21 May 2009
1 answer
74 views

           I have 3 rows in a grid and I delete the middle one using clientside delete for which row index is 1 . it works fine .

          Now the 3 rd row who's row index is 2 is moved up .

         if I delete 2nd row  and in ondelete event I am unable to get the row object  using the below script .

        var rowObject = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];

          I found the eventArgs.get_itemIndexHierarchical()  give 2  although I have just 2 rows in the grid . I think it should give 1 for the above script to work because I have now only two rows .

          Due to this the row object is null .

          Please help me .
Sebastian
Telerik team
 answered on 21 May 2009
1 answer
161 views

 Please add  the following code to ondelete event to display args.get_itemIndexHierarchical() value in the example supplied by Telerick online demo   " radcontrols_aspnetajax/Grid/Examples/Client/ClientDelete/DefaultCS.aspx


 <script type="text/javascript">

            function Rowdeleting(sender, args) {
                var row_no = args.get_itemIndexHierarchical();
                alert(row_no);
                var row = sender.get_masterTableView().get_dataItems()[row_no];
                alert(row);
            }

          <ClientSettings  AllowKeyboardNavigation="True" >
                            <Selecting AllowRowSelect="True"  />
<ClientEvents  OnRowDeleting="Rowdeleting"  ></ClientEvents>
                         </ClientSettings>

           Now run the code and delete any row in the middle of the grid it will show the row index and will work fine .

           Now delete the last row in the grid it will  show wrong row index and so the row object will be empty .

           How do i get the correct row index after client side delete ?


 





Sebastian
Telerik team
 answered on 21 May 2009
2 answers
146 views
I have dynamically generated user control that contains RadGrid.
Protected Overrides Sub CreateChildControls() 
      MyBase.CreateChildControls() 
      GenerateTable() 
    End Sub 
 
    Private Sub GenerateTable() 
      If BtnExpandOpen Then 
        Dim ctrl = GetProperControl(RowIndex) 
        If ctrl IsNot Nothing Then 
          ctrl.WriteToDisplay(Me) 
          PanelCategory.Controls.Add(ctrl) 
        End If 
      End If 
    End Sub 
 
    Private Sub btnExpand_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnExpand.Click 
      BtnExpandOpen = Not BtnExpandOpen 
      SetExpandButtonState() 
 
      GenerateTable() 
    End Sub 

This control I need to show up due to user request (some button click). When user clicks on button control is rendered properly but if I try to change page then grid is not changing its state.
If i try to change the page size then it throws exception like that:
[NullReferenceException: Object reference not set to an instance of an object.] 
   Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +8609 
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175 
 
What have I do if I need to create RagGrid not in PageInit or PageLoad events but rendered grid must have some postbacks (i.e. paging)?
Thank you
Iana Tsolova
Telerik team
 answered on 21 May 2009
2 answers
119 views
We're really anxious to get working with Visual Style Builder to more seamlessly integrate the Telerik controls into some of the sites we design. Is there any news on when the public preview will be? The last mention I could find was from April 9, when it was said that it would be ready "in a few weeks." It's been a few weeks - anything?

Thanks guys!
Ivo
Telerik team
 answered on 21 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?