Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
72 views
Is it possible to populate a combo box purely on the client, without any SqlDataSource or web service call?

For example, I have a list box with two RadCombBox objects in the ItemTemplate.   The first combo box is called "Type" and contains two hard-coded values ("Fruit" and "Color").   The second combo box is called "Values" and it needs to both support autocomplete and load on demand of only values appropriate for the selected value in the first box.  The possible values for the second box is a small, well-defined list that won't change often, so I don't want to incur a call to the database.

So, if the user selects "Fruit" from the first box, and then starts to type into the second box, I only want to show the user the fruit values (apple, banana, orange, and so on) that match their filter. (E.g., if they type "or" then I should only show "orange.")

On the other hand, if the user selects "Color" from the first combobox, and then starts typing into the second box, I only want to show the user the color values (red, green, blue, etc.) that match their filter. (E.g., if they type "re" then I should only show "red".)

I see from the docs how to do this with a DB or web service call;  the question is could I do this against a fixed list in the client page, or by binding to the results of some JavaScript method, or by using some kind of prefix in the items list of the second box, so I don't have to call out over the wire to a data server?


Thanks
KN425000
Top achievements
Rank 1
 answered on 25 Jul 2011
2 answers
107 views
Is is possible to double click on a given date, and rather than opening the day, direct the user to a new page and include the date clicked as part of the querystring?

I have a simple calendar that I would like a user to double click a date, then the user is directed to a form that will be submitted to a database. I would like to populate a lable on the form with the date the user double clicked.

Thank you in advance.
Allan
Top achievements
Rank 2
 answered on 25 Jul 2011
0 answers
70 views
I'm using a RadListview that is bound to a sql database in my application.  When I edit items in that listview, I want several field to appear as radComboBoxes rather than text fields.  I want the combo box to be selected on the data that is in the field, but allow the user to select any other option.  When the user clicks save on the listview edit, I want to update the database with the selected value of the combo box.

I'm sure there are several code examples out there, but I just can't seem to be able to locate one.  

Any help would be greatly appreciated!!!


Dave
Dave
Top achievements
Rank 1
 asked on 25 Jul 2011
1 answer
109 views
I have an issue about raddatetime picker box border color.For some info; we use Webblue theme and version 2010, 3, 1109, 40 telerik dlls in our project.
When we refresh page,first of all,box border colors become black.(look attach : raddatepicker1).But after the refresh finished they looks like with normal colors (like attach : raddatepicker2)

Can you help me about this issue?
Thanks.
Galin
Telerik team
 answered on 25 Jul 2011
1 answer
44 views
hi...
      Paging is not working without onneeddatasource. how can solve this problem ??
Pavlina
Telerik team
 answered on 25 Jul 2011
2 answers
82 views
Right now, I have a column with the standard three sort options:  ascending -> descending -> natural.

My client wants either an ascending sort or natural, because in this context a descending sort would potentially confuse the issue.

Is there a "simple" configuration option for this?
 
I would prefer not to get into custom sorts or client-side programming.
Tomica
Top achievements
Rank 2
 answered on 25 Jul 2011
1 answer
425 views
  I have a RadGrid with a DetailsTable... Inside the details table, I have a template column with a button.. I need to know which row in the original Grid does the details table of the clicked button belong too.... any ideas???

 (When I click Button2, I need to know which row in the original RadGrid that button belongs to)
   
<telerik:RadGrid ID="RadGrid1" AutoGenerateColumns="False" runat="server" AllowPaging="True" PageSize="10"
               Width="60%" GridLines="None" Skin="WebBlue"
               OnNeedDataSource="RadGrid1_NeedDataSource"
               OnItemCommand="RadGrid1_ItemCommand"
               OnDetailTableDataBind="RadGrid1_DetailTableDataBind"
               OnPrerender="RadGrid1_PreRender" >
               <MasterTableView ShowHeader="false" Width="100%">
                    <DetailTables>
                        <telerik:GridTableView Name="DetailsTable1" Width="100%"
                           ShowHeader="false" AutoGenerateColumns="false">
                            <Columns>
                              <telerik:GridTemplateColumn UniqueName="Column2">
                                   <ItemTemplate>
                                           <telerik:RadButton ID="Button2"
                                               runat="server"
                                               Text="Button2"
                                               OnClick="Button2_Click" />
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>
                            </Columns>
                        </telerik:GridTableView>
                    </DetailTables>
 
                   <Columns>
                      <telerik:GridTemplateColumn UniqueName="TemplateColumn">
                           <ItemTemplate>
                                           <telerik:RadButton ID="Button1"
                                               runat="server"
                                               Text="Button1"
                                               OnClick="Button1_Click" />
                           </ItemTemplate>
                       </telerik:GridTemplateColumn>
                   </Columns>
               </MasterTableView>
    </telerik:RadGrid>


  Thnx! Gavin
