Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
174 views
else if (e.CommandName == RadGrid.UpdateCommandName)
            {
                MySqlConnection conn = new MySqlConnection();
                conn.ConnectionString = GetConnectionString();
                MySqlCommand cmd = new MySqlCommand();
  
                try
                {
                    GridEditableItem editedItem = e.Item as GridEditableItem;
                    string ID = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["ID"].ToString();
  
                    RadNumericTextBox newTimeScaleTextBox = (RadNumericTextBox)e.Item.FindControl("RadNumericBox_TimeScale");
                    string editedTimeScale = newTimeScaleTextBox.Text;
  
                    RadTextBox newGameNameTextBox = (RadTextBox)e.Item.FindControl("RadTextBox_Name");
                    string editedName = newGameNameTextBox.Text;
  
                    RadComboBox newManagerCombo = (RadComboBox)e.Item.FindControl("RadComboBox_Manager");
                    string editedManagerID = newManagerCombo.SelectedValue;
  
                    RadComboBox newRecalibrationDateCombo = (RadComboBox)e.Item.FindControl("RadComboBox_StartPeriod");
                    string editedRecalibrationDate = newRecalibrationDateCombo.SelectedValue;
  
                    conn.Open();
                    cmd.Connection = conn;
                    cmd.CommandText = "MyUpdateSQL" 
                    
cmd.CommandType = CommandType.Text;
  
                    cmd.ExecuteNonQuery();
                }
                catch (MySql.Data.MySqlClient.MySqlException ex)
                {
                    //    IMPLEMENT
                      }  
                conn.Close();
            }


Hi there,

