Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
44 views

Hi all,

 

Is there any way i can make all the nodes of the treeview checked  by default other than looping through the nodes and setting each node property

Checked=true;

I dont want to unnecassary loop through the node collection to set each node property.

There should be easy way of doing this by setting simple property for the entire treeview.

Oh also I dont have these properties

TriStateCheckBoxes="true" CheckChildNodes="true" as it is not supported in my version of rad treeview
Goutham
Top achievements
Rank 1
 asked on 07 Mar 2011
2 answers
86 views
Hello,

I am using the radgrid with a web user control for the modal popup. I switched the save buttons from regular asp.net buttons to the radbuttons and now my break points won't get hit and I believe the method isn't even being hit when the save button is pressed. My markup is below. The methods do have the handles statement. Is there something I am missing?

<telerik:RadButton ID="updateButton" runat="server" Text="Save" Width="75px" CommandName="Update"
    Visible='<%# Not (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) %>'
    Skin="Outlook" CausesValidation="false">
</telerik:RadButton>
<telerik:RadButton ID="insertButton" runat="server" Text="Save" Width="75px" CommandName="PerformInsert"
    Visible='<%# (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) %>' Skin="Outlook"
    CausesValidation="false">
</telerik:RadButton>

Thank you for your help.

P.S. I should also add that other break points work. The ItemCommand method breaks properly and all the others do too.

Ben
Benjamin
Top achievements
Rank 1
 answered on 07 Mar 2011
3 answers
64 views
Hi,

I have a radGrid and I want to implement the following functionality:

1. When a single left click is performed on a row a postback occurs so I can enable a toolbar.

2. When the toolbar button is clicked a radWindow is opened with some parameters relating to the currently selected row.

In the main this all works fine however there is an issue - after the first postback and the window is opened and then closed any subsequent postbacks reopens the previously closed window.

I've set DestroyOnClose to true for the window but this doesn't seem to make any difference.

Thanks in advance for any assistance,

Kirk
Phil
Top achievements
Rank 2
 answered on 06 Mar 2011
1 answer
43 views
Hi:

I am creating a filtered grid and I am concerned about performance.  My default query against the table has a top 200 attribute.  I went into 'Sql Query Profiler' and the filter did not appear.  So, are you only applying the filter against the output dataset?  In which case the top 200 will not work.  How can I have the actual db query limited?

Phil
Phil
Top achievements
Rank 2
 answered on 06 Mar 2011
1 answer
987 views

hi
I have a this error when use script for get clientid of control
CS0103: The name 'RadTextBox1' does not exist in the current context

