Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
203 views
I have 3 dropdowncolumns in this radGrid.
The first one "Pnum" is working well, I can select the value and save it, and the saved value is visible in the grid when not in edit mode. If I open the record in edit mode the dropdown stays on the selected value unless I select a new value.
The other two dropdowncolumns are giving me problems. The selected value is saved to the db but is not visible when the grid is not in edit mode and if I open the record in edit mode after having saved it,  the dropdown value is on the default value.

How can I have the two dropdowncolumns "minutes" and "hours" acting like the "Pnum" column? Why they are acting in a different way?

I mean after selecting the value and update the record have the value shown in the grid. 

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" Culture="it-IT" DataSourceID="SqlDataSource1" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowPaging="True" Skin="Outlook" CellSpacing="-1" GridLines="Both">
                       <ExportSettings>
                           <Pdf PageWidth="">
                           </Pdf>
                       </ExportSettings>
                       <ClientSettings>
                           <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                       </ClientSettings>
                       <MasterTableView DataKeyNames="Id" DataSourceID="SqlDataSource1" CommandItemDisplay="Top">
                           <Columns>
                               <telerik:GridEditCommandColumn ButtonType="ImageButton">
                                   <HeaderStyle Width="35px" />
                               </telerik:GridEditCommandColumn>
                               <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" FilterControlAltText="Filter Id column" HeaderText="Id" ReadOnly="True" SortExpression="Id" UniqueName="Id">
                                   <ColumnValidationSettings>
                                       <ModelErrorMessage Text="" />
                                   </ColumnValidationSettings>
                                   <HeaderStyle Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridDateTimeColumn DataField="Date" DataType="System.DateTime" FilterControlAltText="Filter Date column" HeaderText="Date" SortExpression="Date" UniqueName="Date" DataFormatString="{0:dd/MM/yyyy}">
                                   <ColumnValidationSettings>
                                       <ModelErrorMessage Text="" />
                                   </ColumnValidationSettings>
                                   <HeaderStyle Width="80px" />
                               </telerik:GridDateTimeColumn>
                               <telerik:GridDropDownColumn DataField="Pnum" DataSourceID="SqlDataSource2" ListTextField="Pnum" ListValueField="Pnum"  FilterControlAltText="Filter column column" UniqueName="column" HeaderText="P-Number">
                                   <ColumnValidationSettings>
                                       <ModelErrorMessage Text="" />
                                   </ColumnValidationSettings>
                                   <HeaderStyle Width="80px" />
                               </telerik:GridDropDownColumn>
 
                               <telerik:GridBoundColumn DataField="WorkedTime" DataType="System.TimeSpan" FilterControlAltText="Filter WorkedTime column" HeaderText="Worked Time" SortExpression="WorkedTime" UniqueName="WorkedTime">
                                   <ColumnValidationSettings>
                                       <ModelErrorMessage Text="" />
                                   </ColumnValidationSettings>
                                   <HeaderStyle Width="90px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn DataField="Week" FilterControlAltText="Filter Week column" HeaderText="Week" SortExpression="Week" UniqueName="Week">
                                   <ColumnValidationSettings>
                                       <ModelErrorMessage Text="" />
                                   </ColumnValidationSettings>
                                   <HeaderStyle Width="60px" />
                               </telerik:GridBoundColumn>
 
 
                               <telerik:GridDropDownColumn DataField="minutes" DataSourceID="SqlDataSource3" ListTextField="minutes" ListValueField="minutes"  FilterControlAltText="Filter minutes column" UniqueName="minutes" HeaderText="Minutes" DataType="System.Int16">
                                   <ColumnValidationSettings>
                                       <ModelErrorMessage Text="" />
                                   </ColumnValidationSettings>
                                   <HeaderStyle Width="80px" />
                               </telerik:GridDropDownColumn>
                               <telerik:GridDropDownColumn DataField="hours" DataSourceID="SqlDataSource4" ListTextField="hours" ListValueField="hours"  FilterControlAltText="Filter hours column" UniqueName="hours" HeaderText="Hours" DataType="System.Int16">
                                   <ColumnValidationSettings>
                                       <ModelErrorMessage Text="" />
                                   </ColumnValidationSettings>
                                   <HeaderStyle Width="80px" />
                               </telerik:GridDropDownColumn>
                               <telerik:GridBoundColumn  DataField="Note" FilterControlAltText="Filter Note column" HeaderText="Note" SortExpression="Note" UniqueName="Note">
                                   <ColumnValidationSettings>
                                       <ModelErrorMessage Text="" />
                                   </ColumnValidationSettings>
                               </telerik:GridBoundColumn>
                               <telerik:GridButtonColumn ButtonType="ImageButton" Text="Delete" CommandName="Delete" FilterControlAltText="Filter column1 column" ConfirmDialogType="RadWindow" ConfirmText="Do you really want to delete this project and all its content?" UniqueName="column1">
                                   <HeaderStyle Width="30px" />
                               </telerik:GridButtonColumn>
                           </Columns>
                           <EditFormSettings>
                               <EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
                           </EditFormSettings>
                       </MasterTableView>
                   </telerik:RadGrid>
