Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
110 views
Please help

I use a treeview with no checkboxes. I want a label to be visible if no node is selected.
So if i click on a node it is highlighted then the label.visibility = false;

How can i define that no node is selected in a treeview
Princy
Top achievements
Rank 2
 answered on 07 Jul 2011
3 answers
97 views
Please see the code below for the bug with clicking on a checkbox in the RadTreeView.

<telerik:RadTreeView ID="RadTreeView1" runat="server" Width="700px" 
    CheckBoxes="true" CheckChildNodes="false" TriStateCheckBoxes="true">
    <DataBindings>
        <telerik:RadTreeNodeBinding/>
    </DataBindings>
</telerik:RadTreeView>

Sample tree data:

Node 0
--Node 1.1
----Node 2.1
----Node 2.2

The bug is that when I click to check the Node 1.1, it does not show that Node 1.1 is checked. How to I fix this issue? 

I'm currently using Telerik RadControls for ASP.NET Ajax version 2010.2.929.35.
Nikolay Tsenkov
Telerik team
 answered on 07 Jul 2011
1 answer
40 views
Hello,

I have posted the Query on incorrect category " General Feed back", so here i paste the whole thread by correcting the category "RAD GRID" , Please help me out on this...

  • Telerik Admin

    Posted on 47 minutes ago

    Hello Samir,

    You sent this question as general feedback. If you need an answer or help with a specific requirement, please send a support ticket for RadGrid. This is the best way to get a precise and to-the-point advise expediently.

    All the best,
    Peter
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  • Samir Patel

    Posted on on Jun 28, 2011

    Hello,

    I am Using the Licence version, This licence is purchased by my client

    and also for the Drag and Drop , i am Using below Example:

    http://demos.telerik.com/aspnet-ajax/grid/examples/programming/draganddrop/defaultcs.aspx 


    Only I need to add two things in this , first is remove the item by drag from right to Left, and second the Move Up / Down arrow to rearrange...

    Regards
    Samir
  • Telerik Admin

    Posted on on Jun 28, 2011

    Hi Samir,

    Thank you for writing.

    Before getting to your question, we would like to check something related to your license. Your account shows no purchases and it seems that you have not downloaded the WinForms suite from our site. Since it is our policy to support users in good account standing, I will ask you to give us more details on the license you are using:

    - In case you have downloaded it from another site, please let us know so that we can update your account and provide you with proper support services;
    - In case you have obtained a copy of our controls through the company you work for, please ask the purchase holder to add you as a License Developer to the purchase. This will give you full access to the products your company has purchased, to our downloads section, and to our support ticketing system. Additionally, all your questions will be reviewed according to the license you have. More information on License Developers you can find here: www.telerik.com/faq.

    I have moved your Forum post to our support ticketing system to avoid sharing any private information in the public Forums. You can find the ticket in Your Account.

    As to your first question, I would kindly ask you to provide some more details such as, which Telerik controls are you using to drag from / to and which demo are you referring to. It would also be very helpful if you can prepare a sample project where you reproduce the unwanted behavior and an explanation of what the proper behavior is.

    On your second question. You can add an extra column in your DB table, storing the items. In this extra column you can save the order in which you want to display the items. When you visualize the items later you need to just order them by this extra column.

    I have converted your forum post to a support ticket so you can add an attachment.

    I am looking forward to your reply.

    Regards,
    Ivan Petrov
    the Telerik team
    Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
  • Samir Patel

    Posted on on Jun 23, 2011

    Hello,

    I have added drag and drop control, but i cannot do following two things, please help me on that

    1) When i drag any item from right to left, then I cannot drag the same item from right to left. I have checked in the Demo of this , but its also having same problem, in the demo they provide Recyclebin, to delete, but my client doesn't want this...He just Drag from Left to right same way from Right to Left

    And second one

    2) Also When i drag from Left to right, i need to Rearrange the Items on the Right and save this ordering arrangment in to DB, so that i will show in this saved order on my other website...


    Regards
    samir


Radoslav
Telerik team
 answered on 07 Jul 2011
1 answer
207 views
I have two RadTimePciker  called start time, end time and would like perform the following validation.
start time and end time should have an 45 minutes in length
for eg: if the start time is 4:15 P.M then end time should be minimum 5:00 P.M ..if the user enter less than it should throw an validation message.

