Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
184 views
Is there an issues with the RadFacebookButton ButtonType="FacebookShare"  or has Facebook phased this button type out.  I noticed that it is not showing up in the SocialShare / Standard third party buttons demo.  If Facebook has phased this button type out what is the new button type I should be using?
Thanks
Marin Bratanov
Telerik team
 answered on 23 Jul 2012
6 answers
203 views
hi
i am working on telerik asp.net ajax controls using demo version i am using text boxes combo boxes etc with 100 percent width in my forms but only text boxes are causing issues they are not aligning properly they are coming as pyramid starting from top with lowest width to the last with max width
and when i am hiding splitter the text boxes auto adjust to width to cover the area but when i again bring back splitter they dont reduce themselves same issue is occurring with menu bar control i am using
and when i am doing this hiding and unhiding of splitter again and again text boxes and menu bar are increasing their sizes repeatedly this is causing me a great problem
i would be grateful if you help ASAP

regards
Harry
Pavlina
Telerik team
 answered on 23 Jul 2012
1 answer
83 views
I have a database with some tables in it
the main table which is basically structured as such:


uid, existingpkg, win7preferredpackageid 
1, 100, 1200

I also have a lookup table which contains
uid, packagename
100, "Package One"
1200, "New Package One"



I have implmented a radgrid as follows


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
  <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    <Scripts>
      <%--Needed for JavaScript IntelliSense in VS2010--%>
      <%--For VS2008 replace RadScriptManager with ScriptManager--%>
      <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
      <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
      <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
    </Scripts>
  </telerik:RadScriptManager>
  <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
  <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
    <telerik:RadGrid ID="RadGrid1" GridLines="Both" runat="server" AllowAutomaticDeletes="True" AllowSorting="True" AutoGenerateColumns="false"
                     AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowMultiRowEdit="False" 
                     AllowPaging="True" DataSourceID="DataSource1" OnItemUpdated="RadGrid1_ItemUpdated"
                     AllowFilteringByColumn="True" OnItemDeleted="RadGrid1_ItemDeleted" PageSize="25" 
                     OnItemInserted="RadGrid1_ItemInserted" OnDataBound="RadGrid1_DataBound">
      <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" />
      <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataKeyNames="uid" 
                       DataSourceID="DataSource1" HorizontalAlign="NotSet" EditMode="InPlace">
        <Columns>
          <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
            <ItemStyle CssClass="MyImageButton" />
          </telerik:GridEditCommandColumn>
          <telerik:GridBoundColumn    DataField="uid" 
                                      HeaderText="uid" 
                                      SortExpression="uid" 
                                      UniqueName="uid" 
                                      ReadOnly="True">
          </telerik:GridBoundColumn>
          <telerik:GridDropDownColumn DataField="win7rationalizationstatusID" 
                                      DataSourceID="SqlDataSource3"   
                                      HeaderText="Rationalization Status"    
                                      ListTextField="Status"                                             
                                      ListValueField="uid"   
                                      UniqueName="win7rationalizationstatusID" 
                                      />  
          <telerik:GridDropDownColumn DataField="existingpkg" 
                                      DataSourceID="SqlDataSource2"   
                                      HeaderText="Existing Package"    
                                      ListTextField="PackageName"                                             
                                      ListValueField="uid"   
                                      UniqueName="PackageID" 
                                      />  
          <telerik:GridDropDownColumn DataField="win7preferredpackageid" 
                                      DataSourceID="SqlDataSource2"   
                                      HeaderText="Windown 7 Preferred Package"    
                                      ListTextField="PackageName"                                             
                                      ListValueField="uid"   
                                      UniqueName="WIn7PackageID" 
                                      />  
          <telerik:GridBoundColumn    DataField="mappeddate" 
                                      HeaderText="Date Mapped" 
                                      SortExpression="mappeddate" 
                                      UniqueName="mappeddate" 
                                      ReadOnly="True">
          </telerik:GridBoundColumn>
          <telerik:GridBoundColumn    DataField="mappedbyEmpID" 
                                      HeaderText="Mapped by" 
                                      SortExpression="mappedbyEmpID" 
                                      UniqueName="mappedbyEmpID" 
                                      ReadOnly="True">
          </telerik:GridBoundColumn>
        </Columns>
        <EditFormSettings>
          <FormTableItemStyle Wrap="False"></FormTableItemStyle>
          <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
          <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White" Width="100%" />
          <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" />
          <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
          <EditColumn ButtonType="ImageButton" UniqueName="EditCommandColumn1" CancelText="Cancel edit">
          </EditColumn>
          <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
        </EditFormSettings>
      </MasterTableView>
    </telerik:RadGrid>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager>
  </telerik:RadAjaxPanel>
  <asp:SqlDataSource 
    SelectCommand="SELECT pr.uid, pr.packageid as existingpkg, pk1.packagename, pr.win7rationalizationstatusID, rs.Status AS win7rationalizationstatus, pr.win7preferredpackageid, pk2.packagename as win7preferredpackagename, pr.notes, pr.mappeddate, pr.mappedbyEmpID FROM lc2.dbo.tbl_PackageRationalization pr join lc2.dbo.lu_tbl_packages as pk1 on pr.packageid = pk1.uid join lc2.dbo.lu_tbl_packages as pk2 on pr.win7preferredpackageid = pk2.uid join lc2.dbo.lu_tbl_win7apprationalizationstatus as rs on pr.win7rationalizationstatusID = rs.uid order by uid" 
    ConnectionString="<%$ ConnectionStrings:LC2ConnectionString %>" 
    ProviderName="System.Data.SqlClient" 
    ID="DataSource1" 
    runat="server" />
  <asp:SqlDataSource 
    SelectCommand="SELECT uid, PackageName as packagename FROM LC2.dbo.lu_tbl_Packages"
    ConnectionString="<%$ ConnectionStrings:LC2ConnectionString %>" 
    ProviderName="System.Data.SqlClient" 
    ID="SqlDataSource2" 
    runat="server" 
    />
  <asp:SqlDataSource 
    SelectCommand="SELECT uid, status FROM LC2.dbo.lu_tbl_Win7AppRationalizationStatus" 
    ConnectionString="<%$ ConnectionStrings:LC2ConnectionString %>" 
    ProviderName="System.Data.SqlClient" 
    ID="SqlDataSource3" 
    runat="server" 
    />

