Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
152 views
hi
i create a grid with item template columns and edit template in batch mode. i want to bind this grid in client side. I have a web service and return a xml string to my java script function . and i add empty function for OnCommand client event .but when i bind the grid it have so many empty rows and if i clear that master Table  in java script is null and i can not bind the grid

what should i do?


English is not my original language so i sorry for my poor language.
thanks
Ali
Top achievements
Rank 1
 answered on 15 Mar 2014
6 answers
566 views
Hi Telerik's team,

I am trying build a radgrid where data should to be grouped in two levels. How can I do this using GroupHeaderTemplate ?
Below is my radgrid. It is grouped by code Primary Key from data. But I need to group then inside a parent group setting header group like a template.

Yet, I just  grouped by ID. How can I group by ParentGroupId too?

<telerik:RadGrid ID="radgrid" runat="server" AutoGenerateColumns="false"
Skin="Silk" Width="90%" Visible="false" AllowMultiRowSelection="true"
AllowSorting="true" AllowPaging="true" ShowStatusBar="true" EnableLinqExpressions="false"
OnItemDataBound="radgrid_ItemDataBound" OnDataBound="radgrid_DataBound"
        CellSpacing="0" GridLines="None" OnPageIndexChanged="radgrid_PageIndexChanged" >
            
<ClientSettings AllowDragToGroup="true" EnableRowHoverStyle="true" AllowColumnsReorder="true"
           Selecting-AllowRowSelect="true" ClientEvents-OnRowDeselected="UnCheckGroup"
  ReorderColumnsOnClient="true" ColumnsReorderMethod="Reorder">
       <Animation AllowColumnReorderAnimation="true" AllowColumnRevertAnimation="true"></Animation>
    </ClientSettings>
    <MasterTableView DataSourceID="ods" DataKeyNames="ID" GroupLoadMode="Client"
             GroupsDefaultExpanded="false" GroupHeaderItemStyle-HorizontalAlign="Left">
            <GroupHeaderTemplate>
          <asp:Label runat="server" ID="Label1" ForeColor="#2F4F4F" Text="Id: "></asp:Label>
          <asp:Label runat="server"
                ID="Label3" Text='<%# (((GridGroupHeaderItem)Container).AggregatesValues["ID"]) %>'></asp:Label>
                       <asp:Label runat="server" ID="Label2" ForeColor="#2F4F4F" Text="Date: "></asp:Label>
           <asp:Label runat="server"  
        ID="Label6" Text='<%# (((GridGroupHeaderItem)Container).AggregatesValues["Date"]) %>'></asp:Label>
           <asp:Label runat="server" ID="Label7" ForeColor="#2F4F4F" Text="Price: $"></asp:Label>
           <asp:Label runat="server"
        ID="Label8" Text='<%# (((GridGroupHeaderItem)Container).AggregatesValues["Price"]) %>'></asp:Label>
       </GroupHeaderTemplate>
       <Columns>
           <telerik:GridBoundColumn DataField="ProductName" UniqueName="ProductName"
HeaderText="Product">
                 <HeaderStyle HorizontalAlign="Center" />
                 <HeaderStyle HorizontalAlign="Center" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Amount" UniqueName="Amount" HeaderText="Amount">
                        <HeaderStyle HorizontalAlign="Center" />
                        <HeaderStyle HorizontalAlign="Center" />
            </telerik:GridBoundColumn>
       </Columns>
       <GroupByExpressions>
             <telerik:GridGroupByExpression>
                   <GroupByFields>
                         <telerik:GridGroupByField FieldName="ParentGroupID"/>
                    </GroupByFields>
            </GroupByExpressions>
            <telerik:GridGroupByExpression>
                    <SelectFields>
                         <telerik:GridGroupByField FieldName="ID"/>
                    </SelectFields>
                    <SelectFields>
                         <telerik:GridGroupByField FieldName="Date"/>
                    </SelectFields>
                    <SelectFields>
                         <telerik:GridGroupByField FieldName="Price"  FormatString="{0:C}"/>
                    </SelectFields>
                    <GroupByFields>
                         <telerik:GridGroupByField FieldName="ID"/>
                    </GroupByFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
         </MasterTableView>
   </telerik:RadGrid>
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="ListItems"
                            TypeName="...my namespace ..."></asp:ObjectDataSource>