Genti
Telerik team
 answered on 25 Jul 2011
7 answers
126 views
I'm trying to reproduce the behavior of a pre-existing grid which opens up only 2 columns for updating:  a date and a quantity
if either of them is changed the back end database is updated
I used a template with a label in the ItemTemplate and a RadNumericTextBox in the EditItemTemplate and triggered the update on the quantity changed event for the quantity
but... then the automatic aggregate didn't work - and there is a lot of filtering possible
my kluge is to have 2 quantity columns - one read only for the total and the other a template with only the EditItemTemplate

is there a way to update the quantity with only one column and still aggregate without a lot of extra code?
Elliott
Top achievements
Rank 2
 answered on 25 Jul 2011
3 answers
107 views
I have a page with a tooltip on it defined thus...
<telerik:RadToolTipManager runat="server"
                           ID="RadToolTipManager1"
                           OffsetX="0"
                           OffsetY="0"
                           ShowDelay="5000"
                           HideDelay="500"
                           Width="320"
                           Height="210"
                           Animation="None"
                           Text="Loading..."
                           RelativeTo="Element"
                           OnAjaxUpdate="RadToolTipManager1_AjaxUpdate"
                           OnClientBeforeShow="FolderTreeToolTipBeforeShow"
                           EnableShadow="true"
                           HideEvent="LeaveTargetAndToolTip"
                           AutoCloseDelay="10000" />
It doesn't matter what I set ShowDelay to, the tooltip shows as soon as I hover over it.

Pourquoi?

-- 
Stuart

Svetlina Anati
Telerik team
 answered on 25 Jul 2011
1 answer
100 views
I have a Rating control in a FormView which is populated using a SQLDataSource.

