Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
455 views
I'm currently using Q3 2014. I use clientdatasource as my datasource for my radgrid. If i'm editing a record client side, all works. However, when I'm inserting the first record inside the grid rebind() won't fire. I would have to manually refresh the page. 

Is there still some bugs inside Q3 that needs ironing or no one has experienced this problem?

Could anyone assist please?

Thank you.
Konstantin Dikov
Telerik team
 answered on 09 Feb 2015
4 answers
56 views
Hi, i'm having trouble ajaxing a page with details and summary tags on it.

After the ajax postbacks, the detail portion would disappear.

What kind of compatibility with those two tags are the telerik ajax controls?

Thanks,
rad
Maria Ilieva
Telerik team
 answered on 09 Feb 2015
1 answer
325 views
never run itto something more frustrating on telerik controls.  I have a linkbutton right after my RadAutoComplete box, but it always wants to move it under the autocomplete box, no matter if I have in table, div whatever.  I inline-Block works somewhat to get the link button to be on same line as autocomplete box but then it will not center in the div, no matter.  used many differenet display types but it always messes up the autocompete box or moves the linkbutton to next line.  Just a frustrating experience that you cannot override the css on a autocomplete box or that it does this in first place.

This method get it centered on div, but not matter how I try to get the link button to line up with the autocomplete box its messes it up.

.alignSearcher{
    margin:0 auto;
}
 
 
 <div class="table100">
            <h3 style="text-align:center">Add Personnel or Change Time</h3>
            <telerik:RadAutoCompleteBox ID="txtName" runat="server" Width="280px" CssClass="alignSearcher" OnClientRequesting="requesting" DropDownPosition="Automatic" DropDownWidth="270px" AllowCustomEntry="true" EmptyMessage="Enter Last Name First Name to Search"  InputType="Text"
                    HighlightFirstMatch="true" TextSettings-SelectionMode="Single" IsCaseSensitive="false" >
                    <WebServiceSettings Path="../AutoComplete.asmx" Method="GetSrp" />
            </telerik:RadAutoCompleteBox>  <asp:LinkButton ID="lnkSearch" runat="server" CausesValidation="false" Text="Add Personnel"></asp:LinkButton>
        </div>
Magdalena
Telerik team
 answered on 09 Feb 2015
2 answers
103 views
Hi guys,

I have a only one DetailTable in a RadGrid. This DetailTable shows the AddNewRecord button but if I pressed it, the FormTemplate in the EditFormSettings is not showed. In that DetailTable, I have a GridTemplateColumn with a LinkButton to edit the specific row. Using this LinkButton, the FormTemplate is showed successfully but not when I click on the AddNewRecord button.

Where could it be the problem, please?

Thanks a lot in advance.

Cheers.

David Ortega.
Eyup
Telerik team
 answered on 09 Feb 2015
2 answers
54 views
Hi,

I'm starting using Telerik controls and In a WEB page I have a RadGrid control that calls a User Control containing another RadGrid which it wants to be used for manual CRUD operations and it  requires the Parent Key value. In the User Control NeedDataSource event is used to assign/create the DataSource for the RadGrid, retrieving the Parent Key value from DataItem and passing it as parameter, DataBinder.Eval(DataItem, "FailureNotificationId"). The User Control is displayed/shown with the DataSoruce content but after the first postback/request I get an error in NeedDataSource event indicating the parameter (Parent Key value)
was not provided to get the content for the DataSource because the DataItem value was lost.

So, How to keep Parent Key value after postback/request in User Control?
Rhonda
Top achievements
Rank 1
 answered on 08 Feb 2015