Kostadin
Telerik team
 answered on 15 Apr 2014
0 answers
139 views

Hi,
   I am getting telerik versioning exception in IE 10 browser.
   And i had attached the snapshot of that exception.So please help me.
        Telerik version  =  2014.1.225.40
Manish
Top achievements
Rank 2
 asked on 15 Apr 2014
5 answers
170 views
Hello, is there an example of http://demos.telerik.com/aspnet-ajax/editor/examples/comments/defaultcs.aspx somewhere with multiple users? I am not understanding how to integrate multiple users. Specifically, why does the dialog "Comment" appear in editable mode for some comments when I click on them like this:



And then for other user's changes, it shows as a read-only box? The thing that I'm not able to understand is when does it show as an editable box, and when does it show as read-only text?

Our scenario is that, we need a system that will support comments from several different users, all in the same editor instance. Only the comments that the given logged in user had made in our system should be editable. The rest should not be. Is that supported, and if so how, and also is there a demo available that you can share with me?  


























Ianko
Telerik team
 answered on 15 Apr 2014
5 answers
306 views
Hi,

I am using the Q3 1114 2013 version of your AJAX for ASP .NET controls.
I am using the Rad Grid and have added a checkbox to each Group Header in the grid.  I do that in ItemDataBound...

The users can then check the checkbox and click a Save button that I've put in the CommandItemTemplate.