In "Edit Mode" this is what I see...

http://postimage.org/image/4dlvnyep1/ 

Which is all correct and working as expected
What I need to happen is this, turn the dropdowns into google suggest like combos
So end users can type the first characters of an package name and it shows the matches
This is exactly what I am trying to do ... http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/comboingrid/defaultvb.aspx?product=combobox

but the data for my dropdown would be coming from another table which is not like this example

How can I modify it so the combobox uses the lookup table instead of the main datasource?
Marin
Telerik team
 answered on 23 Jul 2012
12 answers
369 views
hi, i have a problem.
I'm using the radDatePicker.
When I selected the date 18-oct-2009 or penultimate sunday of october at another year, the picker change the date for another date.
i try it on demo "http://demos.telerik.com/aspnet-ajax/calendar/examples/datepicker/custompopup/defaultcs.aspx" and i have the same problem.


Obs.: It always change to 1 day ago.


Version: RadControls for ASPNET AJAX Q2 2008
Framework 2.0
Language: C#
Browser: FireFox Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11
               Internet Explorer 6.0.2900.5512.xpsp_sp3_gdr
               Internet Explorer 8.0.6001.18702IC

It's work on
              Internet Explorer 7.0.5730.13

thanks.
Vasil
Telerik team
 answered on 23 Jul 2012
2 answers
97 views

Hello,

  I would like to have a checkbox list in the radgrid edit mode. But the problem is, there are almost 20 items in the checkbox list. By default, all these items are aligned vertically. But i want to have the list box items in multiple columns. 
Any help

Thanks


Jagat
Top achievements
Rank 1
 answered on 23 Jul 2012
2 answers
135 views
I have a requirement to have Grid where all the rows can be edited. I have the Grid opening with the Rows in Editmode. However, one of the columns is a DropDownList. We are doing the databind to the datasource for the drop down inside the ItemDataBound Event of the Grid. On the first Row, the dropdown works fine However, for anything other than the first row being edited, it shows the Type of the Datasource, and not the values. (See attached image)

Inside the ItemDataBound:
if (e.Item is GridEditableItem && (e.Item as GridEditableItem).IsInEditMode)
                {
                    GridEditableItem editedItem = e.Item as GridEditableItem;
                    GridEditManager editMan = editedItem.EditManager;
 
                   // Drop down for Status
                    GridDropDownListColumnEditor editor = editMan.GetColumnEditor("PStatusID") as GridDropDownListColumnEditor;
                    editor.DataSource = pStatuses;
                    editor.DataTextField = "Name";
                    editor.DataValueField = "PStatusID";
                                          editor.DataBind();
}

This is the Column definition:
<telerik:GridDropDownColumn DataField="PStatusID" FilterControlAltText="Filter PStatusID column"
                            HeaderText="Status" UniqueName="PStatusID" ItemStyle-Width="80px">
                             
                        </telerik:GridDropDownColumn>

I can't post the whole code due to confidentiality issues, unfortunately.
We are using the Q2 2012 version of the controls.


many thanks.

Tsvetoslav
Telerik team
 answered on 23 Jul 2012
3 answers
143 views
I have hierachy table, which has a detail table. In the detail table, I am using GridClientSelectColumn and allows multi-selection. I want to disable the header checkbox when the checkbox of all items are disabled. How do I know all the check box items are disabled before I disable the header check box?   
Eyup
Telerik team
 answered on 23 Jul 2012
1 answer
759 views
Hi,