Line 271:        function SetCalendarStartTime() {
Line 272:            Calendar.setup({
Line 273:                inputField: "<%# RadTextBox1.ClientID %>",
Line 274:              
Line 275:                button: "date_btn_1",

this mycode is here

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Site.Master" AutoEventWireup="true" CodeBehind="Capsule.aspx.cs" Inherits="FireQuench.PL.Capsule" %>
<%@ Register src="../UserControl/uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="dddd" runat="server">
    <style type="text/css">
        .style1
        {
            width: 80%;
        }
        .tah
        {
            font-family: Tahoma;
            font-size: 19pt;
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH" runat="server">
    <div  id="divbody" style="width:80%; vertical-align:top; text-align:center;">
    <table align="center" cellpadding="0" cellspacing="0" class="style1" dir="rtl">
            <tr>
                <td>
                    <uc1:uscMsgBox ID="msgbox" runat="server" />
                
                
                     
  
                    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                        <AjaxSettings>
                            <telerik:AjaxSetting AjaxControlID="grdParish">
                                <UpdatedControls>
                                    <telerik:AjaxUpdatedControl ControlID="grdParish" />
                                </UpdatedControls>
                            </telerik:AjaxSetting>
                        </AjaxSettings>
                    </telerik:RadAjaxManager>
                
               <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
                     
  
                   </td>
            </tr>
            <tr>
                <td>
      
                        
  
      
  
                </td>
            </tr>
            <tr>
                <td>
      
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:FireQuenchConnectionString %>" 
                        SelectCommand="SELECT * FROM [vPart]"></asp:SqlDataSource>
      
    <telerik:RadGrid ID="grdParish" runat="server" HorizontalAlign="Center"    Skin="Outlook" 
            AutoGenerateColumns="False" GridLines="None" OnItemCreated="RadGrid1_ItemCreated" OnItemDataBound="RadGrid1_ItemDataBound"   
            onneeddatasource="grdParish_NeedDataSource" oninsertcommand="grdParish_InsertCommand" 
                        ondeletecommand="grdParish_DeleteCommand" 
                        onupdatecommand="grdParish_UpdateCommand">
          
        <AlternatingItemStyle Font-Bold="False" Font-Italic="False" Font-Names="tahoma" 
            Font-Overline="False" Font-Size="9pt" Font-Strikeout="False" 
            Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" 
            Wrap="True" />
          
<MasterTableView DataKeyNames="iNumber" Dir="RTL" CommandItemDisplay="Top"  
            NoMasterRecordsText="نوع کپسول تا به حال ثبت نشده است" EnableColumnsViewState="true" EditFormSettings-ColumnNumber="3">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
  
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <CommandItemSettings AddNewRecordText="نوع کپسول جدید" 
        ShowRefreshButton="False" />
    <Columns>
          
             <telerik:GridTemplateColumn DataField="iNumber" EditFormColumnIndex="0" HeaderText="شهرستان" 
                 UniqueName="iParishNumber">
                 <EditItemTemplate>
                     <telerik:RadComboBox ID="iParishNumberRadComboBox" runat="server" 
                         DataTextField="strName" DataValueField="iNumber"  AutoPostBack="true"
                     </telerik:RadComboBox>
                 </EditItemTemplate>
                 <ItemTemplate>
                     <asp:Label ID="iParishNumberLabel" runat="server" Text='<%# Eval("strNameParish") %>'></asp:Label>
                 </ItemTemplate>
             </telerik:GridTemplateColumn>
      
  
               <telerik:GridTemplateColumn  HeaderText="بخش" EditFormColumnIndex="0" 
                 UniqueName="iPartNumber">
                             <EditItemTemplate>
                                 <telerik:RadComboBox ID="iNumberRadComboBox" runat="server" 
                                     DataTextField="strName" DataValueField="iNumber"   
                                    >
                                 </telerik:RadComboBox>
                             </EditItemTemplate>
                             <ItemTemplate>
                                 <asp:Label ID="iNumberLabel" runat="server" Text='<%# Eval("strNamePart") %>'></asp:Label>
                             </ItemTemplate>
             </telerik:GridTemplateColumn>
  
       <telerik:GridBoundColumn DataField="strPhysicalPlace" EditFormColumnIndex="0" HeaderText="محل استقرار" 
                 UniqueName="strPhysicalPlace">
             </telerik:GridBoundColumn>
  
  
  
      <telerik:GridTemplateColumn  HeaderText="نوع" EditFormColumnIndex="1" 
                 UniqueName="iCapsuleTypeNumber">
                             <EditItemTemplate>
                                 <telerik:RadComboBox ID="iCapsuleTypeNumberRadComboBox" runat="server" 
                                     DataTextField="strName" DataValueField="iNumber"   
                                    >
                                 </telerik:RadComboBox>
                             </EditItemTemplate>
                             <ItemTemplate>
                                 <asp:Label ID="iCapsuleTypeNumberLabel" runat="server" Text='<%# Eval("strNameCapsulType") %>'></asp:Label>
                             </ItemTemplate>
             </telerik:GridTemplateColumn>
  
  
             <telerik:GridTemplateColumn  HeaderText="وزن" EditFormColumnIndex="1"  
                 UniqueName="iCapsuleWeightNumber">
                             <EditItemTemplate>
                                 <telerik:RadComboBox ID="iCapsuleWeightNumberRadComboBox" runat="server" 
                                     DataTextField="strName" DataValueField="iNumber" >  
                                      
                                 </telerik:RadComboBox>
                             </EditItemTemplate>
                             <ItemTemplate>
                                 <asp:Label ID="iCapsuleWeightNumberLabel" runat="server" Text='<%# Eval("strNameCapsulWeight") %>'></asp:Label>
                             </ItemTemplate>
             </telerik:GridTemplateColumn>
  
             <telerik:GridTemplateColumn  HeaderText="وضعیت فعلی" EditFormColumnIndex="1"  
                 UniqueName="iStatusNumber">
                             <EditItemTemplate>
                                 <telerik:RadComboBox ID="iStatusNumberRadComboBox" runat="server" Skin="Hay"
                                     DataTextField="strName" DataValueField="iNumber" Font-Names="tahoma"  >  
                                      
                                 </telerik:RadComboBox>
                             </EditItemTemplate>
                             <ItemTemplate>
                                 <asp:Label ID="iStatusNumberLabel"  runat="server" Text='<%# Eval("strNameStatus") %>'></asp:Label>
                             </ItemTemplate>
             </telerik:GridTemplateColumn>
  
  
          
         <telerik:GridBoundColumn DataField="iPartNumber" DataType="System.Int32" 
            HeaderText="iNumber2" ReadOnly="True" SortExpression="iNumber2" 
            UniqueName="iNumber2" ForceExtractValue="Always" Visible="False">
        </telerik:GridBoundColumn>
  
          <telerik:GridBoundColumn DataField="iParishNumber" DataType="System.Int32" 
            HeaderText="iParishNumber2" ReadOnly="True" SortExpression="iParishNumber2" 
            UniqueName="iParishNumber2" ForceExtractValue="Always" Visible="False">
        </telerik:GridBoundColumn>
          
        <telerik:GridBoundColumn DataField="iNumber" DataType="System.Int32" 
            HeaderText="iNumber" ReadOnly="True" SortExpression="iNumber" 
            UniqueName="iNumber" ForceExtractValue="Always" Visible="False">
        </telerik:GridBoundColumn>
              
             <telerik:GridBoundColumn DataField="iCapsuleTypeNumber" ForceExtractValue="Always" 
                 HeaderText="iCapsuleTypeNumber2" UniqueName="iCapsuleTypeNumber2" Visible="false" ReadOnly="true">
             </telerik:GridBoundColumn>
  
  
                 <telerik:GridBoundColumn DataField="iCapsuleWeightNumber" ForceExtractValue="Always" 
                 HeaderText="iCapsuleWeightNumber2" UniqueName="iCapsuleWeightNumber2" Visible="false" ReadOnly="true">
             </telerik:GridBoundColumn>
  
               <telerik:GridBoundColumn DataField="iStatusNumber" ForceExtractValue="Always" 
                 HeaderText="iStatusNumber2" UniqueName="iStatusNumber2" Visible="false" ReadOnly="true">
             </telerik:GridBoundColumn>   
              
             <telerik:GridBoundColumn DataField="strChattelsCode" ForceExtractValue="Always"  EditFormColumnIndex="2"
                 HeaderText="کد اموال" UniqueName="strChattelsCode">
             </telerik:GridBoundColumn>
             <telerik:GridBoundColumn DataField="iTimeLife" ForceExtractValue="Always" EditFormColumnIndex="2" 
                 HeaderText="طول عمر مفید" UniqueName="iTimeLife">
             </telerik:GridBoundColumn>
             <telerik:GridTemplateColumn DataField="strProductionDate" 
                 EditFormColumnIndex="2" HeaderText="تاریخ تولید" UniqueName="strProductionDate">
                 <EditItemTemplate>
                   <table>
                                      <tr>
                                      <td>
                                       
                                      
                                          <telerik:RadTextBox ID="RadTextBox1" runat="server" ClientIDMode="Static" AutoPostBack="true" Text='<%# Bind("strProductionDate") %>' >
                                          </telerik:RadTextBox>
                                      
                                    </td>
                                      <td><img ID="date_btn_1" alt="" src="../App_Themes/Style/Images/cal.png" style="vertical-align: top;" /></td>
                                      </tr>
                                      </table>
                 </EditItemTemplate>
                 <ItemTemplate>
                     <asp:Label ID="strProductionDateLabel" runat="server" 
                         Text='<%# Eval("strProductionDate") %>' ></asp:Label>
                 </ItemTemplate>
             </telerik:GridTemplateColumn>
              
       
       
       
       
       
       
       
       
       
        <telerik:GridEditCommandColumn   ButtonType="LinkButton" CancelText="انصراف" 
            EditText="ویرایش" InsertText="نوع جدید" UpdateText="ذخیره">
            <HeaderStyle Font-Names="Tahoma" Font-Size="9pt" HorizontalAlign="Center" 
                VerticalAlign="Middle" Width="50px"  />
        </telerik:GridEditCommandColumn>
        <telerik:GridButtonColumn CommandName="Delete" Text="حذف" UniqueName="column1">
            <HeaderStyle Width="20px" />
            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" 
                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" 
                VerticalAlign="Middle" Wrap="True" />
        </telerik:GridButtonColumn>
    </Columns>
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1"    ButtonType="ImageButton"  InsertText="ذخیره" UpdateText="ذخیره"
                             CancelText="انصراف"></EditColumn>
                               
</EditFormSettings>
    <ItemStyle Font-Bold="False" Font-Italic="False" Font-Names="tahoma" 
        Font-Overline="False" Font-Size="9pt" Font-Strikeout="False" 
        Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" 
        Wrap="True" />
    <EditItemStyle BackColor="#CCCCFF" Font-Bold="False" Font-Italic="False" 
        Font-Names="tahoma" Font-Overline="False" Font-Size="9pt" 
        Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Right" 
        VerticalAlign="Middle" Wrap="True" />
    <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Names="tahoma" 
        Font-Overline="False" Font-Size="9pt" Font-Strikeout="False" 
        Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" 
        Wrap="True" />
          
</MasterTableView>
          
        </telerik:RadGrid>
          
      
  
                </td>
            </tr>
        </table>
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript" >
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
  
        Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(pageLoadedHandler)
  
        function pageLoadedHandler(sender, args)
        { SetCalendarStartTime(); }
  
  
        function EndRequestHandler(sender, args)
        { SetCalendarStartTime(); }
  
        function SetCalendarStartTime() {
            Calendar.setup({
                inputField: "<%# RadTextBox1.ClientID %>",
                 
                button: "date_btn_1",
                ifFormat: "%Y/%m/%d",
                dateType: 'jalali',
  
                weekNumbers: false
            });
        }
  
  
  
  
</script>
</telerik:RadCodeBlock>
    </div>
        
</asp:Content>


please help to me for solve this error
thank
Salman
Top achievements
Rank 1
 answered on 06 Mar 2011
2 answers
86 views
I gotta say, the webmail demo that has an Outlook like appearance is very interesting and amazing to say the least....and I would like to learn how to do something like it. Only thing is, the downloadable code is not available to download like the other demos that Telerik has available. Is there a way I can download this demo code?
Brett
Top achievements
Rank 1
 answered on 06 Mar 2011
10 answers
189 views
Hi there,

I am having some difficulty figuring if it is possible to have static resource headers with the Scheduler.
So basically I want the resource headers to remain at the top of the scheduler area when scrolling vertically.
I played around a bit with the HeaderTemplate but couldn't get what I wanted, and can't find any documentation about this.

Any suggestions?
Matthew
Top achievements
Rank 1
 answered on 06 Mar 2011
2 answers
167 views
As a test we replace one date calendar using are old code with a teleik calendar. Rendered the HTML and did file size comparison between the two. Just one telerik calendar increased our rendered HTML 26%. Our pages need to be optimized. Is there a direction someone can point me to find an optimized, light weigh code example of the raddatepicker control?
Sohail
Top achievements
Rank 1
 answered on 06 Mar 2011
8 answers
363 views
I need to export a datatable to Excel. I have a cosume control inheridet from RadPageView. basically is a TAB with other control on it. I made a Radgid dynamically like the following:
RadGrid grid = new RadGrid { AutoGenerateColumns = true }; 
grid.DataSource = dt.DefaultView;   // DT is a DataTable
grid.DataBind();
// I include also the grid to my Tab
div.Controls.AddAt(0, grid);   // Div a div container in this TAB. by running this code i can see my grid with all columns and rows
but if i add the exportSetting, and export it doesn't show the grid (What actually I want), and no Excel file neither the code that I'm using is:
grid.ExportSettings.OpenInNewWindow = true 
grid.ExportSettings.FileName = "CSV Writer
grid.MasterTableView.GridLines = GridLines.Both 
grid.MasterTableView.ShowHeader = true
grid.MasterTableView.ExportToCSV();
 
Any help would be greatly appreciated.
Daniel
Telerik team
 answered on 05 Mar 2011
2 answers
191 views
I had a custom class in css page

.RadWindow_NewAndReply
{
    width:55%;
    height:55%;
}

and in design page i am using like this

<telerik:RadWindow 
                    runat="server"
                    ID="Edit" 
                    NavigateUrl="~/Reply.aspx"
                    OnClientPageLoad="onWindowLoad"
   ReloadOnShow="true"
                    CssClass="RadWindow_NewAndReply"
                    ShowContentDuringLoad="false"
                    Modal="false"
                    Behaviors="Close,Move,Minimize,Maximize"
                    VisibleStatusbar="false">
</telerik:RadWindow>

but its not appling.. what may be the problem? 


Regards
Bhuvan
Bhuvan
Top achievements
Rank 1
 answered on 05 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?