I have code in the ItemCommand event handler that should loop through all of the GroupHeaders, and get the state of that checkbox (along with other information I've put in the GroupHeader).

MY PROBLEM:
When my code loops through the GroupHeaders of the grid (in the ItemCommand event), the DataRowView is Nothing.
My code is as follows (which is basically the same code that works when I create the checkbox in ItemDataBound):

For Each headerItem As GridGroupHeaderItem In theRadGrid.MasterTableView.GetItems(GridItemType.GroupHeader)
  Dim groupDataRow As DataRowView = CType(headerItem.DataItem, DataRowView)
Dim chk As CheckBox = headerItem.FindControl(GetGroupHeaderParentCheckboxName(groupDataRow("ParentAppType").ToString(), groupDataRow("ObjectTypeID").ToString(), groupDataRow("ParentID").ToString()))
  If (chk.Checked) Then
  selectedItemString += String.Concat(groupDataRow("ObjectTypeID").ToString(), KEY_VALUE_DELIMETER, groupDataRow("ParentID").ToString(), SETTING_PAIR_DELIMETER)
  End If
Next

In the code above, the groupDataRow variable is Nothing.  Can you tell me what I'm doing wrong?

I have other code in this same method that loops through all of the data rows in the grid and gets information from the data rows, and it works fine.

Why can I not access the DataRowView of the GroupHeader?

Thanks,
Michael
Kostadin
Telerik team
 answered on 15 Apr 2014
3 answers
243 views
Hello, i need help to export data from a RadGrid to an Excel File template. This file already has format, has freeze rows, formulas in some cells...

I can't find a property or option that allow me to define a template to use in the export action.
Is there any way to do this?

Thank you!
Daniel
Telerik team
 answered on 15 Apr 2014
1 answer
115 views
When I use the client side API to set the title and URL of my page to be shared, my page title gets URL encoded:

1.function OnSocialButtonClicking(sender, args) {
2.var url =  "http://www.telerik.com/"
3.var title = "test test test test test test"
4.args.set_stringsToShare(url, title)
5.}


the tweet message comes out URL encoded: "test%20test%20test%20test%20test%20test"

is there a way around this? It happens on pinterest, facebook too
Danail Vasilev
Telerik team
 answered on 15 Apr 2014
1 answer
192 views
Hi,

I use a RadFilter to filter my RadGrid and i want to filter my radSearchBox with the same filter apply on this RadGrid.

Someone can help me?

ty
Plamen
Telerik team
 answered on 15 Apr 2014
6 answers
273 views
Hi,

I use RadSearchBox with a LinqDataSource and when I write text in uppercase, it can't find the data in lowercase.

I don't find any setting in radSearchBox to resolve this issue.

ty

Plamen
Telerik team
 answered on 15 Apr 2014
3 answers
177 views
I have a simple RadTreeList containing a BoundColumn and a TemplateColumn of type dropdownlist. I've populated the DDL dynamically for each row. The treelist displays perfectly, but when I select a value from the dropdown list on one or more rows, then collapse/expand the tree node, the values selected in the DDLs are lost. I think it is probably due to data binding.   

The intent is for the user to a select a value from the DDL for each row in the TreeList then save the values to the database once they are finished.  I want them to be able to expand/collapse tree nodes during this process without losing the values.  I've searched through the forum and read much of the documentation online, but I would appreciate some insight into the best approach for solving this issue.  Thanks in advance. 
 
 
<telerik:RadTreeList ID="RadTreeList1" runat="server" 
    AutoGenerateColumns="False" 
    DataKeyNames="Node" ParentDataKeyNames="ParentNode" OnItemDataBound="RadTreeList1_ItemDataBound" 
    OnItemCommand="RadTreeList1_ItemCommand" EditMode="InPlace" OnItemCreated="RadTreeList1_ItemCreated"
    ViewStateMode="Enabled">
     
    <Columns>
      <telerik:TreeListBoundColumn DataField="Description" UniqueName="Description" HeaderStyle-Width="500px"
        </telerik:TreeListBoundColumn
        <telerik:TreeListTemplateColumn UniqueName="Response"
            <ItemTemplate
                <asp:DropDownList ID="ddl" runat="server">
                </asp:DropDownList>
            </ItemTemplate>
      </telerik:TreeListTemplateColumn>
    </Columns>
    </telerik:RadTreeList>
Pavlina
Telerik team
 answered on 15 Apr 2014
8 answers
144 views
I have some hyperlinks in the footer of the radgrid.
I am running IE 9. They show up fine in IE9 but when i run in compatibility mode they are no longer visible. This might be a problem for our users who are running older versions of IE.

Below is my grid declaration:
<telerik:radgrid id="rgBalances" runat="server" cellpadding="0" cellspacing="0" borderwidth="0"
    gridlines="None" allowpaging="True" allowsorting="True" datasourceid="_dataSrcBalances"
    pagesize="15" enablesortingandpagingcallbacks="false" autogeneratecolumns="false"
    allowautomaticupdates="false" allowautomaticinserts="false" enablelinqexpressions="false"
    allowfilteringbycolumn="false" onprerender="rgBalances_PreRender" onitemcommand="rgBalances_ItemCommand"
    allowautomaticdeletes="false" skin="MBen" enableembeddedskins="false" onitemdatabound="rgBalances_ItemDataBound"
    onitemcreated="rgBalances_ItemCreated" allowcustompaging="false" width="100%"
    imagespath="../../App_Themes/MBen/Grid" showfooter="true">
    <MasterTableView TableLayout="Fixed" HierarchyDefaultExpanded="true" CommandItemDisplay="Top"
        Name="DivisionBalance" DataKeyNames="DivisionID" EnableNoRecordsTemplate="true"
        PagerStyle-AlwaysVisible="true">
        <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" ShowExportToExcelButton="true"
            ExportToExcelText="" ExportToCsvText="" ExportToPdfText="" ExportToWordText=""
            ShowExportToPdfButton="true" ShowExportToWordButton="true" ShowExportToCsvButton="true" />
        <NoRecordsTemplate>
            <div style="color: Red; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif;
                font-weight: bold">
                <br />
                Please select a plan to show activity for the specific plan.
            </div>
        </NoRecordsTemplate>
        <HeaderStyle HorizontalAlign="Center" />
        <ItemStyle HorizontalAlign="Right" />
        <AlternatingItemStyle HorizontalAlign="Right" />
        <Columns>
            <telerik:GridTemplateColumn UniqueName="AccountName" HeaderText="Source" SortExpression="AccountName"
                HeaderStyle-Width="15%" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
                <ItemTemplate>
                    <%# Eval("AccountName")%>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:Label ID="lblTotal" runat="server" Text="Total:" ForeColor="White" Font-Bold="true"></asp:Label>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="BeginBalance" HeaderText="Begin Balance"
                ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" HeaderStyle-Width="11%"
                SortExpression="BeginBalanceDollars" AllowFiltering="false">
                <ItemTemplate>
                    <asp:HyperLink ID="linkBeginBalance" runat="server" Text='<%# Eval("BeginBalanceDollars")%>'></asp:HyperLink>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:HyperLink ID="linkBeginBalanceTotal" runat="server"></asp:HyperLink>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="Contributions" HeaderText="Contributions"
                ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" SortExpression="ContributionDollars"
                HeaderStyle-Width="11%" AllowFiltering="false">
                <ItemTemplate>
                    <asp:HyperLink ID="linkContributions" runat="server" Text='<%# Eval("ContributionDollars")%>'></asp:HyperLink>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:HyperLink ID="linkContributionsTotal" runat="server"></asp:HyperLink>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="Distributions" HeaderText="Distributions"
                ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" SortExpression="DistributionDollars"
                HeaderStyle-Width="11%" AllowFiltering="false">
                <ItemTemplate>
                    <asp:HyperLink ID="linkDistributions" runat="server" Text='<%# Eval("DistributionDollars")%>'></asp:HyperLink>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:HyperLink ID="linkDistributionsTotal" runat="server"></asp:HyperLink>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="Forfeitures" HeaderText="Forfeitures" ItemStyle-HorizontalAlign="Right"
                FooterStyle-HorizontalAlign="Right" SortExpression="ForfeitureDollars" HeaderStyle-Width="10%"
                AllowFiltering="false">
                <ItemTemplate>
                    <asp:HyperLink ID="linkForfeitures" runat="server" Text='<%# Eval("ForfeitureDollars")%>'></asp:HyperLink>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:HyperLink ID="linkForfeituresTotal" runat="server"></asp:HyperLink>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="Transfers" HeaderText="Transfers" ItemStyle-HorizontalAlign="Right"
                FooterStyle-HorizontalAlign="Right" SortExpression="TransferDollars" HeaderStyle-Width="10%"
                AllowFiltering="false">
                <ItemTemplate>
                    <asp:HyperLink ID="linkTransfers" runat="server" Text='<%# Eval("TransferDollars")%>'></asp:HyperLink>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:HyperLink ID="linkTransfersTotal" runat="server"></asp:HyperLink>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="Earnings" HeaderText="Earnings" ItemStyle-HorizontalAlign="Right"
                FooterStyle-HorizontalAlign="Right" SortExpression="Earnings" HeaderStyle-Width="10%"
                AllowFiltering="false">
                <ItemTemplate>
                    <asp:HyperLink ID="linkEarnings" runat="server" Text='<%# Eval("Earnings")%>'></asp:HyperLink>
                    <div style="left: -100px;">
                        <asp:Panel ID="earningsDiv" runat="server" CssClass="hide">
                            <asp:Literal ID="earningsDivText" runat="server" /></asp:Panel>
                    </div>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:HyperLink ID="linkEarningsTotal" runat="server"></asp:HyperLink>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="EndBalance" HeaderText="End Balance" ItemStyle-HorizontalAlign="Right"
                FooterStyle-HorizontalAlign="Right" HeaderStyle-Width="11%" SortExpression="EndBalanceDollars"
                AllowFiltering="false">
                <ItemTemplate>
                    <asp:HyperLink ID="linkEndBalance" runat="server" Text='<%# Eval("EndBalanceDollars")%>'></asp:HyperLink>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:HyperLink ID="linkEndBalanceTotal" runat="server"></asp:HyperLink>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="EndBalanceVested" HeaderText="Vested End Balance"
                ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" HeaderStyle-Width="11%"
                SortExpression="EndBalanceVestedDollars" AllowFiltering="false">
                <ItemTemplate>
                    <asp:HyperLink ID="linkEndBalanceVested" runat="server" Text='<%# Eval("EndBalanceVestedDollars")%>'></asp:HyperLink>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:HyperLink ID="linkEndBalanceVestedGrandTotal" runat="server"></asp:HyperLink>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn UniqueName="Dividend" DataField="DividendDollars" Display="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Appreciation" DataField="AppreciationDollars"
                Display="false">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <ExportSettings ExportOnlyData="true" IgnorePaging="true" FileName="Activity" OpenInNewWindow="true">
        <Pdf PaperSize="A4" PageLeftMargin="5px" PageRightMargin="5px" PageWidth="297mm"
            PageHeight="210mm" />
    </ExportSettings>
</telerik:radgrid>
MBEN
Top achievements
Rank 2
Veteran
 answered on 14 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?