Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
146 views
ASPX Code
<telerik:RadGrid ID="rgReceiptDTL" runat="server"
    AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
    AllowAutomaticUpdates="True" AutoGenerateColumns="False"
    AllowMultiRowEdit="true" MasterTableView-EditMode="EditForms"
    Height="300px" MasterTableView-Dir="<%$ Resources:SystemResource, HTMLDirectionality %>"
    Width="98%" GroupPanelPosition="Top" DataSourceID="SDSReceiptDTL">
 
    <MasterTableView CommandItemDisplay="None"
        DataKeyNames="IDNo"
        GridLines="None" HorizontalAlign="NotSet" NoMasterRecordsText="<%$ Resources:Grid , NoMasterRecordsText %>" TableLayout="Fixed" Width="100%" DataSourceID="SDSReceiptDTL">
        <CommandItemSettings ExportToPdfText="Export to Pdf" />
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
        </ExpandCollapseColumn>
 
        <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" Wrap="True" />
        <Columns>
            <telerik:GridTemplateColumn EditFormHeaderTextFormat="" DataField="ItemNo" meta:resourcekey="ItemNo"
                UniqueName="ItemNo">
                <HeaderStyle Width="85" />
                <ItemTemplate>
                    <telerik:RadTextBox SkinID="Medium"
                        Text='<%#Eval("ItemName")%>'
                        runat="server" ID="rtbItemName">
                    </telerik:RadTextBox>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn meta:resourcekey="ItemName">
                <HeaderStyle Width="130" />
            </telerik:GridTemplateColumn>
 
            <telerik:GridTemplateColumn meta:resourcekey="UnitPrice" DataField="UnitPrice">
                <HeaderStyle Width="130" />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn meta:resourcekey="PurchDate"
                DataField="PurchDate">
                <HeaderStyle Width="130" />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn meta:resourcekey="DepreciateRatio" DataField="DepreciateRatio">
                <HeaderStyle Width="130" />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn meta:resourcekey="originalFactorNo" DataField="originalFactorNo">
                <HeaderStyle Width="130" />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn DataField="Qty" meta:resourcekey="Qty"
                UniqueName="Qty">
                <HeaderStyle Width="130" />
            </telerik:GridTemplateColumn>
            <%--                          <telerik:GridTemplateColumn DataField="Total" meta:resourcekey="Total"
                UniqueName="Total">
            </telerik:GridTemplateColumn>--%>
            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"
                ConfirmDialogType="RadWindow" ConfirmText="<%$ Resources:Grid ,ConfirmDelete %>" ConfirmTitle="<%$ Resources:Grid ,Delete %>" FilterImageUrl="~\Design\TelerikSkins\Grid\Filter.gif" ImageUrl="~\Design\TelerikSkins\Grid\Delete.gif" SortAscImageUrl="~\Design\TelerikSkins\Grid\SortAsc.gif" SortDescImageUrl="~\Design\TelerikSkins\Grid\SortDesc.gif" Text="<%$ Resources:Grid ,Delete %>" UniqueName="column1">
                <HeaderStyle Width="50px" />
                <ItemStyle Width="50px" />
            </telerik:GridButtonColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <FormTemplate>
                <table style="width: 100%;">
                    <tr>
                        <td style="width: 85px">
                            <asp:Label runat="server" ID="lblItemNo" Text='<%#Eval("ItemNo")%>'></asp:Label>
                        </td>
                        <td style="width: 130px">
                            <telerik:RadTextBox SkinID="Medium"
                                Text='<%#Eval("ItemName")%>' AutoPostBack="true"
                                 OnTextChanged="rtbItemName_TextChanged"
                                runat="server" ID="rtbItemName">
                            </telerik:RadTextBox></td>
                        <td style="width: 130px">
                            <asp:Label runat="server" ID="lblUnitPrice" Text='<%#Eval("UnitPrice")%>'></asp:Label></td>
                        <td style="width: 130px">
                            <telerik:RadDatePicker SkinID="Medium"
                                DbSelectedDate='<%#Eval("PurchDate")%>'
                                runat="server" ID="rdpPurchDate">
                            </telerik:RadDatePicker>
                        </td>
                        <td style="width: 130px">
                            <telerik:RadNumericTextBox runat="server"
                                DbValue='<%#Eval("DepreciateRatio")%>'
                                ID="rntbDepreciateRatio"
                                SkinID="NumberMedium">
                            </telerik:RadNumericTextBox></td>
                        <td style="width: 130px">
                            <telerik:RadTextBox SkinID="Medium" runat="server" ID="rtboriginalFactorNo"></telerik:RadTextBox></td>
                        <td style="width: 130px">
                            <telerik:RadNumericTextBox runat="server" ID="rntbQTY" DbValue='<%#Eval("Qty")%>'
                                MaxValue='<%#Eval("Qty")%>'
                                SkinID="NumberMedium">
                            </telerik:RadNumericTextBox>
                        </td>
                        <td style="width: 50px;">
                            <asp:ImageButton runat="server" ID="btnDelete" ToolTip="Delete"
                                   CommandName="Delete"
                                ImageUrl="~\Design\TelerikSkins\Grid\Delete.gif" />
                        </td>
 
                    </tr>
                </table>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <ClientSettings>
        <Scrolling AllowScroll="True" SaveScrollPosition="False" ScrollHeight="200px" UseStaticHeaders="True" />
    </ClientSettings>
 