Rafael
Top achievements
Rank 1
 answered on 14 Mar 2014
4 answers
381 views
Can I modify the Display text value of DataField value of GridBoundColumn ?
I have "4-code"
and need to display just "Code"


Seems like there should be in-house property to handle this rather than in the data retrieval or the subsequent JavaScript display.
Dan
Top achievements
Rank 1
 answered on 14 Mar 2014
8 answers
111 views
Hello,

I created a simple RadGrid with a NestedViewTemplate and a SqlDataSource1, no code behind involve.  When I click
 expand link and show the static text inside the NestedViewTemplate, I get javascript runtime error:

Unhandled exception at line 6, column 74203 in http://localhost:49573/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:d618f02c-bda7-40f1-bb64-308e08f719c3:ea597d4b:b25378d2;Telerik.Web.UI:en-US:ac331549-681c-4402-9fb7-09ec3c579ee8:16e4e7cd:f7645509:22a6274a:ed16cbdc:58366029:24ee1bba:f46195d3:2003d0b8:88144a7a:1e771326:aa288e2d

0x800a138f - JavaScript runtime error: Unable to set property 'control' of undefined or null reference


<
telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <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>
        <script type="text/javascript">
            //Put your JavaScript code here.
        </script>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        </telerik:RadAjaxManager>
        <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" AllowPaging="true">
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="ProductID" DataSourceID="SqlDataSource1">
                <Columns>
                    <telerik:GridBoundColumn DataField="ProductID" DataType="System.Int32" FilterControlAltText="Filter ProductID column" HeaderText="ProductID" ReadOnly="True" SortExpression="ProductID" UniqueName="ProductID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column" HeaderText="Name" SortExpression="Name" UniqueName="Name">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ProductNumber" FilterControlAltText="Filter ProductNumber column" HeaderText="ProductNumber" SortExpression="ProductNumber" UniqueName="ProductNumber">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Size" FilterControlAltText="Filter Size column" HeaderText="Size" SortExpression="Size" UniqueName="Size">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Color" FilterControlAltText="Filter Color column" HeaderText="Color" SortExpression="Color" UniqueName="Color">
                    </telerik:GridBoundColumn>
                    <telerik:GridCheckBoxColumn DataField="MakeFlag" DataType="System.Boolean" FilterControlAltText="Filter MakeFlag column" HeaderText="MakeFlag" SortExpression="MakeFlag" UniqueName="MakeFlag">
                    </telerik:GridCheckBoxColumn>
                </Columns>
                <NestedViewTemplate>
                    dssfaddfssd
                </NestedViewTemplate>
            </MasterTableView>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:AdventureWorks2008R2ConnectionString %>" SelectCommand="SELECT [ProductID], [Name], [ProductNumber], [Size], [Color], [MakeFlag] FROM [Production].[Product]"></asp:SqlDataSource>

If above code added to a RadControlWebApp project, it is running fine.  But if it added to a existing ASP.NET
 Web Forms Application. Also, I made sure that Telerik.Web.UI and Skins are added to references and web.config

What am I missing here to make NestedViewTemplate to work? It stopped working in Q3 2013 after upgraded.

Thanks in advance
Sam
David Hoffman
Top achievements
Rank 1
 answered on 14 Mar 2014
6 answers
143 views
hi
i have 3 table:  1- Master table    2- Detail table(0)    3- Detail table(1)
when i want update detailTable(0) i can:

int ParentId = RadGrid1.MasterTableView.DataKeyValues[

int.Parse(e.Item.OwnerTableView.ParentItem.ItemIndexHierarchical)]["Id"].ToString();

but when i want update DetailTable(1) i can not use this code :

 

int ParentId = RadGrid1.MasterTableView.DetailTables[0].DataKeyValues[int.Parse(e.Item.OwnerTableView.ParentItem.ItemIndexHierarchical)][

"Id"].ToString();
    // erro ocured and i can not use :((