17 answers
5.3K+ views
I have implemented a simple application that is similar to your demo for the scheduler.  (http://demos.telerik.com/aspnet-ajax/scheduler/examples/outlook2007/defaultcs.aspx)  It seems to work fine on my local dev box but when I move my code to the server (Windows Server 2008 R2 x64) i get the following error.  I did a few searches and it seems like it is related to response.redirect but not sure as to how I would go about making the changes for this to work without rebuilding the source code.  I believe I am running Q3 2010 of the controls. 

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Timestamp: Mon, 21 Feb 2011 20:07:03 UTC


Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '

<!DOCTYPE html P'.
Line: 6
Char: 84093
Code: 0
URI: http://localhost:8081/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a1f68db6e-ab92-4c56-8744-13e09bf43565%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.3.1317.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a9506cff2-3a86-46c5-b869-6ba1478f3c27%3a16e4e7cd%3aed16cbdc%3af7645509%3a11a04f7e%3a24ee1bba%3af46195d3%3a59462f1%3aa51ee93e%3a1e771326%3a4cacbc31%3a4c8be21a%3a874f8ea2%3a650fdad%3ad40f7d5c%3ae91ff703%3a7666c7ed%3ab68dcd79%3ae330518b%3ac8618e41%3ae4f8f289

Awad
Top achievements
Rank 1
 answered on 08 Feb 2015
2 answers
271 views
Hi , 

I am uploading files to Azure using RadCloudUpload control. once the upload is done i will need to sent a confirmation emails with urls of the file to the user.
The problem here is that, if the file name has space in it then the url will be broken and file cannot be downloaded. is there any way that i can rename the files to remove the space and replace it with '_' or something.

Regards
Rinu
rinu
Top achievements
Rank 1
 answered on 08 Feb 2015
3 answers
96 views
Hey there,

I am struggling to both display my edit form, as well as how to reference and save the data after the user hits submit. I have been searching for a week and have yet to find a solution. I realize that it is likely something in the code-behind, but I am truly at a loss as to where or how I should be referencing the gridcommandeditcolumn. I am pretty new to both ASP and C#, so please refrain from sending me to one of the demo's which I have looked at over and over, and still cannot find the solution.

ASP
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" MasterPageFile="~/EUEMain.master" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphLeftNav" runat="Server">
    <asp:HyperLink ID="AddNew" runat="server" Text="Add Subdivision" />
    <br />
    <asp:HyperLink runat="server" ID="CQ_Tickets" Text="CQ Tickets"></asp:HyperLink>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphContent" runat="Server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <div>
        <telerik:RadGrid ID="RadGrid1" OnPreRender="RadGrid1_PreRender" DataSourceID="SqlDataSource1"
            runat="server" AutoGenerateColumns="False" AllowSorting="True" AllowMultiRowSelection="False"
            AllowPaging="True" PageSize="200" GridLines="None" ShowGroupPanel="true" OnItemCreated="RadGrid1_ItemCreated" OnItemUpdated="RadGrid1_ItemUpdated"
            OnItemCommand="RadGrid1_ItemCommand" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowAutomaticDeletes="True">
            <PagerStyle Mode="NumericPages"></PagerStyle>
            <MasterTableView DataSourceID="SqlDataSource1" DataKeyNames="SubdivisionId" AllowMultiColumnSorting="True"
                GroupLoadMode="Server">
                <NestedViewTemplate>
 
                    <asp:Panel runat="server" ID="InnerContainer" Visible="False"></asp:Panel>
 
                    <telerik:RadTabStrip runat="server" ID="TabStip1" MultiPageID="Multipage1" SelectedIndex="0">
                        <Tabs>
                            <telerik:RadTab runat="server" Text="Details" PageViewID="PageView1">
                            </telerik:RadTab>
                            <telerik:RadTab runat="server" Text="Collection" PageViewID="PageView3">
                            </telerik:RadTab>
                            <telerik:RadTab runat="server" Text="Editing" PageViewID="PageView4">
                            </telerik:RadTab>
                            <telerik:RadTab runat="server" Text="Publishing" PageViewID="PageView5">
                            </telerik:RadTab>
                            <telerik:RadTab runat="server" Text="Testing" PageViewID="PageView6">
                            </telerik:RadTab>
                            <telerik:RadTab runat="server" Text="Production" PageViewID="PageView7">
                            </telerik:RadTab>
                        </Tabs>
                    </telerik:RadTabStrip>
 
                    <telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" RenderSelectedPageOnly="false">
 
                        <telerik:RadPageView runat="server" ID="PageView1">
 
                            <asp:Label ID="Label1" Font-Bold="true" Font-Italic="true" Text='<%# Eval("SubdivisionId") %>'
                                Visible="False" runat="server"></asp:Label>
 
 
                            <telerik:RadGrid runat="server" ID="PrepDetailGrid" DataSourceID="SqlDataSource2" ShowFooter="true"
                                AllowSorting="true" EnableLinqExpressions="false">
                                <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true" DataSourceID="SqlDataSource2"
                                    DataKeyNames="TrackDatabaseId" PageSize="25" HierarchyLoadMode="ServerOnDemand" EditMode="EditForms">
 
                                    <Columns>
                                        <telerik:GridBoundColumn SortExpression="Version" HeaderText="Version" HeaderButtonType="TextButton"
                                            DataField="Version" UniqueName="Version">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="Status" HeaderText="Status" HeaderButtonType="TextButton"
                                            DataField="SubStatus" UniqueName="Status">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="Proposed RSD Date" HeaderText="Proposed RSD Date" HeaderButtonType="TextButton"
                                            DataField="ProposedRSDDate" UniqueName="ProposedRSDDate" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="Collection" HeaderText="Collection" HeaderButtonType="TextButton"
                                            DataField="Collection" UniqueName="Collection">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="Extraction" HeaderText="Extraction" HeaderButtonType="TextButton"
                                            DataField="Extraction" UniqueName="Extraction">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="Editing" HeaderText="Editing" HeaderButtonType="TextButton"
                                            DataField="Editing" UniqueName="Editing">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="Publishing" HeaderText="Publishing" HeaderButtonType="TextButton"
                                            DataField="Publishing" UniqueName="Publishing">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="Pre-Val" HeaderText="Pre-Val" HeaderButtonType="TextButton"
                                            DataField="Pre-Val" UniqueName="Pre-Val">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="V & V" HeaderText="V & V" HeaderButtonType="TextButton"
                                            DataField="VandV" UniqueName="VandV">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="Loco Lab" HeaderText="Loco Lab" HeaderButtonType="TextButton"
                                            DataField="LocoLab" UniqueName="LocoLab">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="End 2 End" HeaderText="End 2 End" HeaderButtonType="TextButton"
                                            DataField="End 2 End" UniqueName="End2End">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="RSD" HeaderText="RSD" HeaderButtonType="TextButton"
                                            DataField="Production" UniqueName="RSD">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="Out of Service" HeaderText="Out of Service" HeaderButtonType="TextButton"
                                            DataField="Out of Service" UniqueName="OutofService">
                                        </telerik:GridBoundColumn>
                                    </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                            <asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:PtcDbModelEntities %>"
                                ProviderName="System.Data.SqlClient" SelectCommand=" Select [t0].[SubdivisionId]
, [t1].[Name] AS Subdivision
, [t0].[TrackDatabaseId]
, [t2].[Description] AS SubStatus
, [t0].[Version] AS Version
, [t0].[ProposedRevenueServiceDate] AS ProposedRSDDate
,
(CASE
  WHEN ( ([t0].[ActualCollectionStartDate] IS NOT NULL)  AND ([t0].[ActualCollectionEndDate] IS NULL) ) THEN 'P'
  WHEN ([t0].[ActualCollectionEndDate] IS NOT NULL) THEN 'C'
 END) AS 'Collection',
 (CASE
    WHEN ( ([t0].[ActualExtractionStartDate] IS NOT NULL)  AND ([t0].[ActualExtractionEndDate] IS NULL)) THEN 'P'
  WHEN ([t0].[ActualExtractionEndDate] IS NOT NULL) THEN 'C'
 END) AS 'Extraction',
 (CASE
    WHEN ( ([t0].[ActualEditingStartDate] IS NOT NULL) AND ([t0].[ActualEditingEndDate] IS NULL)) THEN 'P'
  WHEN ([t0].[ActualEditingEndDate] IS NOT NULL) THEN 'C'
 END) AS 'Editing',
                                    (CASE
    WHEN ( ([t0].[ActualEditingEndDate] IS NOT NULL) AND ([t0].[ActualVandVStartDate] IS NULL)) THEN 'P'
  WHEN ( ([t0].[ActualEditingEndDate] IS NOT NULL) AND ([t0].[ActualVandVStartDate] IS NOT NULL) ) THEN 'C'
 END) AS 'Publishing',
 (CASE
    WHEN ( ([t0].[ActualPreValidationStartDate] IS NOT NULL) AND ([t0].[ActualPreValidationEndDate] IS NULL)) THEN 'P'
  WHEN ([t0].[ActualPreValidationEndDate] IS NOT NULL) THEN 'C'
 END) AS 'Pre-Val',
 (CASE
    WHEN ( ([t0].[ActualVandVStartDate] IS NOT NULL) AND ([t0].[ActualVandVEndDate] IS NULL)) THEN 'P'
  WHEN ([t0].[ActualVandVEndDate] IS NOT NULL) THEN 'C'
 END) AS 'VandV',
 (CASE
    WHEN ( ([t0].[ActualLabTestingStartDate] IS NOT NULL) AND ([t0].[ActualLabTestingEndDate] IS NULL)) THEN 'P'
  WHEN ([t0].[ActualLabTestingEndDate] IS NOT NULL) THEN 'C'
 END) AS 'LocoLab',
 (CASE
    WHEN ( ([t0].[ActualE2ERunStartDate] IS NOT NULL) AND ([t0].[ActualE2ERunEndDate] IS NULL)) THEN 'P'
  WHEN ([t0].[ActualE2ERunEndDate] IS NOT NULL) THEN 'C'
 END) AS 'End 2 End',
 (CASE
    WHEN ( ([t0].[ActualRevenueServiceDate] IS NOT NULL) AND ([t0].[ActualRevenueServiceDate] IS NULL)) THEN 'P'
  WHEN ([t0].[ActualRevenueServiceDate] IS NOT NULL) THEN 'C'
 END) AS 'Production'
  From [PtcDbTracker].[dbo].[TrackDatabase] as [t0]
  JOIN [PTCDbTracker].[dbo].[Subdivision] as [t1] ON [t0].[SubdivisionId]=[t1].[SubdivisionId]
  Join [PTCDbTracker].[dbo].[Status] as [t2] ON [t0].[StatusId]=[t2].[StatusId]
                                    where [t0].[SubdivisionId] = @SubdivisionId "
                                runat="server">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="Label1" Name="SubdivisionId" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </telerik:RadPageView>
 
                        <telerik:RadPageView runat="server" ID="RadPageView3">
                            <asp:Label ID="Label2" Font-Bold="true" Font-Italic="true" Text='<%# Eval("SubdivisionId") %>'
                                Visible="False" runat="server"></asp:Label>
 
                            <telerik:RadGrid runat="server" ID="CollectionTab" DataSourceID="SqlDataSource3" ShowFooter="true"
                                AllowSorting="true" EnableLinqExpressions="false" AllowAutomaticUpdates="True" AllowAutomaticInserts="True" AllowAutomaticDeletes="True">
 
                                <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true" CommandItemDisplay="None"
                                    DataKeyNames="TrackDatabaseId" PageSize="25" HierarchyLoadMode="ServerOnDemand" DataSourceID="SqlDataSource3" EditMode="EditForms">
 
                                    <Columns>
                                        <telerik:GridEditCommandColumn />
                                        <telerik:GridBoundColumn SortExpression="Version" HeaderText="Version" HeaderButtonType="TextButton"
                                            DataField="Version" UniqueName="Version">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="Status" HeaderText="Status" HeaderButtonType="TextButton"
                                            DataField="SubStatus" UniqueName="Status">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="PropCollStart" HeaderText="Proposed Collection Start" HeaderButtonType="TextButton"
                                            DataField="PropCollStart" UniqueName="PropCollStart" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="ActCollStart" HeaderText="Actual Collection Start" HeaderButtonType="TextButton"
                                            DataField="ActCollStart" UniqueName="ActCollStart" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="PropCollEnd" HeaderText="Proposed Collection End" HeaderButtonType="TextButton"
                                            DataField="PropCollEnd" UniqueName="PropCollEnd" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="ActCollEnd" HeaderText="Actual Collection End" HeaderButtonType="TextButton"
                                            DataField="ActCollEnd" UniqueName="ActCollEnd" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="PropExtStart" HeaderText="Proposed Extraction Start" HeaderButtonType="TextButton"
                                            DataField="PropExtStart" UniqueName="PropExtStart" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="ActCollStart" HeaderText="Actual Extraction Start" HeaderButtonType="TextButton"
                                            DataField="ActCollStart" UniqueName="ActCollStart" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="PropExtEnd" HeaderText="Proposed Extraction End" HeaderButtonType="TextButton"
                                            DataField="PropExtEnd" UniqueName="PropExtEnd" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="ActExtEnd" HeaderText="Actual Extraction End" HeaderButtonType="TextButton"
                                            DataField="ActExtEnd" UniqueName="ActExtEnd" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}">
                                        </telerik:GridBoundColumn>
 
                                    </Columns>
 
                                    <EditFormSettings EditFormType="Template">
                                        <FormTemplate>
                                            <table id="table1">
                                                <tr>
                                                    <td>Collection Details</td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <table id="Table2">
                                                            <tr>
                                                                <td> </td>
                                                                <td>Proposed</td>
                                                                <td>Actual</td>
                                                            </tr>
                                                            <tr>
                                                                <td>Collection Start Date</td>
                                                                <td>
                                                                    <telerik:RadDatePicker runat="server" ID="PropCollStart" SelectedDate='<%#Eval("PropCollStart") %>'></telerik:RadDatePicker>
                                                                </td>
                                                                <td>
                                                                    <telerik:RadDatePicker runat="server" ID="ActCollStart" SelectedDate='<%#Eval("ActCollStart") %>'></telerik:RadDatePicker>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>Collection End Date</td>
                                                                <td>
                                                                    <telerik:RadDatePicker runat="server" ID="PropCollEnd" SelectedDate='<%#Eval("PropCollEnd") %>'></telerik:RadDatePicker>
                                                                </td>
                                                                <td>
                                                                    <telerik:RadDatePicker runat="server" ID="ActCollEnd" SelectedDate='<%#Eval("ActCollEnd") %>'></telerik:RadDatePicker>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>Extraction Start Date</td>
                                                                <td>
                                                                    <telerik:RadDatePicker runat="server" ID="PropExtStart" SelectedDate='<%#Eval("PropExtStart") %>'></telerik:RadDatePicker>
                                                                </td>
                                                                <td>
                                                                    <telerik:RadDatePicker runat="server" ID="ActExtStart" SelectedDate='<%#Eval("ActExtStart") %>'></telerik:RadDatePicker>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>Extraction End Date</td>
                                                                <td>
                                                                    <telerik:RadDatePicker runat="server" ID="PropExtEnd" SelectedDate='<%#Eval("PropExtEnd") %>'></telerik:RadDatePicker>
                                                                </td>
                                                                <td>
                                                                    <telerik:RadDatePicker runat="server" ID="ActExtEnd" SelectedDate='<%#Eval("ActExtEnd") %>'></telerik:RadDatePicker>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                                                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button
                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                        CommandName="Cancel"></asp:Button>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </FormTemplate>
                                    </EditFormSettings>
                                </MasterTableView>
                            </telerik:RadGrid>
                            <asp:SqlDataSource ID="SqlDataSource3" ConnectionString="<%$ ConnectionStrings:PtcDbModelEntities %>" runat="server"
                                ProviderName="System.Data.SqlClient" SelectCommand=" SELECT [t0].[SubdivisionId]
                                                                                    , [t1].[Name] AS Subdivision
                                                                                    , [t0].[TrackDatabaseId] as TrackDatabaseId
                                                                                    , [t2].[Description] AS SubStatus
                                                                                    , [t0].[Version] AS Version
                                                                                    , [t0].[ProposedCollectionStartDate] AS PropCollStart
                                                                                    , [t0].[ActualCollectionStartDate] AS ActCollStart
                                                                                    , [t0].[ProposedCollectionEndDate] AS PropCollEnd
                                                                                    , [t0].[ActualCollectionEndDate] AS ActCollEnd
                                                                                    , [t0].[ProposedExtractionStartDate] AS PropExtStart
                                                                                    , [t0].[ActualExtractionStartDate] AS ActExtStart
                                                                                    , [t0].[ProposedExtractionEndDate] AS PropExtEnd
                                                                                    , [t0].[ActualExtractionEndDate] AS ActExtEnd
                                                                                      From [PtcDbTracker].[dbo].[TrackDatabase] as [t0]
                                                                                      JOIN [PTCDbTracker].[dbo].[Subdivision] as [t1] ON [t0].[SubdivisionId]=[t1].[SubdivisionId]
                                                                                      Join [PTCDbTracker].[dbo].[Status] as [t2] ON [t0].[StatusId]=[t2].[StatusId]
                                                                                       where [t0].[SubdivisionId] = @SubdivisionId "
                                UpdateCommand="UPDATE [dbo].[TrackDatabase] SET [ProposedCollectionStartDate] = @PropCollStart
                                , [ActualCollectionStartDate] = @ActCollStart
                                , [ProposedCollectionEndDate] = @PropCollEnd
                                , [ActualCollectionEndDate] = @ActCollEnd
                                , [ProposedExtractionStartDate] = @PropExtStart
                                , [ActualExtractionStartDate] = @ActExtStart
                                , [ProposedExtractionEndDate] = @PropExtEnd
                                , [ActualExtractionEndDate] = @  ActExtEnd
                                WHERE [TrackDatabaseId] = @TrackDatabaseId">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="Label2" Name="SubdivisionId" />
                                </SelectParameters>
                                <UpdateParameters>
                                    <asp:Parameter Name="ProposedCollectionStartDate" Type="DateTime"></asp:Parameter>
                                    <asp:Parameter Name="ActualCollectionStartDate" Type="DateTime"></asp:Parameter>
                                    <asp:Parameter Name="ProposedCollectionEndDate" Type="DateTime"></asp:Parameter>
                                    <asp:Parameter Name="ActualCollectionEndDate" Type="DateTime"></asp:Parameter>
                                    <asp:Parameter Name="ProposedExtractionStartDate" Type="DateTime"></asp:Parameter>
                                    <asp:Parameter Name="ActualExtractionStartDate" Type="DateTime"></asp:Parameter>
                                    <asp:Parameter Name="ProposedExtractionEndDate" Type="DateTime"></asp:Parameter>
                                    <asp:Parameter Name="ActualExtractionEndDate" Type="DateTime"></asp:Parameter>
                                </UpdateParameters>
                            </asp:SqlDataSource>
                        </telerik:RadPageView>
 
                    </telerik:RadMultiPage>
 
                </NestedViewTemplate>
                <Columns>
                    <telerik:GridBoundColumn SortExpression="Subdivision" HeaderText="Subdivision" HeaderButtonType="TextButton"
                        DataField="Subdivision" UniqueName="Subdivision">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Priority" HeaderText="Priority" HeaderButtonType="TextButton"
                        DataField="Priority" UniqueName="Priority">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Mileage" HeaderText="Mileage" HeaderButtonType="TextButton"
                        DataField="Mileage" UniqueName="Mileage">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Sub Status" HeaderText="Sub Status" HeaderButtonType="TextButton" DataField="SubStatus" UniqueName="SubStatus">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings AllowDragToGroup="true">
            </ClientSettings>
        </telerik:RadGrid>
    </div>
 
    <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:PtcDbModelEntities %>"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT [t0].[Name] as Subdivision
