Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
111 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
129 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
724 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
83 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
40 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
1 answer
49 views
The color in my grid header near scrollbar needs to be blue.  It shows up different in IE 8.  I have attached a screenshot of my grid with red arrow pointing to trouble spot.  Thanks!
Pavlina
Telerik team
 answered on 23 Jul 2012
1 answer
48 views
Hi Team,

I am in a situation where I need a help.

1) I have 50 records item on page. Such that page size is 50.
2) I have grouping on grid column.

Situation is, I need to move the 2nd group to 1st page in case the 1st group is collapse. Meaning when the group 1 is cpllapse it should behave as an item.

When I collapse the 2nd group the 3rd Group should come on the first page until 50 groups are reached.

I can do a post back if required.

Please help.


Pavlina
Telerik team
 answered on 23 Jul 2012
1 answer
107 views
hello.. i am using RadAsyncUpload to upload my client files i want 2 check if the current uploaded file size is larger then the maximum allowed file size i want 2 display my validation label without making that file appear in the progress area like appearing in the second image
Bassem
Top achievements
Rank 1
 answered on 23 Jul 2012
4 answers
108 views
Team

I have configured the rad tree as follows 
   <telerik:RadTreeView ID="trvNodes" runat="server" AllowNodeEditing="true" OnContextMenuItemClick="trvNodes_OnContextMenuItemClick" OnClientLoad="trvNodes_OnClientLoad"
                                            EnableDragAndDrop="True" EnableDragAndDropBetweenNodes="true" OnNodeDrop="trvNodes_HandleDrop" OnClientNodeDropping="trvNodes_OnClientNodeDropping"
                                            OnClientContextMenuItemClicking="trvNodes_onClientContextMenuItemClicking" CheckBoxes="true" ShowLineImages="true" 
                                            TriStateCheckBoxes="true" OnNodeEdit="trvNodes_NodeEdit" OnClientContextMenuShowing="trvNodes_onClientContextMenuShowing"
                                            OnClientNodeChecked="trvNodes_ClientNodeChecked" OnClientNodeEditing="trvNodes_onNodeEditing"
                                            OnClientNodeEditStart="trvNodes_OnClientNodeEditStart"></telerik:RadTreeView>

and data binded to it as follows on pageload 

  trvNodes.DataFieldID = "NODE_ID";
        trvNodes.DataFieldParentID = "PARENT_NODE_ID";
        trvNodes.DataTextField = "NODE_NAME";
        trvNodes.DataValueField = "NODE_ID";
        trvNodes.DataSource = tdnode;
        trvNodes.DataBind();

but rad tree is not showing nodes connected line .
Is there something which I have missed?
Please reply ASAP
Ivan Zhekov
Telerik team
 answered on 23 Jul 2012
1 answer
85 views
I have a update form within a window, and on certain events like dropdown change the postback cause s the whole popup page to refresh and disappear momentarily.

how would i incorporate an ajax approach in the radwindow ?
Marin Bratanov
Telerik team
 answered on 23 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?