</telerik:RadGrid>
 
<cc1:SessionDataSource ID="SDSReceiptDTL"
    runat="server" ClearSessionOnInitialLoad="True"
    ConflictDetection="CompareAllValues"
    ConnectionString="<%$ ConnectionStrings:ApplicationServices %>"
    SelectCommand="EXEC [Inv_ReceiptDtlSP] 'rtvLPODTL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,@LPONO,@LPOYear"
    UpdateCommand="EXEC [Inv_ReceiptDtlSP] 'Save'"
    DeleteCommand="EXEC [Inv_ReceiptDtlSP] 'Delete'"
    InsertCommand="EXEC [Inv_ReceiptDtlSP] 'Save'"
    PrimaryKeyFields="IDNo"
    SessionKey="System.Web.UI.Page_SDSReceiptDTL">
    <SelectParameters>
        <asp:ControlParameter ControlID="hdnLPONO" Name="LPONO" PropertyName="Value" />
        <asp:ControlParameter ControlID="hdnLPOYear" Name="LPOYear" PropertyName="Value" />
    </SelectParameters>
</cc1:SessionDataSource>
<asp:HiddenField runat="server" ID="hdnLPONO" />
<asp:HiddenField runat="server" ID="hdnLPOYear" />

VB Code
Private Sub rgReceiptDTL_ItemCommand(sender As Object, e As GridCommandEventArgs) Handles rgReceiptDTL.ItemCommand
 
    If e.CommandName = RadGrid.DeleteCommandName Then
 
    End If
End Sub
Private Sub rgReceiptDTL_ItemDataBound(sender As Object, e As GridItemEventArgs) Handles rgReceiptDTL.ItemDataBound
    rgReceiptDTL.EditIndexes.Add(e.Item.ItemIndex)
    e.Item.Edit = True
End Sub
 
Protected Sub rgReceiptDTL_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles rgReceiptDTL.PreRender
    If (rgReceiptDTL.EditItems.Count > 0) Then
        For Each item As GridDataItem In rgReceiptDTL.MasterTableView.Items
            item.Visible = False
        Next
    End If
End Sub

in this code im working on edited item only the data item always not visible 

i face a probem when delete item from Grid every thing user added will be deleted because of rebind

how can i update all items in session data source when delete an item ?

THXX 
Alharith
Top achievements
Rank 1
 answered on 11 Feb 2015
2 answers
171 views
Hi Konstantin,

I mentioned in the other post that I'd have uses for the RadGrid with Batch Editing.  Well I'm pushing the bounds as normal and have hit a snag.

I have a formview control and within it a RadGrid.  I want to save the content of the RadGrid at the same time that the user saves the data from the FormView.