maybe my method completly is uncurrect.

 

Jeffrey Sanford
Top achievements
Rank 2
 answered on 14 Mar 2014
3 answers
103 views
Hi All,

I've implemented the following functionality in my RadGrid:
http://www.telerik.com/help/aspnet-ajax/grid-google-like-filtering.html

It works well, but it appears to auto-fill the entire value when a user would like to select a subset.  For example, if we have days of the week in the ComboBox the user would like to be able to type "sday" and get Wednesday and Thursday back.  Is this at all possible?

Thanks,
Mark
Mark
Top achievements
Rank 1
 answered on 14 Mar 2014
2 answers
67 views
Hi All,

One of the Users noted that the input cursor in RadComboBoxes is Italicized, as in it appears like this: /

Is there a way to straighten it?

Thanks,
Mark
Mark
Top achievements
Rank 1
 answered on 14 Mar 2014
2 answers
114 views
Hi All,

I have a RadGrid with Sqldatasource.  Is there anyway to implement some sort of auditing mechanism?  Perhaps a shadow copy of the modified table that contains a list of the changes and all legacy instances of the rows?

Thanks,
Mark
Mark
Top achievements
Rank 1
 answered on 14 Mar 2014
8 answers
397 views

Hello all

I am wondering if anybody might be familiar with the cause of an issue I am struggling with: I have a radCaptcha that validates fine on the initial postback, e.g., validating as False if the code is incorrect or missing, but then if the user fails to enter a code on the second attempt, the radCaptcha always validates as True, even after both the radCaptcha Validate method, and then the Page.Validate(<validation group>) method are called. Important to notice here that the validation works as expected after the first postback, it is just afterwards, when the user is required to enter a new code on a second attempt. It appears to me that the radCaptcha's validator does not reset itself, even if IsValid is manually reset to false at the end of the code-behind processing during the first postback. After the second postback, IsValid determinedly is stuck on True, no matter what I do, which makes me suspicious that this is a bug.

To complicate matters, the radCaptcha control in question is inside an ASCX user control, which is declared in the ASP markup, rather than loaded dynamically, and there are two validation groups on the page in question. Is there any known workaround for this sort of issue, and where should I be calling different methods? At the moment I have radCatcha.Validate and Page.Validate(<group>) in the code-behind handler for the submit button, and additionally, after I realised there was a problem, I have been experimenting with use of radCaptcha.DataBind and switching its Enabled and IsValid methods on and off manually in the Control Load handler, but nothing seems to make any difference. I could do with a pointer in the right direction to troubleshoot this problem. Where would be the recommended places to call different methods in this sort of scenario?

Thanks if you can assist.

Regards

Slav
Telerik team
 answered on 14 Mar 2014
2 answers
104 views
Hello Friend,
                     I am having one problem with using agenda view for scheduler. It is not appearing in the selected view options list. Do I have to do some extra setting or some extra downloads of latest version. Design code for my scheduler is as follows.

          <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>



<telerik:RadScheduler runat="server" ID="rSchRoomBooking" Skin="Metro" Height="450" OverflowBehavior="Auto" 
                            OnClientAppointmentWebServiceInserting="OnClientAppointmentWebServiceInserting"
                            OnClientNavigationComplete="OnClientNavigationComplete"
                            OnClientAppointmentsPopulating="OnClientAppointmentsPopulating"
                            SelectedView="WeekView" ShowFooter="false" SelectedDate="2012-01-31" TimeZoneOffset="03:00:00"
                            DayStartTime="08:00:00" DayEndTime="21:00:00" FirstDayOfWeek="Monday" LastDayOfWeek="Friday"
                            EnableDescriptionField="true" AppointmentStyleMode="Default">                            
                            <AdvancedForm Modal="true"></AdvancedForm>
                            <TimelineView UserSelectable="false"></TimelineView>    
                            <TimeSlotContextMenuSettings EnableDefault="true" />
                            <AppointmentContextMenuSettings EnableDefault="true" />
                            <Localization HeaderWeek="Work week" />
                        </telerik:RadScheduler>
Goraksh
Top achievements
Rank 1
 answered on 14 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?