I'm adding a RadWindow in the page's init event so I can use it to display async postback errors. But when I try to open the RadWindow on the client, I get the following javascript error:
"Cannot read property 'style' of null" in this codeblock: 
if(this._dockMode){this._contentElement.style.width="1px";

Thats my server-side code:

RadWindow window = new RadWindow();
 window.ID = "AsyncErrorMessageWindow";
 window.ClientIDMode = ClientIDMode.Static;
 HtmlGenericControl contentDiv = new HtmlGenericControl("div");
 contentDiv.ID = "AsyncErrorMessageWindowContent";
 contentDiv.Attributes["class"] = "AsyncErrorMessageWindow_Content";
 window.ContentContainer.Controls.Add(contentDiv);
 Form.Controls.Add(window);
and this is what I do client-side:

function onEndRequest(sender, args) {
   // error handler
   if (args.get_error()) {
      var message = args.get_error().message;
      args.set_errorHandled(true);
      if (args.get_error().name === 'Sys.WebForms.PageRequestManagerServerErrorException') {
         if (args._error.httpStatusCode == 0) {
            return false;
         }
      }
 
      var window = $find('AsyncErrorMessageWindow');
      var windowContent = $('.AsyncErrorMessageWindow_Content');
      windowContent.text(message);
      window.set_modal(true);
      window.set_title(ae_data.title);
      window.autoSize();
      window.show();
   }
    
   return true;
}

Is there something I forgot? I'm using the RadWindow at other locations where it works fine.

Thanks for your help!
Marin Bratanov
Telerik team
 answered on 23 Jul 2012
1 answer
109 views
Hello,

I have a large SQL Server table with over 600,000 records. I am testing based on your "Grid / Virtual Scrolling and Paging" example found at: http://demos.telerik.com/aspnet-ajax/grid/examples/client/virtualscrollpaging/defaultvb.aspx

I set VirtualItemCount to the total number of records in the table, i.e. VirtualItemCount="622840". See all code below.
Once I did this change, the scrolling behavior was completely messed-up. Please see attached screen shots, showing step by step what is happening.

Using Rad Controls for ASP.Net Ajax, version 2011.3.1305 for .Net framework 4.0 and Visual Studio 2010.
<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
  CodeBehind="Default.aspx.vb" Inherits="DB2_Data._Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
  <h2>
 
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
    </telerik:RadScriptManager>
 
  </h2>
  <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />

   <telerik:RadGrid ID="RadGrid1" Width="97%" AllowPaging="True" PageSize="14" AllowSorting="True"
      runat="server" AllowCustomPaging="true" VirtualItemCount="622840">
      <PagerStyle Mode="NumericPages" />
      <MasterTableView TableLayout="Fixed" />
      <ClientSettings>
          <Scrolling AllowScroll="True" EnableVirtualScrollPaging="True" UseStaticHeaders="True"
              SaveScrollPosition="True"></Scrolling>
      </ClientSettings>
    </telerik:RadGrid>
 
 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ASWConnectionString %>"
        SelectCommand="SELECT * FROM [DB2_Customers]" ProviderName="System.Data.SqlClient"></asp:SqlDataSource>
 
</asp:Content>

Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections.Generic
Imports Telerik.Web.UI
 
Public Class _Default
  Inherits System.Web.UI.Page
  Private Function GetDataTable(ByVal queryString As String) As DataTable
    Dim ConnString As String = ConfigurationManager.ConnectionStrings("ASWConnectionString").ConnectionString
    Dim MySqlConnection As New SqlConnection(ConnString)
    Dim MySqlDataAdapter As New SqlDataAdapter
    MySqlDataAdapter.SelectCommand = New SqlCommand(queryString, MySqlConnection)
 
    Dim myDataTable As New DataTable
    MySqlConnection.Open()
    Try
      MySqlDataAdapter.Fill(myDataTable)
    Finally
      MySqlConnection.Close()
    End Try
 
    Return myDataTable
  End Function
 
  Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
    RadGrid1.DataSource = GetDataTable("SELECT * FROM db2_customers WHERE ID BETWEEN " & ((RadGrid1.CurrentPageIndex * RadGrid1.PageSize) + 1) & " AND " & ((RadGrid1.CurrentPageIndex + 1) * RadGrid1.PageSize))
  End Sub
End Class

Regards,
M.R.
Milena
Telerik team
 answered on 23 Jul 2012
1 answer
53 views
Hi

I have a grid with a variety of controls (asp:CheckBox, asp:TextBox, etc).  I want to programatically decide if I want to hook OnXXXXChanged hanlders and autopostback.  Could you provide advice on how to best proceed?

I currently have all controls in the grid set to autopostback AND with thier respective change event handler.  All event handlers are used tio show that the grid is currently being editted.  Once the grid is being editted it stays in edit until the save is performed.  Thus subsequent autopostbacks are a frustration as they serve no additional purpose.

Kind regards
Mark
Shinu
Top achievements
Rank 2
 answered on 23 Jul 2012
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?