Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
167 views
hi All,

I have a dropdown (programgroup) in my edit form for which I want to set the selectedvalue in the code behind and not in aspx. For that I have to know the value that is in the radgrid cell for that column. Please see the code below. I have a different datakey and this program group cannot be the datakey.

This is my aspx definition:
In MasterTable View:
   <telerik:GridBoundColumn UniqueName="ProgramGroup" HeaderText="Program Group" DataField="ProgramGroup" DefaultInsertValue="">  </telerik:GridBoundColumn>

In the EditForm Template:
<asp:DropDownList ID = "ddlProgramGroup" runat = "server"  TabIndex="8" Width="200px" DataTextField = "List_Item" DataValueField = "List_Value" DataSource ="<%# dsProgramGroup(true) %>" >
</asp:DropDownList>

In the CodeBehind:
  Private Sub rgSearchResults_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles rgSearchResults.ItemDataBound
        If TypeOf e.Item Is GridEditFormItem And e.Item.IsInEditMode Then
            Dim item As GridEditFormItem = DirectCast(e.Item, GridEditFormItem)
            Dim ddlDropDownList As DropDownList = DirectCast(e.Item.FindControl("ddlProgramGroup"), DropDownList)
            If Not IsNothing(ddlDropDownList) Then
                Dim strPrg As String = "VALUE IN THE RADGRID CELL"
                ddlDropDownList.Items.FindByText(strPrg).Selected = True
            End If
        End If
    End Sub

Is there a way to find out the value of the program group is the radgrid_ItemDataBound event
Shinu
Top achievements
Rank 2
 answered on 31 Oct 2012
0 answers
92 views
Dear all

I need to whenever a user Add/Update/Delete a raw from the Grid
All clients' Grid update like the JTable example here
http://www.jtable.org/
All i found yet is updating the Grid by a timer, not instantly after the update happens

I'm using VS 2010 and VB code behind

Regards
Amr
Top achievements
Rank 1
 asked on 30 Oct 2012
0 answers
65 views
This has been driving me nuts for the past couple days. I have a grid that has a customized GroupFooterTemplate. There's three different levels of grouping (this doesn't seem to happen with just two). GroupLoadMode is set to Client, ShowGroupFooter is set to True, GroupsDefaultExpanded False, and RetainGroupFooterVisibility is True.

When the grid is initially displayed, all top level groups are shown collapsed with their group footers as expected. When I expand a top level group, the first second-level group is displayed with it's group footer, but the second second-level group is also showing a third-level group footer. If I expand and collapse that second-level group, it is now displayed correctly.

If I change the GroupLoadMode to Server, it works as expected. If I only have two levels of groups, it works as expected. Am I doing something wrong or is this a bug? I'm using version 2012.2.912.35

I've attached a picture showing what it looks like. In the group footer, I'm displaying the group index. As you can see, under "Segment 1"->"Group 2", there's three footers. The 0_2_2 shouldn't be there as that is from a group inside of "Group 2".
Ronald
Top achievements
Rank 1
 asked on 30 Oct 2012
3 answers
128 views
The subject pretty much says all.  I can't seem to find any way to get the columns in the inner-grid of a two-level hierarchical RadGrid to resize.  Below is the code I'm attempting:

ASPX:
<telerik:RadGrid ID="XLSView" runat="server" AutoGenerateColumns="True" AllowMultiRowSelection="true" Width="600px">
    <MasterTableView Width="100%">
        <DetailTables>
            <telerik:GridTableView Width="100%">
                <Columns>           
                    <telerik:GridTemplateColumn UniqueName="chkDup" HeaderText="Select">
                        <ItemTemplate>
                            <asp:CheckBox ID="chkDup" runat="server">
                            </asp:CheckBox>
                        </ItemTemplate>
                        <HeaderStyle Width="200px" />
                    </telerik:GridTemplateColumn>
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
    </MasterTableView>
    <ClientSettings>
        <Scrolling AllowScroll="true" />
    </ClientSettings>
</telerik:RadGrid>

