Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
238 views
how to cancel event in RadTreeList_OnItemClick method.

I am using below code

function RadTreeList_OnItemClick(sender, eventArgs) {

                var currentItem = eventArgs.get_item();
                var item = eventArgs.get_item();                 
                if (item.get_dataKeyValue('IsAlreadyAssigned') == 'True') {
                    if (eventArgs.get_item().get_selected())
                    {
                        <<<I NEED TO CANCEL EVENT HERE , SO IT DOES NOT DO ANYTHING JUST CANCEL IT>>>
                        selItem = '';                        
                    }
                    else
                    {
                        alert('2');                        
                        selItem = item.get_dataKeyValue('ObjectId')
                        eventArgs.get_item().set_selected(true);
                    }
                    
                }
                else {                     
                    selItem = '';                    
                                    
                }

            }

Please help
Shinu
Top achievements
Rank 2
 answered on 22 Aug 2014
1 answer
277 views
Hello,

I am having issue with radio button selection on Radgrid...  I am initially setting Disabled checked on all rows in Markup....

in my code behind, I am trying to change selection and it is not working.....

Here is my Markup..


<telerik:RadGrid ID="gridMember" runat="server" ShowFooter="false" AutoGenerateColumns="False"
                        Skin="Metro" AllowPaging="False" ShowStatusBar="False" Width="700px"
                        OnNeedDataSource="gridMember_NeedDataSource" Height="600px" >
           
                    <GroupingSettings CaseSensitive="false" />
                    <MasterTableView DataKeyNames="UserName">
                      <Columns>                          <telerik:GridTemplateColumn HeaderText="Enable" ShowFilterIcon="false" Resizable="False">  
                                        <ItemTemplate> 
                                            <asp:RadioButton runat="server" ID="rdEnable" GroupName='{Binding UserName}' AutoPostBack="True" /> 
                                        </ItemTemplate> 
                               <HeaderStyle Width="35" />                                           
                          </telerik:GridTemplateColumn>                            <telerik:GridTemplateColumn HeaderText="Disable" ShowFilterIcon="false" Resizable="False">  
                                        <ItemTemplate> 
                                            <asp:RadioButton runat="server" ID="rdDisable" Checked="True" GroupName='{Binding UserName}' AutoPostBack="True" /> 
                                        </ItemTemplate>
                                <HeaderStyle Width="35" />                                            
                          </telerik:GridTemplateColumn>                          <telerik:GridBoundColumn ItemStyle-VerticalAlign="Top" UniqueName="Name" HeaderText="Name"
                            DataField="Name" >
                              <HeaderStyle Width="150" />    
                        </telerik:GridBoundColumn>                         <telerik:GridBoundColumn ItemStyle-VerticalAlign="Top" UniqueName="UserName" HeaderText="UserName"
                            DataField="UserName" >
                              <HeaderStyle Width="100" />    
                        </telerik:GridBoundColumn>                                        <telerik:GridBoundColumn UniqueName="IsActive" AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo"
                            ShowFilterIcon="false" CurrentFilterValue="True" HeaderText="Current Status" DataField="IsActive" > 
                             <HeaderStyle Width="75" />                              
                        </telerik:GridBoundColumn>                                                <telerik:GridButtonColumn ConfirmText="Delete this record?" ConfirmDialogType="RadWindow"
                            ConfirmTitle="Delete" ButtonType="ImageButton" HeaderText="Delete User" CommandName="Delete" Text="Delete"
                            UniqueName="DeleteColumn" ImageUrl="~/Images/Delete.gif"> 
                            <HeaderStyle Width="75" />                                              
                        </telerik:GridButtonColumn>                      </Columns>
                    </MasterTableView>                   <%-- <ClientSettings>
                         <Scrolling AllowScroll="true" ScrollHeight="500px" UseStaticHeaders="true"   />
                 </ClientSettings>--%>
                  </telerik:RadGrid>


-----------------------------------------------------

Code Behind:( i am trying to change the selection on Radgrid and it is not working....)  the below function is called after binding data to Radgrid....


Public Sub CheckFirmVerified(ByVal firmId As Integer)
Dim db As New MembershipDB
Dim memberUser As MembershipUser = Nothing
Dim _firm As FirmBO = FirmManager.getFirmListByFID(firmId)

If _firm IsNot Nothing Then

If _firm.Firm_Verified = "Yes" Then 'the firm is verified
'loop the grid and enable active users
For Each dataItem As GridDataItem In gridMember.MasterTableView.Items
Dim rbEnableSelected As RadioButton = CType(dataItem.FindControl("rdEnable"), RadioButton)