One way that i can think of doing this is to save the radgrid data and then in the ajax callback call a function that will then save the formview data.  An obvious issue here is that the child data is being saved before the parent data.  This will need a database work around but is achievable.

Is my solution described there the best or is there some way that I could get the grid data saved from within the formview save events?

Best Regards

Jon
Jon
Top achievements
Rank 1
 answered on 11 Feb 2015
3 answers
225 views
Support,

I have the following RadComboBox defined.  It is populated on Page_Load().  Each item in the RadComboBox has a checkbox, because of the CheckBoxes="true" setting. 

<telerik:RadComboBox ID="cmboTest" runat="server" AllowCustomText="true" CheckBoxes="true" ShowDropDownOnTextboxClick="false" Skin="Outlook" Width="520" Height="250" MarkFirstMatch="False" NoWrap="true" OffsetX="-2" OffsetY="-2">
</telerik:RadComboBox>

Each time an item is checked, the text displayed in the textbox changes to match the current selection(s).  Since I'm allowing custom text, I don't want my custom text wiped out by the checked items.  If no custom text has been entered, I'd like to customize the message that gets displayed in the textbox.

Is there a way to accomplish these requirements?

Thanks,
Rob
Nencho
Telerik team
 answered on 11 Feb 2015
1 answer
304 views
Hello, we are trying to deploy the 5 star rating question via tablets for onsite surveys. The stars are way too small to use on touch for a diverse population base (old people with fat fingers). Is there an easy way to do this? Has this been developed before? Also, the current image quality of the stars is TERRIBLE, so I'm assuming new stars are required. Thx for the help!!!
Marin Bratanov
Telerik team
 answered on 11 Feb 2015
3 answers
156 views
I am building a page which contains a Grid. The user can expand and collapse groups as they want. I want to be able to preserve the group states (expanded/collapsed) on the client.

What I tried was to hook up to the 'onRequestStart' event and try to save which groups are expanded and which are collapsed. Then on 'onRequestEnd' I would just go through the list again and expand/collapse groups as needed.

Is there an elegant way to achieve this or do I have to manually crawl through each element and set it's expanded states?

​
Eyup
Telerik team
 answered on 11 Feb 2015
1 answer
200 views
Hi,
Our company is in the process evaluating Telerik control to buy your product. We were testing some key functionalities in your trial version. One of the main requirement we came across is Sorting(either by drag n drop or by move up down arrow). We tried with the move up and down arrow by we couldn't get it work.
I followed one of the blog post http://www.telerik.com/forums/radgrid-rows-sorting-move-up-and-move-down-button . Im using move up down arrow method in RADGRID Hierarchy Grid(Three level). I have attached the screen shot of what I'm trying to do. I need to able to sort with in each hierarchy list. Please let me know if your product can do this function.

Thanks
Merchant
Konstantin Dikov
Telerik team
 answered on 11 Feb 2015
3 answers
249 views
Support,

I have 2 datepicker controls.  Both controls have no date selected by default.  After datepicker #1 has a date selected, the requirement is that datepicker #2's textbox is still blank, but when the user clicks on the calendar icon, the calendar popup has the same date highlighted as the selected date of datepicker #1.

I've tried setting the .SelectedDate property of datepicker #2 and it sets the highlighted calendar date (which is correct), but the textbox also displays the date and I need the textbox to continue to stay blank until a date is actually selected from the calendar popup.

Is what I'm asking possible?  I've searched the forums high and low, but can't find my answer.  I thought for sure somebody has ran into this recently. 

I'm using v2014.1.225.45.

Thanks,
Rob
Maria Ilieva
Telerik team
 answered on 11 Feb 2015
1 answer
191 views
Hi,

I'm new to  kendo and i was trying to display a treeView using the ASP MVC approach so i followed the exemple you provided :

var employees = from e in db.Employees
                            where (id.HasValue ? e.ReportsTo == id : e.ReportsTo == null)
                            select new
                            {
                                id = e.id,
                                Name = e.FirstName + " " + e.LastName,
                                hasChildren = e.Employees1.Any()
                            };