,[t0].[Mileage] AS Mileage
,[t0].[SubdivisionId]
,[t0].[Priority] AS Priority
,[t1].[Description] AS SubStatus
  FROM [PtcDbTracker].[dbo].[Subdivision] as [t0]
  INNER JOIN [PtcDbTracker].[dbo].[Status] as [t1] on [t0].[StatusId]=[t1].[StatusId]
            Order By Subdivision"
        runat="server"></asp:SqlDataSource>
</asp:Content>

And the CodeBehind C#
using System;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using GridCommandEventArgs = Telerik.Web.UI.GridCommandEventArgs;
using GridItemEventArgs = Telerik.Web.UI.GridItemEventArgs;
 
public partial class Default2 : BNSF.EUECommonApplication.EUEBasePage
{
    public String PageName { get; set; }
 
    protected void Page_Load(object sender, EventArgs e)
    {
    }
 
    protected void RadGrid1_PreRender(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            RadGrid1.MasterTableView.Items[0].Expanded = false;
            RadGrid1.MasterTableView.Items[0].ChildItem.FindControl("InnerContainer").Visible = true;
        }
    }
 
    protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
    {
 
        if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem)
        {
            ((GridDataItem)e.Item).ChildItem.FindControl("InnerContainer").Visible =
                !e.Item.Expanded;
        }
        if (e.Item is GridNestedViewItem && e.Item.OwnerTableView.ID == "RadGrid1")
        {
            GridNestedViewItem nestedItem = (GridNestedViewItem) e.Item;
            Panel panel = (Panel) nestedItem.FindControl("InnerContainer");
            panel.Visible = ((GridNestedViewItem) e.Item).ParentItem.Expanded;
        }
    }
 
    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridNestedViewItem)
        {
            e.Item.FindControl("InnerContainer").Visible = ((GridNestedViewItem)e.Item).ParentItem.Expanded;
        }
    }
 
    protected void RadGrid1_ItemUpdated(object sender, GridUpdatedEventArgs e)
    {
 
    }
 
}
Matthew
Top achievements
Rank 1
 answered on 07 Feb 2015
2 answers
85 views
Hello,

When i alter the number of results per page on the grid, the grid rebinds and the appropriate number of results are shown, but if the number of results is less than the max page size, the results per page drop-down is no longer shown. I cannot change it back to a smaller result size view after this.

I was able to see this issue on demo here too:

http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/column-row-resize-reorder/defaultcs.aspx

Is there a fix for this?

Thanks,
Meera
Meera
Top achievements
Rank 1
 answered on 07 Feb 2015
1 answer
86 views
Hi,

I'm having a problem with the Edit Form. When I add a stylesheet link on a webform, the Edit Form text boxes do not show the borders and the overall size of the edit form is smaller. Even if the css file is empty. As soon as I remove the link, the edit form displays correctly.

<link rel="stylesheet" type="text/css" href="~/Content/TreeListPage.css" />--%>

<EditFormSettings EditFormType="AutoGenerated">
</EditFormSettings>
<ValidationSettings CommandsToValidate="PerformInsert,Update" />


 
james
Top achievements
Rank 1
 answered on 06 Feb 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?