below is my code :
am able to get the value of Date1 and Date2 , the difference is not working..would appreciate for any help.


<telerik:RadScriptBlock runat="server" ID="RadCodeBlock1">
        <script type="text/javascript">
             //<![CDATA[
           var RadTimePicker1;
            var RadTimePicker2;

            function validate(sender, args) {
                var Date1 = getClockTime(RadTimePicker1.get_selectedDate());
                alert(Date1);                
                var Date2 = getClockTime(RadTimePicker2.get_selectedDate());
                alert(Date2);                
                args.IsValid = true;
                alert(Date2 - Date1);
                if ((Date2 - Date1) <45 )) {
                    alert("The second time value should be greater than the first!");
                    args.IsValid = false;
                }
            }

            function onLoadRadTimePicker1(sender, args) {
                RadTimePicker1 = sender;
            }

            function onLoadRadTimePicker2(sender, args) {
                RadTimePicker2 = sender;
            }

            function getClockTime(T) {
                var now = new Date(T);
                var hour = now.getHours();
                var minute = now.getMinutes();
                var second = now.getSeconds();
                var ap = "AM";
                if (hour > 11) { ap = "PM"; }
                if (hour > 12) { hour = hour - 12; }
                if (hour == 0) { hour = 12; }
                if (hour < 10) { hour = "0" + hour; }
                if (minute < 10) { minute = "0" + minute; }
                if (second < 10) { second = "0" + second; }
                var timeString = hour +
                    ':' +
                    minute +
                    " " +
                    ap;
                return timeString;
            }

            //]]>
         </script>
        </telerik:RadScriptBlock>
  <telerik:GridTemplateColumn HeaderText="Begin Time" UniqueName="BeginTime">   
                            <EditItemTemplate>  
                                <telerik:RadTimePicker ID="RadTimePicker1" runat="server" Culture="English (United States)"  
                                    DbSelectedDate='<%# Bind("BeginTime", "{0:HH:mm}") %>' SharedCalendarID="" >  
                                     <DateInput runat="server" ><ClientEvents OnLoad="onLoadRadTimePicker1" /></DateInput>
                                     <TimeView runat="server" StartTime="06:00" EndTime="18:15" Interval="00:15:00"></TimeView>
                                </telerik:RadTimePicker>  
                               <asp:RequiredFieldValidator ID="ReqValidtor" runat="server" ErrorMessage="Required Field" InitialValue="" ControlToValidate="RadTimePicker1"></asp:RequiredFieldValidator>

                            </EditItemTemplate>  
                            <ItemTemplate>  
                                <asp:Label ID="dtLabel" runat="server" Text='<%# Eval("BeginTime", "{0:HH:mm}") %>' />  
                            </ItemTemplate>  
              <HeaderStyle Font-Bold="true" HorizontalAlign="Center" Width="40px" />
             </telerik:GridTemplateColumn>  
    <telerik:GridTemplateColumn HeaderText="End Time" UniqueName="EndTime">   
                            <EditItemTemplate>  
                                <telerik:RadTimePicker ID="RadTimePicker2" runat="server" Culture="English (United States)"  
                                    DbSelectedDate='<%# Bind("EndTime", "{0:HH:mm}") %>' SharedCalendarID="">   
                                    <DateInput ID="DateInput1" runat="server"><ClientEvents OnLoad="onLoadRadTimePicker2" /></DateInput>
                                    <TimeView ID="TimeView1" runat="server" StartTime="06:00" EndTime="18:15" Interval="00:15:00"></TimeView>
                                </telerik:RadTimePicker>
                                <asp:RequiredFieldValidator ID="ReqValidator" runat="server" ErrorMessage="Required Field" InitialValue="" ControlToValidate="RadTimePicker2"></asp:RequiredFieldValidator>
                                <asp:CustomValidator ID= "CusValidotor" runat="server" EnableClientScript="true" ControlToValidate="RadTimePicker2" ClientValidationFunction="validate"></asp:CustomValidator>
                           </EditItemTemplate>  
                            <ItemTemplate>  
                                <asp:Label ID="dtLabel1" runat="server" Text='<%# Eval("EndTime", "{0:HH:mm}") %>' />  
                            </ItemTemplate>
             <HeaderStyle Font-Bold="true" HorizontalAlign="Center" Width="40px" />
             </telerik:GridTemplateColumn>  