Dim userName As String = dataItem("UserName").Text 'get the username
memberUser = Membership.GetUser(userName) 'get the member user
If memberUser.IsApproved Then 'gets or sets whether the membership user can be authenticated.
'rbEnableSelected.Checked = True
CType(dataItem.FindControl("rdEnable"), RadioButton).Checked = True

End If
Next
End If
End If

End Sub




Any Idea?

Thanks

Shinu
Top achievements
Rank 2
 answered on 22 Aug 2014
3 answers
147 views
Hello,

I have one scenario where i'll enter search criteria in textbox and the results should be populated in the grid.

The Requirement matches with telerik demo search box where we'll enter criteria and results displayed in grid.

Can i get further assistance to resolve this task?.

Regards,
Naga Sridhar Madiraju
Princy
Top achievements
Rank 2
 answered on 22 Aug 2014
6 answers
463 views
Hello,

My sample webform below is trying to get the grid to "fit 100%" within the radpane. I think i have followed all the advice so far in these forums, but i could have missed something.  It is close but their are "showstopper" problems.

Problem: the radgrid item cells and cell borders are not left aligned with the ragrid column headers!  the cells are "shifted to the right"
Q: how can i get these to align?  

Problem: can't get rid of horizontal scrollbar.
Q: how do i specify the column widths such that the grid "fits neatly" in the radpane "without" generating a horizontal scrollbar? in other words, how do i configure the grid to not generate a horizontal scrollbar when the radgrid width is 100%?  i want to keep the vertical scrollbar though which is working ok.

Problem:  i can't seem to get the "GridLines" consistently.  I want horz and vertical gridlines but they appear to be random.
Q:  what do i do to (consistenly) turn on horizontal and vertical gridlines?

Thanks in advance!

-chris



<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GridInSplitter.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        html
        {
            padding: 0px;
            margin: 0px;
            width: 100%;
            height: 100%;
            border: none;
            overflow: hidden;
        }
        body, form
        {
            padding: 0px;
            margin: 0px;
            width: 100%;
            height: 100%;
            border: none;           
            margin-left: 0px;
            margin-top: 0px;
            margin-right: 0px;
            margin-bottom: 0px;
            overflow: hidden;
        }
    </style>
</head>
<body>

    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <telerik:RadSplitter ID="RadSplitter1" ResizeWithBrowserWindow="true" ResizeWithParentPane="true"
            LiveResize="true" Orientation="Horizontal" Width="100%" Height="100%" BorderSize="0"
            BorderStyle="None" BorderWidth="0" runat="server">
            <telerik:RadPane ID="RadPane1" Width="100%" Height="150px" Scrolling="None" runat="server">
                <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" Width="100%" Height="100%"
                    AllowSorting="True" AllowPaging="True" PageSize="50" runat="server" AutoGenerateColumns="False"
                    BorderStyle="None" BorderWidth="0px">
                    <HeaderContextMenu>
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </HeaderContextMenu>
                    <PagerStyle Mode="NumericPages" />
                    <MasterTableView DataKeyNames="CustomerID" Width="100%">
                        <Columns>
                            <telerik:GridBoundColumn DataField="CustomerID" HeaderText="aCustomerID" UniqueName="column1">
                                <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                    Font-Underline="False" Width="50px" Wrap="True" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CompanyName" HeaderText="aCompanyName" UniqueName="column2">
                                <HeaderStyle Width="100px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ContactName" HeaderText="aContactName" UniqueName="column3">
                                <HeaderStyle Width="200px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ContactTitle" HeaderText="aContactTitle" UniqueName="column4">
                                <HeaderStyle Width="50px" />
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true">
                        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                        <Resizing ResizeGridOnColumnResize="false" AllowColumnResize="true" />
                    </ClientSettings>
                    <FilterMenu>
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </FilterMenu>
                </telerik:RadGrid>
                <br />
                <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
                    ProviderName="System.Data.SqlClient" SelectCommand="SELECT CustomerID, CompanyName, ContactName, ContactTitle FROM Customers"
                    runat="server"></asp:SqlDataSource>
            </telerik:RadPane>
            <telerik:RadSplitBar ID="RadSplitBar1" runat="server" />
            <telerik:RadPane ID="RadPane2" Width="100%" Scrolling="None" runat="server">
            </telerik:RadPane>
        </telerik:RadSplitter>
    </div>
    </form>
</body>
</html>

wael
Top achievements
Rank 1
 answered on 21 Aug 2014
2 answers
102 views
I have seen some similar posts, but they do not describe the exact problem I'm facing.

This behavior can easily be seen in the demo at: http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx

Double-click on a word within the editor window.  Notice the font name and size dropdowns are updated to reflect the highlighted word's font and size.