<asp:FormView ID="FormView2" runat="server" DataKeyNames="IDProjectsMaster" 
    DataSourceID="sds_MasterProjects">
                                    <EditItemTemplate>
                                        <table cellpadding="3" cellspacing="0" style="width: 100%">
                                            <tr>
                                                <td class="tbltd" style="width: 110px">
                                                    Project Subject:</td>
                                                <td>
                                                    <asp:TextBox ID="SubjectTextBox" runat="server" 
                                                        Text='<%# Bind("Subject") %>' Width="400px" />
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                                        ControlToValidate="SubjectTextBox" ErrorMessage="*" Font-Bold="True" 
                                                        Font-Size="Medium" ForeColor="#FF3300"></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tbltd" style="width: 110px">
                                                    Enter Date:</td>
                                                <td>
                                                    <asp:Label ID="EnterDateLabel" runat="server" 
                                                        Text='<%# Bind("EnterDate","{0:d}") %>' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tbltd" style="width: 110px">
                                                    Completion Date:</td>
                                                <td>
                                                    <telerik:RadDatePicker ID="RadDatePicker2" Runat="server" 
                                                        Culture="English (United States)" DbSelectedDate='<%# Bind("ResolutionDate") %>'>
                                                        <Calendar ID="Calendar2" Runat="server" UseColumnHeadersAsSelectors="False" 
                                                            UseRowHeadersAsSelectors="False" ViewSelectorText="x">
                                                        </Calendar>
                                                        <DatePopupButton HoverImageUrl="" ImageUrl="" />
                                                        <DateInput ID="DateInput2" Runat="server" DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy">
                                                        </DateInput>
                                                    </telerik:RadDatePicker>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tbltd" style="width: 110px">
                                                    Technician: </td>
                                                <td>
                                                    <asp:DropDownList ID="ddl_IDAssignedTech" runat="server" 
                                                        AppendDataBoundItems="True" DataSourceID="sds_Technician" 
                                                        DataTextField="FullName" DataValueField="ActiveDirID" 
                                                        Text='<%# Bind("IDAssignedTech") %>'>
                                                        <asp:ListItem Text="Select" Value="0" />
                                                        <asp:ListItem Text="Team" Value="1" />
                                                    </asp:DropDownList>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                                        ControlToValidate="ddl_IDAssignedTech" ErrorMessage="*" Font-Bold="True" 
                                                        Font-Size="Medium" ForeColor="#FF3300"></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tbltd" style="width: 110px">
                                                    Priority:</td>
                                                <td>
                                                    <telerik:RadRating ID="RadRating1" Runat="server" ReadOnly="True" 
                                                        Skin="WebBlue" Value='<%# Eval("Priority") %>'>
                                                    </telerik:RadRating>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tbltd" style="width: 110px">
                                                    Project Deadline:</td>
                                                <td>
                                                    <telerik:RadDatePicker ID="RadDatePicker3" Runat="server" 
                                                        Culture="English (United States)" 
                                                        DbSelectedDate='<%# Bind("ResolutionDeadline") %>'>
                                                        <Calendar ID="Calendar3" Runat="server" UseColumnHeadersAsSelectors="False" 
                                                            UseRowHeadersAsSelectors="False" ViewSelectorText="x">
                                                        </Calendar>
                                                        <DatePopupButton HoverImageUrl="" ImageUrl="" />
                                                        <DateInput ID="DateInput3" Runat="server" DateFormat="M/d/yyyy" 
                                                            DisplayDateFormat="M/d/yyyy">
                                                        </DateInput>
                                                    </telerik:RadDatePicker>
                                                </td>
                                            </tr>
                                        </table>
                                        <h2>
                                            Project Details:</h2>
                                        <table cellpadding="0" cellspacing="0" style="width: 100%">
                                            <tr>
                                                <td style="width: 101px">
                                                     </td>
                                                <td>
                                                    <asp:TextBox ID="tbx_Projects" runat="server" Text='<%# Bind("MasterProject") %>' 
                                                        Height="100px" TextMode="MultiLine" Width="625px" />
                                                </td>
                                            </tr>
                                        </table>
                                        <h2>
                                            Comments:</h2>
                                        <table cellpadding="0" cellspacing="0" style="width: 100%">
                                            <tr>
                                                <td style="width: 101px">
                                                     </td>
                                                <td>
                                                    <asp:TextBox ID="tbx_Comment" runat="server" Text='<%# Bind("Comment") %>' 
                                                        Height="100px" TextMode="MultiLine" Width="625px" />
                                                </td>
                                            </tr>
                                        </table>
                                        <h2>
                                            Notes:</h2>
                                        <table cellpadding="0" cellspacing="0" style="width: 100%">
                                            <tr>
                                                <td style="width: 101px">
                                                     </td>
                                                <td>
                                                    <asp:TextBox ID="tbx_Notes" runat="server" Text='<%# Bind("Notes") %>' 
                                                        Height="100px" TextMode="MultiLine" Width="625px" />
                                                </td>
                                            </tr>
                                        </table>
                                        <br />
                                        <asp:Button ID="UpdateButton" runat="server" CausesValidation="True" 
                                            CommandName="Update" Text="Update" />
                                         <asp:Button ID="UpdateCancelButton" runat="server" 
                                            CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                                    </EditItemTemplate>
    <ItemTemplate>
                                        <table cellpadding="0" cellspacing="0" style="width: 100%">
                                            <tr>
                                                <td>
                                                     </td>
                                            </tr>
                                        </table>
                                        <table cellpadding="3" cellspacing="0" style="width: 100%">
                                            <tr>
                                                <td class="tbltd" style="width: 112px">
                                                    Project Subject:</td>
                                                <td>
                                                  
                                                    <asp:Label ID="SubjectLabel" runat="server" style="font-weight: 700" 
                                                        Text='<%# Bind("Subject") %>' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tbltd" style="width: 112px">
                                                    Enter Date:</td>
                                                <td>
                                                    <asp:Label ID="EnterDateLabel" runat="server" 
                                                        Text='<%# Bind("EnterDate","{0:d}") %>' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tbltd" style="width: 112px">
                                                    Deadline Date:</td>
                                                <td>
                                                    <asp:Label ID="lbl_DealineDate" runat="server" 
                                                        Text='<%# Bind("ResolutionDeadline","{0:d}") %>' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tbltd" style="width: 112px">
                                                    Completion Date:</td>
                                                <td>
                                                    <asp:Label ID="ResolutionDateLabel" runat="server" 
                                                        Text='<%# Bind("ResolutionDate","{0:d}")  %>' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tbltd" style="width: 112px">
                                                    Technician: </td>
                                                <td>
                                                    <asp:Label ID="FullNameLabel" runat="server" 
                                                        Text='<%# Bind("FullName") %>' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tbltd" style="width: 112px">
                                                    Priority:</td>
                                                <td>
                                                    <telerik:RadRating ID="RadRating1" Runat="server" ReadOnly="True" 
                                                        Skin="WebBlue" Value='<%# Eval("Priority") %>'>
                                                    </telerik:RadRating>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tbltd" style="width: 112px">
                                                    Project Deadline:</td>
                                                <td>
                                                    <asp:Label ID="ResolutionDeadlineLabel" runat="server" 
                                                        Text='<%# Bind("ResolutionDeadline","{0:d}")  %>' />
                                                </td>
                                            </tr>
                                        </table>
                                        <h2>
                                            Project Details:</h2>
                                        <table cellpadding="0" cellspacing="0" style="width: 800px">
                                            <tr>
                                                <td style="width: 101px">
                                                     </td>
                                                <td>
                                                    <asp:Label ID="ProjectLabel" runat="server" Text='<%# Eval("MasterProject").ToString().Replace(Environment.NewLine,"<br />") %>' />
                                                </td>
                                            </tr>
                                        </table>
                                        <h2>
                                            Comments:</h2>
                                        <table cellpadding="0" cellspacing="0" style="width: 800px">
                                            <tr>
                                                <td style="width: 101px">
                                                     </td>
                                                <td>
                                                    <asp:Label ID="CommentLabel" runat="server" Text='<%# Eval("Comment").ToString().Replace(Environment.NewLine,"<br />") %>' />
                                                </td>
                                            </tr>
                                        </table>
                                        <h2>
                                            Notes:</h2>
                                        <table cellpadding="0" cellspacing="0" style="width: 800px">
                                            <tr>
                                                <td style="width: 101px">
                                                     </td>
                                                <td>
                                                    <asp:Label ID="NotesLabel" runat="server" Text='<%# Eval("Notes").ToString().Replace(Environment.NewLine,"<br />") %>' />
                                                </td>
                                            </tr>
                                        </table>
                                        <br />
        <asp:Button ID="EditButton" runat="server" CausesValidation="False" 
            CommandName="Edit" Text="Edit" />
         <asp:Button ID="Button2" runat="server" Text="Delete" onclick="Button2_Click" />
    </ItemTemplate>