Thanks
Mohana Raman
Princy
Top achievements
Rank 2
 answered on 07 Jul 2011
7 answers
177 views
Hi,

I have grid where i have 2 RadCombobox in 2 columns of Radgrid. See below
<telerik:GridTemplateColumn UniqueName="XYZDropDownType" HeaderText="XYZ DropDown Type"
                SortExpression="XYZDropDownType">
                <ItemTemplate>
                    <%#DataBinder.Eval(Container.DataItem,"XYZDropdownType")%>
                </ItemTemplate>
                <EditItemTemplate>
                    <telerik:RadComboBox ID="RadComboBox2" runat="server" DataTextField="Description"
                        Width="150px" MaxHeight="200" SkinID="EzComboBox" DataSourceID="ObjectDataSource2"
                        AppendDataBoundItems="true" DataValueField="XYZDropdownTypeId" SelectedValue='<%#Bind("XYZDropdownTypeId") %>'
                        EnableVirtualScrolling="True">
                        <Items>
                            <telerik:RadComboBoxItem Text="Choose One" Value="" />
                        </Items>
                    </telerik:RadComboBox>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="ABCType" HeaderText="ABC Type"
                SortExpression="ABCTypeName">
                <ItemTemplate>
                    <%#DataBinder.Eval(Container.DataItem,"ABCTypeName")%>
                </ItemTemplate>
                <EditItemTemplate>
                    <telerik:RadComboBox ID="RadComboBox3" runat="server" DataTextField="Type" Width="160px"
                        MaxHeight="200" SkinID="EzComboBox" DataSourceID="ObjectDataSource3" AppendDataBoundItems="true"
                        DataValueField="ABCTypeId" SelectedValue='<%#Bind("ABCTypeId") %>'
                        EnableVirtualScrolling="True">
                        <Items>
                            <telerik:RadComboBoxItem Text="Choose One" Value="" />
                        </Items>
                    </telerik:RadComboBox>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>


Now what i want. On selection of any RadCombobox of these 2 column at first, the second RadCombobox will be disabled. means We can not select both combobox Values at the same time. either First combobox or second one not both at the same time in Edit Command

Can anyone tell me How to do that ?

Thanks,
--Jai
Jai
Top achievements
Rank 1
 answered on 07 Jul 2011
1 answer
147 views
Hi

I'm using Telerik Controls in our current project. Radio button is not displayed correctly when it is in disabled mode. I open the RadioButtonSprit picture and found out that there is no image for radio button disabled mode same as combox. Do you know any way to solve this problem?

Regards
Amir .H
Bozhidar
Telerik team
 answered on 07 Jul 2011
2 answers
71 views
I have two grids on my page.

The user is to select a row from grid1 which will display details of that row in grid 2

My datasource for grid 2 is set to take the selected index from grid 1. Here is my code for the grids

Grid 1
<telerik:RadGrid ID="FileList" Width="97%"
             AllowPaging="True" runat="server" AllowSorting="True"
             OnNeedDataSource="FileList_NeedDataSource" GridLines="None"
                AutoGenerateColumns="False" Skin="Windows7" Height="220px">
<HeaderContextMenu EnableImageSprites="True" ></HeaderContextMenu>
 
              <MasterTableView Width="100%" DataKeyNames="FileID" >
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
              <Columns>
        <telerik:GridBoundColumn DataField="FileID" DataType="System.Int32"
            HeaderText="FileID" SortExpression="FileID" UniqueName="FileID"
            ReadOnly="True" Visible="false">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="FileNumber" HeaderText="File Number"
            SortExpression="FileNumber" UniqueName="FileNumber"
            HeaderStyle-Width="85px" ItemStyle-HorizontalAlign="Center">
<HeaderStyle Width="85px"></HeaderStyle>
 