VB:
Protected Sub XLSView_DetailTableDataBind(sender As Object, e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles XLSView.DetailTableDataBind
 
...
            Dim test As DataTable = New DataTable()
            test.Columns.Add("FileID")
...
            For Each dupFile As FILE In dupFiles
                Dim dr As DataRow = test.NewRow()
                dr("FileID") = dupFile.FILEID
...
            Next
            e.DetailTableView.DataSource = test
 
------------------------------------
 
    Protected Sub XLSView_ColumnCreated(sender As Object, e As Telerik.Web.UI.GridColumnCreatedEventArgs) Handles XLSView.ColumnCreated
        If e.Column.UniqueName = "Description" Then
            Dim boundColumn As GridBoundColumn = CType(e.Column, GridBoundColumn)
            boundColumn.HeaderText = "DescriptionA"
            boundColumn.ItemStyle.Width = 600
            boundColumn.HeaderStyle.Width = 600
            boundColumn.FooterStyle.Width = 600
            boundColumn.FilterControlWidth = 600
        End If
    End Sub

I get a good hierarchial grid, with the only exception being that the column of checkboxes that's in the ASPX will not widen and the numerous column resize attempts in the ColumnCreated function(which DOES fire correctly; the HeaderText property does change to "DescriptionA") also will not widen.  Can anybody please tell me what I'm doing wrong?

Thank you for any help you may have in advance.

Patrick
Patrick
Top achievements
Rank 1
 answered on 30 Oct 2012
2 answers
104 views
Hi,

I am using 2012.3.1016.35 of the ASP.NET for AJAX controls.

I have a RadMenu containing a RadMenuItem, which contains a user control that contains a RadTreeView.  The RadTreeView uses a RadTreeViewContextMenu on the nodes.

In IE and Firefox, the Context Menu displays as expected, AFTER I set the z-index of the RadTreeViewContextMenu as follows:  

style="z-index:40000"

PROBLEM:
The context menu does NOT display in the latest version of Chrome (version 22.0.1229.94, but I assume it is also a problem in earlier versions).

This is a huge deal for us.  I've seen one other forum post on this, where Telerik simply says it "looks like a documented bug in Chrome".

MORE INFO:
I use the exact same type of treeview and context menu in two other places of our web app, but in those places I do NOT nest the treeview in a radmenu, and in those cases, the context menu DOES DISPLAY in Chrome.

Can you help please?  Is there anything I can try, to get this to work?

Thanks,
Brent
Brent Hetland
Top achievements
Rank 1
 answered on 30 Oct 2012
16 answers
649 views
I am trying to implement Load On Demand for the RadPanelBar. If I click on the Expand/Collapse button the ItemClick never fires. Also when another item is expanded, then the control that was previously loaded dissapears. I have been trying to make this work for over a day.

<form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadPanelBar1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadPanelBar1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadPanelBar ID="RadPanelBar1" runat="server" OnItemClick="RadPanelBar1_ItemClick"
            ExpandMode="MultipleExpandedItems">
            <CollapseAnimation Duration="100" Type="None" />
            <Items>
                <telerik:RadPanelItem runat="server" Text="Root RadPanelItem1">
                    <Items>
                        <telerik:RadPanelItem runat="server">
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem runat="server" Text="Root RadPanelItem2">
                    <Items>
                        <telerik:RadPanelItem runat="server">
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
            </Items>
            <ExpandAnimation Duration="100" Type="None" />
        </telerik:RadPanelBar>
    </div>
    </form>


public partial class RadPanelBarTest : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
 
    private void LoadUserControl(Telerik.Web.UI.RadPanelItem item)
    {
        Label userControl1 = new Label();           
        userControl1.ID = "userControl1";
        userControl1.Text = DateTime.Now.ToString();
        item.Items[0].Controls.Add(userControl1);
        item.Expanded = true;
    }
 
    protected void RadPanelBar1_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
    {
        this.LoadUserControl(e.Item);
    }
}

I basically used the exact suggestion here: http://www.telerik.com/community/forums/aspnet-ajax/panelbar/radpanelbar-with-load-on-demand-items.aspx , except i changed the ExpandMode to multiple and i used a label for simplicity of this post.
Harald Breidler
Top achievements
Rank 1
 answered on 30 Oct 2012
6 answers
168 views

i have a grid with large number of columns
it has two levels

when i use the following
<Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="300px" />

the width is auto fitting into 100%, with out scroll, squeezed

How can i get rid of this problem.

Please help.
Arijit Chatterjee


Pavlina
Telerik team
 answered on 30 Oct 2012
4 answers
165 views
Hi...i need to use the Radscheduler with other component in the same page, in this case Ext.Net component, but then insert the RadScheduler in the page and show the page, i retrive this error JScrip:

Unhandled exception at line 240, column 5 in http://localhost:8497/WebResource.axd?d=7SNUFUE229WI3L9Dj-W-PAIm_W9gkIOUcn1bePKMGP3OeC75SRjPFoYYmjCeF4psB8g09B5xCr100kKxX9laHQ-2GhFxzDtJFZbuxerix4Q1&t=634773918900000000

0x800a1391 - Errore di run-time di Microsoft JScript: 'theForm' non è definito

Other RadComponent work Ok..

There is my simpli code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="AnalisiProcedimenti.WebForm3" %>
 
 
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">     
        
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
         <ext:ResourceManager ID="ResourceManager1" runat="server" Namespace="" DirectMethodNamespace="Ext.net.DirectMethods">
            </ext:ResourceManager>
      <div>
          <telerik:RadTextBox ID="RadTextBox1" runat="server"></telerik:RadTextBox>
          <telerik:RadCalendar ID="RadCalendar1" runat="server"></telerik:RadCalendar>
          <telerik:RadScheduler ID="RadScheduler1" runat="server" DataDescriptionField="Description" DataEndField="End"
              DataKeyField="ID" DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID"
              DataReminderField="Reminder" DataSourceID="SqlDataSource1" DataStartField="Start" DataSubjectField="Subject"
              DisplayDeleteConfirmation="False" EnableDescriptionField="True" ReadOnly="True">
              <Reminders Enabled="True" />
          </telerik:RadScheduler>      
         
      </div>
  <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DbAnaProConnectionString %>" SelectCommand="SELECT * FROM [PROCAL]"></asp:SqlDataSource>
    </form>
</body>
</html>
If leave the RadScheduler the error not appear.
The RadScheduler is show ok in the page , but the open the page i retrive the error.

Thanks
Aurelio
Aurelio Righetti
Top achievements
Rank 1
 answered on 30 Oct 2012
5 answers
142 views
I have been having problems with the self hierarchy with the RadGrid control with the columns not lining up.  It is a cross-IE problem.  I decided to look at the TreeList control.  How can I have all of the data on the client pre-loaded without having to make a server call for each expand/collapse.
Pavlina
Telerik team
 answered on 30 Oct 2012
3 answers
199 views
Hello,

I need help on Drag and Drop feature for RadGrid, Please is the my requirement.

 

We have 140 columns in a table, we need to show them in RadGrid based on the user choice by dragging from RadListBox.

 

We need to have a accessibility to drag columns from RadListBox to RadGrid to show selected columns and also drag column from RadGrid to RadListBox to hide columns from Grid.

 

I have achieved to show selected column from RadListBox but I donot have idea to hide columns based on dragging from RadGrid to RadListBox, Please help me on this.

 

Thanks,

Kiran

Pavlina
Telerik team
 answered on 30 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?