But what is the code inside the Employees1 property ? It should be a recursive method somehere ? Please provide the content of the model or give me more details to how make it work

Thanks for the help
Daniel
Telerik team
 answered on 11 Feb 2015
5 answers
206 views
Hello Team,

I am working on one web application, in which we need to bind radgrid client side, we have not created any data service.

there in one aspx page inside application, that returns data in one json object, i tried the same as below:
<ClientSettings>
            <DataBinding Location="https://locallhost/LoadWidgetsAsync.aspx" ResponseType="JSON">
                <DataService TableName="Table1" />
            </DataBinding>
 </ClientSettings>


It is not showing data in grid, can anyone help me out with binding radgrid without service?

Thanks in advance,
Ruchi Patel
Ruchi
Top achievements
Rank 1
 answered on 11 Feb 2015
3 answers
322 views
Hello, 
I am trying to display a tabStrip with many tabs. Following this link : http://demos.telerik.com/aspnet-ajax/tabstrip/examples/functionality/scrolling-and-multi-row-tabs/defaultcs.aspx?show-source=true is not helpfull for me because my tabs are not placed on a single line (See pict 1), they are placed on many lines (See pict2) and when i scroll, the radTab shows blank space(See pict 3).
This is my piece of code i am using :

<telerik:RadSplitter ID="sPC" runat="server" Orientation="Horizontal" CssClass="hiddenOverflow">
    <telerik:RadPane ID="pPC" runat="server" >
          <telerik:RadTabStrip ID="tsPC"  Width="800px" runat="server" ScrollButtonsPosition="Middle" Height="26px"  AutoPostBack="False" ScrollChildren="true" >
            <Tabs>
                <telerik:RadTab Text="Tab11"></telerik:RadTab>
                <telerik:RadTab Text="Tab12"></telerik:RadTab>
                <telerik:RadTab Text="Tab13"></telerik:RadTab>
                <telerik:RadTab Text="Tab14"></telerik:RadTab>
                <telerik:RadTab Text="Tab15"></telerik:RadTab>
                <telerik:RadTab Text="Tab16"></telerik:RadTab>
                <telerik:RadTab Text="Tab17"></telerik:RadTab>
                <telerik:RadTab Text="Tab18"></telerik:RadTab>
                <telerik:RadTab Text="Tab19"></telerik:RadTab>
                <telerik:RadTab Text="Tab111"></telerik:RadTab>
                <telerik:RadTab Text="Tab112"></telerik:RadTab>
                <telerik:RadTab Text="Tab113"></telerik:RadTab>
                <telerik:RadTab Text="Tab114"></telerik:RadTab>
                <telerik:RadTab Text="Tab115"></telerik:RadTab>
                <telerik:RadTab Text="Tab116"></telerik:RadTab>
                <telerik:RadTab Text="Tab18"></telerik:RadTab>
                <telerik:RadTab Text="Tab19"></telerik:RadTab>
                <telerik:RadTab Text="Tab111"></telerik:RadTab>
                <telerik:RadTab Text="Tab112"></telerik:RadTab>
                <telerik:RadTab Text="Tab113"></telerik:RadTab>
                <telerik:RadTab Text="Tab114"></telerik:RadTab>
                <telerik:RadTab Text="Tab115"></telerik:RadTab>
                <telerik:RadTab Text="Tab116"></telerik:RadTab>
                <telerik:RadTab Text="Tab18"></telerik:RadTab>
                <telerik:RadTab Text="Tab19"></telerik:RadTab>
                <telerik:RadTab Text="Tab111"></telerik:RadTab>
                <telerik:RadTab Text="Tab112"></telerik:RadTab>
                <telerik:RadTab Text="Tab113"></telerik:RadTab>
                <telerik:RadTab Text="Tab114"></telerik:RadTab>
                <telerik:RadTab Text="Tab115"></telerik:RadTab>
                <telerik:RadTab Text="Tab116"></telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
</telerik:RadPane>
</telerik:RadSplitter>

Any ides?
Thank you !
Christian
Top achievements
Rank 1
 answered on 11 Feb 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?