<ItemStyle HorizontalAlign="Center"></ItemStyle>
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DateEntered" DataType="System.DateTime" DataFormatString="{0:dd/MM/yyyy}"
            HeaderText="Date Entered" SortExpression="DateEntered"
            UniqueName="DateEntered" HeaderStyle-Width="85px">
<HeaderStyle Width="85px"></HeaderStyle>
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DateBoxed" DataType="System.DateTime" DataFormatString="{0:dd/MM/yyyy}"
            HeaderText="Date Boxed" SortExpression="DateBoxed" UniqueName="DateBoxed"
            HeaderStyle-Width="85px">
<HeaderStyle Width="85px"></HeaderStyle>
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DestroyDate" DataType="System.DateTime" HeaderStyle-Width="100px"
            HeaderText="Destroy Date" ReadOnly="True" SortExpression="DestroyDate" DataFormatString="{0:dd/MM/yyyy}"
            UniqueName="DestroyDate">
<HeaderStyle Width="100px"></HeaderStyle>
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="FileStatus" HeaderText="File Status" HeaderStyle-Width="115px"
            SortExpression="FileStatus" UniqueName="FileStatus">
<HeaderStyle Width="115px"></HeaderStyle>
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Business" DataType="System.Int32"
            HeaderText="Business" SortExpression="Business" UniqueName="Business" Visible="false">
        </telerik:GridBoundColumn>
    </Columns></MasterTableView>
              <PagerStyle Mode="NextPrevAndNumeric" />
                <ClientSettings>
                    <Selecting AllowRowSelect="True"    />
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                     
                </ClientSettings>
                <FilterMenu EnableTheming="True" >
                    <CollapseAnimation Duration="200" Type="OutQuint" />
                </FilterMenu>
            </telerik:RadGrid>

Code behind for Grid 1
Protected Sub FileList_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) Handles FileList.NeedDataSource
        FileList.DataSource = GetFileList
    End Sub

GetFileList Datasource
<asp:SqlDataSource ID="GetFileList" runat="server"
        ConnectionString="<%$ ConnectionStrings:FileawaySQLConnectionString %>"
        SelectCommand="SELECT * FROM [qryFileList] WHERE ([Business] = @Business)">
        <SelectParameters>
            <asp:ControlParameter ControlID="lblUserID" Name="Business"
                PropertyName="Text" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>

Grid 2 (to display details from selected row in Grid 1)

<telerik:RadGrid ID="FileHistory" Width="97%"
             AllowPaging="True" runat="server" AllowSorting="True"
             OnNeedDataSource="FileHistory_NeedDataSource" GridLines="None"
                AutoGenerateColumns="False" Skin="Windows7" Height="220px">
<HeaderContextMenu EnableImageSprites="True" ></HeaderContextMenu>
 
              <MasterTableView Width="100%" >
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
              <Columns>
        <telerik:GridBoundColumn DataField="FileID" DataType="System.Int32"
            HeaderText="FileID" ReadOnly="True" SortExpression="FileID" UniqueName="FileID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="FileNumber" HeaderText="FileNumber"
            SortExpression="FileNumber" UniqueName="FileNumber">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="FileHistoryAction"
            HeaderText="FileHistoryAction" SortExpression="FileHistoryAction"
            UniqueName="FileHistoryAction">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DateofAction" DataType="System.DateTime"
            HeaderText="DateofAction" SortExpression="DateofAction"
            UniqueName="DateofAction">
        </telerik:GridBoundColumn>
    </Columns></MasterTableView>
              <PagerStyle Mode="NextPrevAndNumeric" />
                <ClientSettings>
                    <Selecting AllowRowSelect="True"   />
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                     
                </ClientSettings>
                <FilterMenu EnableTheming="True" >
                    <CollapseAnimation Duration="200" Type="OutQuint" />
                </FilterMenu>
            </telerik:RadGrid>

Codebehind for Grid 2
Protected Sub FileHistory_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) Handles FileHistory.NeedDataSource
        FileList.DataSource = GetFileHistory
    End Sub

GetFileHistory Datasource
<asp:SqlDataSource ID="GetFileHistory" runat="server"
        ConnectionString="<%$ ConnectionStrings:FileawaySQLConnectionString %>"
        SelectCommand="SELECT * FROM [qryFileHistory] WHERE ([FileID] = @FileID)">
        <SelectParameters>
            <asp:ControlParameter ControlID="FileList" Name="FileID"
                PropertyName="SelectedValue" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>