I have a grid setup for cardview with an item template, there is a corresponding edititemtemplate.  The edititemtemplate cointains controls such as a RadNumericTextBox, RadTextBox and a couple of RadComboBoxes (one, crucially, is AutomaticLoadonDemand...this is why I'm not using autogenerated).

The above Item UpdateCommand works great, the values I enter in the edititemtemplate are refelected in the database.   I also conditionally (session variable) have the RadGrid.InsertItem() on page load and this is where the problem starts.

PROBLEM:  I just can't get the PerformInsert command to achieve the same results.  It seems the values i enter on the edititemtemplate are not recoverable from the controls.   I can use FindControl to get for eg RadNumericTextBox newTimeScaleTextBox = (RadNumericTextBox)e.Item.FindControl("RadNumericBox_TimeScale"); 

But when i try and get a value from  newTimeScaleTextBox Text or Value it's empty on the server in the PerformInsert command.

Any help appreciated.
 




 <EditItemTemplate>
  
  
<div style="margin:10px;">
  
  
  <table>
  
    <tr style="height: 50px;">
    <td style="width: 150px; border: none;"><span style="font-weight: bold;">Name:</span></td>
    <td style="border:none;">
      
      
    <telerik:RadTextBox ID="RadTextBox_Name"  EmptyMessage="e.g.  Accounts Department / Q4 2010"  Width="500"  Skin="Office2007" Text='<%# Bind("Name")%>'  runat="server" />
    </td>
      
    </tr>
  
    <tr style="height: 50px;">
    <td style="border:none;"><span style="font-weight: bold;">Start Period:</span></td>
    <td style="border:none;">
      
    <telerik:RadComboBox Width="150" runat="server"  AllowCustomText="true"    DataValueField='<%# Bind("RecalibrationDate") %>' Text='<%# String.Format("{0:MMMM}", Eval("RecalibrationDate")) %>'   Skin="Office2007" ID="RadComboBox_StartPeriod" >
      
    <Items>
      
      
      
    <telerik:RadComboBoxItem Text="January" Value="2010-01-01"   />
    <telerik:RadComboBoxItem Text="February" Value="2010-02-01" />
    <telerik:RadComboBoxItem Text="March" Value="2010-03-01" />
    <telerik:RadComboBoxItem Text="April" Value="2010-04-01" />
    <telerik:RadComboBoxItem Text="May" Value="2010-05-01" />
    <telerik:RadComboBoxItem Text="June" Value="2010-06-01" />
    <telerik:RadComboBoxItem Text="July" Value="2010-07-01" />
    <telerik:RadComboBoxItem Text="August" Value="2010-08-01" />
    <telerik:RadComboBoxItem Text="September" Value="2010-09-01" />
    <telerik:RadComboBoxItem Text="October" Value="2010-10-01" />
    <telerik:RadComboBoxItem Text="November" Value="2010-11-01" />
    <telerik:RadComboBoxItem Text="December" Value="2010-12-01" />
      
    </Items>
      
      
    </telerik:RadComboBox>
  
      
      
      
      
    </td>
      
    </tr>
  
    <tr style="height: 50px;">
    <td style="border:none;"><span style="font-weight: bold;">TimeScale:</span></td>
    <td style="border:none;">
    <telerik:RadNumericTextBox Label="1:" ID="RadNumericBox_TimeScale" Skin="Office2007"  Text='<%# Bind("TimeScale")%>'  MinValue="1" MaxValue="500" NumberFormat-DecimalDigits="0" ShowSpinButtons="true"   runat="server" />
         
    </td>
    </tr>
  
    <tr style="height: 50px;">
    <td style="border:none;"><span style="font-weight: bold;">Manager:</span></td>
    <td style="border:none;"
      
    <telerik:RadComboBox Filter="Contains" AllowCustomText="true" EmptyMessage="Search for a Name and/or Reference"
    EnableVirtualScrolling="true"
    EnableTextSelection="false" 
      
    ShowMoreResultsBox="true"
      
    ItemsPerRequest="20"
    EnableAutomaticLoadOnDemand="true"  
    Skin="Office2007"  Width="300" ID="RadComboBox_Manager" 
    DataSourceID="SqlDataSource_ManagersList" runat="server" 
    DataTextField="DisplayManager" DataValueField="ManagerID" >
    <Items>
      
    </Items>
  
    </telerik:RadComboBox>
  
      
    </td>
    </tr>
  
    <tr style="height: 50px;">
      <td style="border:none;"></td>
      <td style="border:none;">
          
  
  
        <asp:Button ID="Button_InsertUpdate" Text='<%# RadGrid.MasterTableView.IsItemInserted ? "Add" : "Update" %>'
        runat="server" CommandName='<%# RadGrid.MasterTableView.IsItemInserted ? "PerformInsert" : "Update" %>' />
  
          
        <asp:Button ID="Button_DiscardCancel" Text='<%# RadGrid_GameSetup_Basics.MasterTableView.IsItemInserted ? "Discard" : "Cancel" %>'
        runat="server" CommandName='<%# RadGrid_GameSetup_Basics.MasterTableView.IsItemInserted ? "Discard" : "Cancel" %>' />
  
  
  
  
      </td>
    </tr>
      
  </table>
  
    
</div>
</EditItemTemplate>

Veli
Telerik team
 answered on 02 Dec 2010
9 answers
155 views
Hey guys.

Whenever I launch a RadWindow containing an AsyncUpload when using IE, I get this error in RadAsyncUpload.js
Line: 220
Error: Object doesn't support this property or method

Is this a known issue? Is there a workaround?

Thanks,
Simon
Telerik team
 answered on 02 Dec 2010
1 answer
51 views
Hi

I have a radtab inside my formtemplate inside my radgrid. The tabs of the radtab display underneath each other when I click the create record button. I have set the updatepanelrendermode of my ajaxmanager to inline but it still doesnt work. Is there anyway I can fix this?

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline" >
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="radGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radGrid"/>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

Thank you
Fred
Veli
Telerik team
 answered on 02 Dec 2010
10 answers
684 views
How can I hide the first row in a RadGrid?

regards

Christian
Rohit
Top achievements
Rank 1
 answered on 02 Dec 2010
1 answer
95 views
Hi,

We are using "AllowFilteringByColumn" property in radgrid. When we are trying to select the filter options, it's not allowing to select with arrow keys. It's accepting only mouse to select filter options. RadCombobox in the same page allowing to select the options with arrow keys but not grid filter. This is an inconsistence behaviour from testers point. Please suggest on this issue.

Please check the attached docs shot for more clarity. The following are the grid properties we have used.

<

 

telerik:RadGrid ID="radGridSavedAlertMaster" runat="server" AutoGenerateColumns="False"

 

 

Width="720px" Style="overflow: hidden" GridLines="None" AllowSorting="True" AllowPaging="True"

 

 

AllowFilteringByColumn="True" PageSize="10" OnItemDataBound="radGridSavedAlertMaster_OnItemDataBound"

 

 

OnItemCommand="radGridSavedAlertMaster_SelectedIndexChanged" OnNeedDataSource="radGridSavedAlertMaster_NeedDataSource"

 

 

OnSortCommand="radGridSavedAlertMaster_SortCommand">

 

Dimo
Telerik team
 answered on 02 Dec 2010
2 answers
88 views
Hello all,

I have the layout below: Because the grid has a RadToolBar on top and Height=100%, a scroll bar appears on the right :(

I want the grid to occupy the all the space below the tool bar. How should I do it?

The same problem I had for the splitter but I tricked with HeightOffset parameter...

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="StartPage.aspx.cs" Inherits="StartPage" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
    <title></title>
    <style type="text/css">
        html, body, form
        {
            height: 100%;
            margin: 0px;
            padding: 0px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="ScriptManager" runat="server" />
    <!-- header and menu -->
    <div style="vertical-align: bottom;">
        <div id="header" style="display: block; clear: both;">
            <div style="float: right; padding-bottom: 10px">
                <asp:LoginName ID="LoginName1" runat="server" />
                <asp:LoginStatus ID="LoginStatus1" runat="server" />
            </div>
            <div style="float: left;">
                LOGO</div>
        </div>
        <telerik:RadMenu ID="RadMenuMain" runat="server" EnableRoundedCorners="true" EnableShadows="true"
            Width="100%">
            <Items>
                <telerik:RadMenuItem Text="Test">
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>
    </div>
    <!-- panes -->
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%" HeightOffset="60">
        <telerik:RadPane ID="LeftPane" runat="server" Width="200px">
            <!-- tree goes here -->
            <telerik:RadTreeView ID="RadTreeViewLeft" runat="Server">
            </telerik:RadTreeView>
        </telerik:RadPane>
        <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Forward" />
        <telerik:RadPane ID="EndPane" runat="server">
            <telerik:RadToolBar ID="RadToolBarMain" runat="server" EnableRoundedCorners="true"
                EnableShadows="true" Width="100%">
                <Items>
                    <telerik:RadToolBarButton Text="Create" Value="Create"/>
                </Items>
            </telerik:RadToolBar>
            <telerik:RadGrid ID="RadGridMain" runat="server" AllowMultiRowSelection="true" AllowSorting="True"
                AutoGenerateColumns="false" AllowPaging="true" AllowCustomPaging="true" PageSize="20"               
                Height="100%">
                <FilterMenu runat="server" Enabled="true">
                </FilterMenu>
                <ClientSettings>
                    <Selecting AllowRowSelect="True" />
                    <Resizing AllowResizeToFit="false" AllowColumnResize="true" ShowRowIndicatorColumn="true" />
                    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                </ClientSettings>               
            </telerik:RadGrid>
        </telerik:RadPane>
    </telerik:RadSplitter>
    </form>
</body>
</html>

Thanks,
Mihai
Mihai
Top achievements
Rank 1
 answered on 02 Dec 2010
1 answer
71 views
Hi,

I have a grid and the Allow Filtering By column  is false by default , i alos have a button on click the filter toggles between on/off.

When i first clicked on the button to turn on the filter row, it successfully turned up but now if i click on the sort icon the filter options are shown in other part of the page and shown as a table

The same is not an issue when the Allow filtering by column is on by default.

Any help is greatly appreciated.

Need this one very urgent

Regards
Abid
Dimo
Telerik team
 answered on 02 Dec 2010
1 answer
286 views

Hi,

I've just updated my telerik controls from 2008 Q2 to newest version available. The only problem I've encountered is, that skins stopped working.

I know, that you've made some changes in how skins work, so I was prepared that I may have some more work to, but the thing is, skins are not working completely.

What I mean is, I've set EnableEmbeddedSkins to false and Skin to my skin name:

1.<telerik:RadGrid runat="server" ID="OrderedLists" ShowHeader="true" AutoGenerateColumns="false"
2.           Skin="PlainGrid" EnableEmbeddedSkins="false" Width="761px">
and in result, I have div with class RadGrid_PlainGrid, which is as expected, but none of elements inside div have "_PlainGrid" class set, so I'm confused, how it's supposed to be working. I would expect, that all other items (e.g. row or altRow) would have classes like "Row_PlainGrid" or "rgRow_PlainGrid" or something like that.

Could you help me and point me, what's not right here? I can of course use rgRow classes, but this will modify all grids on my page, and that's definitely not what I would like to achieve.

Regards,

Pako

Dimo
Telerik team
 answered on 02 Dec 2010
3 answers
62 views
Hi Experts,

I have a issue in my RADGRID, i have a sort column which is desc by default, arrow is showing as downarrow, when i click the column sorting happens but upper arrow is not displaying.

I'm using Grid inside the RadTabStrip..

Please provide solution 
Radoslav
Telerik team
 answered on 02 Dec 2010
4 answers
122 views

Query 1: I am using Hierarchal RadGrid(version: Telerik 2008). The Skin used is “Office2007”. The border line is not displaying properly for the nested rows(please refer the snapshot1) and also the grid background is not shown properly when we select even rows (please refer the snapshot2). Please give us the solution for this.

 

 

Query 2: For the RadGrid, Paging and Sorting is set to true. Suppose if we are in Page 3 and click on column to sort, Sorting will happen but it will remain in the same page(i.e. Page 3). But I want the grid to display Page 1 when sorting happens. Please let me know how to achieve this.

 

Thanks,

Nagendra

Dimo
Telerik team
 answered on 02 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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?