</asp:FormView>


<asp:SqlDataSource ID="sds_MasterProjects" runat="server" 
    ConnectionString="<%$ ConnectionStrings:IT_CentralConnectionString %>" 
    DeleteCommand="DELETE FROM [ITC_ProjectsMaster]" 
    InsertCommand="" 
    SelectCommand="SELECT [IDProjectsMaster], [EnterDate], [ResolutionDeadline], [ResolutionDate], [FullName], [Subject], [MasterProject], [Priority], [Comment], [Notes], [IDAssignedTech] FROM [vw_ITC_Projects_Masters] WHERE [IDProjectsMaster] = @IDProjectsMaster" 
    UpdateCommand="UPDATE [ITC_Projects_Masters] SET [EnterDate] = @EnterDate, [ModifiedDate] = @ModifiedDate, [IDModifiedUser] = @IDModifiedUser, [ResolutionDeadline] = @ResolutionDeadline, [ResolutionDate] = @ResolutionDate, [IDAssignedTech] = @IDAssignedTech, [Subject] = @Subject, [MasterProject] = @MasterProject, [Priority] = @Priority, [Comment] = @Comment, [Notes] = @Notes WHERE [IDProjectsMaster] = @IDProjectsMaster">
    <InsertParameters>
        <asp:Parameter Name="EnterDate" Type="DateTime" />
    </InsertParameters>
    <SelectParameters>
        <asp:QueryStringParameter Name="IDProjectsMaster" QueryStringField="IDProjectsMaster" 
            Type="Int32" />
    </SelectParameters>
    <UpdateParameters>
        <asp:Parameter Name="EnterDate" Type="DateTime" />
        <asp:Parameter Name="ModifiedDate" Type="DateTime" />
        <asp:Parameter Name="IDModifiedUser" Type="Int32" />
        <asp:Parameter Name="ResolutionDeadline" Type="DateTime" />
        <asp:Parameter Name="ResolutionDate" Type="DateTime" />
        <asp:Parameter Name="IDAssignedTech" Type="String" />
        <asp:Parameter Name="Subject" Type="String" />
        <asp:Parameter Name="MasterProject" Type="String" />
        <asp:Parameter Name="Priority" Type="Decimal" />
        <asp:Parameter Name="Comment" Type="String" />
        <asp:Parameter Name="Notes" Type="String" />
        <asp:Parameter Name="IDProjectsMaster" Type="Int32" />
    </UpdateParameters>
</asp:SqlDataSource>

My issue is that when I attempt to update the data, the rating is not updated and the field value is ste to null.

How can I use the Rating control in the update portion of the formview?

Thanks in advance.













Slav
Telerik team
 answered on 25 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?