Not sure why these are not linking. Do I need to specify additional postback code?
Andrew
Top achievements
Rank 1
 answered on 07 Jul 2011
1 answer
865 views

<this is fixed. See my 2nd post>

I am having my first go at doing a grid with the Web User Control used for editing each row.

I got the grid basically working to the point where if I click Edit on any row, that grid opens and shows the edit form. Then if I click Cancel the edit form disappears.

This part was working fine however each time I clicked Edit or Cancel the grid would  visibly blank for a second as it was reloaded.  The solution of course is it put it in an UpdatePanel. It is there my problem started.

Here is my grid with the UpdatePanel around it.

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
           <ContentTemplate>
           <telerik:RadGrid ID="rgContacts" runat="server" GridLines="None" AllowPaging="True" CssClass="RadGrid"
               AllowSorting="False" AutoGenerateColumns="False" ShowStatusBar="true" OnPreRender="rgContacts_PreRender"
               OnNeedDataSource="rgContacts_NeedDataSource" OnUpdateCommand="rgContacts_UpdateCommand"
               OnInsertCommand="rgContacts_InsertCommand" OnDeleteCommand="rgContacts_DeleteCommand">
               <MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="con_Contact_ID">
                   <Columns>
                       <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" />
                       
                       <telerik:GridBoundColumn UniqueName="con_Firstname" HeaderText="First Name" DataField="con_Firstname" />
                       <telerik:GridBoundColumn UniqueName="con_Surname" HeaderText="Surname" DataField="con_Surname" />
                       <telerik:GridBoundColumn UniqueName="con_Position" HeaderText="Position" DataField="con_Position" />
                       <telerik:GridBoundColumn UniqueName="con_Email" HeaderText="Email" DataField="con_Email" />
                       <telerik:GridBoundColumn UniqueName="con_Phone" HeaderText="Landline" DataField="con_Phone" />
                       <telerik:GridBoundColumn UniqueName="con_Mobile" HeaderText="Mobile" DataField="con_Mobile" />
                       <telerik:GridBoundColumn UniqueName="con_Fax" HeaderText="Fax" DataField="con_Fax" />
                       <telerik:GridBoundColumn UniqueName="con_Is_Primary" HeaderText="Is Primary Contact" DataField="con_Is_Primary" />
                       <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Delete" CommandName="Delete" />
                   </Columns>
                   <EditFormSettings UserControlName="Controls/ContactDetails.ascx" EditFormType="WebUserControl">
                       <EditColumn UniqueName="EditCommandColumn1">
                       </EditColumn>
                   </EditFormSettings>
               </MasterTableView>
               <ClientSettings>
                   <ClientEvents OnRowDblClick="RowDblClick" />
               </ClientSettings>
           </telerik:RadGrid>
          </ContentTemplate>
       </asp:UpdatePanel>

Pretty basic stuff.

However, if I now click the Edit link on any row the grid acts just as it did before (where it blank for a split second as it refreshes), except that now I have some strange text above and below it.

It looks like the attached image

I'm not sure if this is a RadGrid problem or a problem with my UpdatePanel (or ajax toolkit dll).. None the less, anyone have a clue what it going on here?










Brad
Top achievements
Rank 1
 answered on 07 Jul 2011
3 answers
56 views
Hello Every One .

I want one radpane and one radsplitter ,
My scenario is i click one button  open one panel like collapse ,
That is bind some record .

Thanks,
Mohamed.
mohamed
Top achievements
Rank 1
 answered on 07 Jul 2011
1 answer
74 views
Hi guys,
I have a application form where I have to add two dropdown boxes(from and to).When user click on from box, he/she choose a value.Value should look like this:
08:00am
08:01am
08:02am..
11:59am..
12:00pm
12:01pm
And box 'to' should looks exactly like 'from' box'
If user choose for example 08:00am to 12:00pm I should grab this value and pass it to store procedure.
How can I do that?

Thanks so much for your support. 
Princy
Top achievements
Rank 2
 answered on 07 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?