Now, select a new font from the dropdown.  For example, let's say you highlighted a word with Arial font.  Now select Verdana from the dropdown.  Notice that the actual text in the editor changes to Verdana, but the font name dropdown still says Arial.  This behavior is the same for the font size dropdown.

It seems that the font name and size dropdowns are always one step behind what is actually happening, because if you now click the font name dropdown and change the font again to Georgia, the text will change to Georgia, but the font name dropdown now says Verdana.

I am seeing this same behavior in our own website and customers are complaining.

Any ideas?  Thanks for your time.
Steve
Top achievements
Rank 1
 answered on 21 Aug 2014
2 answers
493 views
How do I decrease the space between bars and or increase the widths of the bars.

I am binding to date in code behind

            BarChart.DataSource = GetChartData();
            BarChart.DataBind();

                  <telerik:RadHtmlChart runat="server" ID="BarChart" Width="800px" Height="200px" >
               <PlotArea>

                    <Series>
                        
                         <telerik:BarSeries DataFieldY="Wagers" ColorField="ColorField">

                             <LabelsAppearance DataFormatString="{0}%" Position="OutsideEnd"></LabelsAppearance>

                              <TooltipsAppearance Color="White" />

                         </telerik:BarSeries>

                    </Series>

                    <XAxis DataLabelsField="Horse">

                         <TitleAppearance Text="Horses">

                              <TextStyle Margin="20" Bold="true" FontSize="18" />

                         </TitleAppearance>                        

                         <MajorGridLines Visible="false" />

                         <MinorGridLines Visible="false" />

                    </XAxis>

                    <YAxis>
                        
                         <TitleAppearance Text="">

                              <TextStyle Margin="20" />

                         </TitleAppearance>

                         <MinorGridLines Visible="false"/>

                    </YAxis>

               </PlotArea>

               <ChartTitle Text="">

               </ChartTitle>

               </telerik:RadHtmlChart>
Joseph
Top achievements
Rank 1
 answered on 21 Aug 2014
2 answers
73 views
Hi Team,

we have issue in Radgrid while using EntityDataSource. I have six record in my grid and page size was 5. so i have 1 record in my second page. that grid display no record while deleting 6th record in 2nd page. but if have more than one record in last page it is working fine. but if i have one record in last page means it will return "no record". after refresh it shows the record. Please advice what we will do for this issue.


Thanks in Advance,
Dhamodharan.
Viktor Tachev
Telerik team
 answered on 21 Aug 2014
3 answers
132 views
Hi,

I am using Rad Dropdown list for the webpart in SharePoint 2010

I used the following thread to set the ajax for the gird and dropdownlist.

http://www.telerik.com/forums/telerik-rad-ajax-loading-panel-issue-in-sharepoint-2010

After setting this panel for grid works fine, however got some issues in the dropdown list.

In the dropdown list i have 2 values

Item 1
Item 2

Once i select any item for example item 2, i am not able to open the dropdown again. Its sticked to the same item 2.

 

let me know how to solve this issue









Platinum
Top achievements
Rank 1
 answered on 21 Aug 2014
1 answer
84 views
Working with the RadEditor Q2 2014  and would like to use the External Video Dialog to insert videos from YouTube.  We are running our editor on a site that uses SSL and even though I'm using an HTTPS link from YouTube, the dialog inserts the code referencing HTTP and causing the Iframe not to load.

Am I doing something wrong or is this a bug?
Niko
Telerik team
 answered on 21 Aug 2014
1 answer
161 views
Hi,

I have a problem that you can find also in this demo

http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx 

Scenario A)

I click on the ImageManager button-->Upload-->Select, I select a file a zip file of 50KB and I receive this message:
################################################################################
#Demo.zip                                                                                                                                                               #
#                                                                                                                                                                                #
#The size of the uploaded file exceed max size allowed-------------------------------------------------------------------#-->Not true
#The extension of the uploaded file is not valid. Please, provide a valid file!----------------------------------------#-->True (I should see only this message)
################################################################################

Scenario B)

I click on the ImageManager button-->Upload-->Select, I select a file a gif file of 300KB and I receive the same message:
################################################################################
#Demo.gif                                                                                                                                                                #
#                                                                                                                                                                                #
#The size of the uploaded file exceed max size allowed-------------------------------------------------------------------#-->True (I should see only this message)
#The extension of the uploaded file is not valid. Please, provide a valid file!----------------------------------------#-->Not True 
################################################################################

I saw I can set the EnableAsyncUpload property to "false" and in this way the validation of the extension and the format is done on the server and I get the only correct message, but I want to avoid the validation on the server side... I want to validate the format and the size before to send the file to the server.

How can I solve it ?

Thanks,
 Gianni,
Marin Bratanov
Telerik team
 answered on 21 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
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?