Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
232 views
Hi all,
I have combobox, it will be loaded after typing 3 letter. Search is done in db stored proc and Combobox is loaded, if results are found. 
And If we don't have searched item user can add the item.
I have multi column combo.
can that be done in one combobox or what do you suggest?
e.g. if i type Act it search all data with act and loads data. if we dont' have result allow to add the item!

Act
Post            Location     Manager
CP              Activa          George
Accountant  EgyptMain    Jemison

zun
Post            Location        Manager

     
Damodar
Top achievements
Rank 1
 answered on 01 Feb 2011
0 answers
125 views
I have a ComboBox set to Display None in code behind of page load of IsNotPostBack. When I click on another control, I am making this control visible from Jquery. I am using Set_visible(true) property. It works fine but When I submit the form for the server validation(post back) RadComboBox disappears. I am not setting this to none anywhere except in IsNotPostBack method. What could be the reason? Also How can I validate EmptyMessage with RequiredFieldValidator on the client side? Please let me know.

Thank you for any ideas..
nav100
Top achievements
Rank 1
 asked on 31 Jan 2011
3 answers
174 views
Hi

I have a rad grid with a template edit form. One of the fields on the form is an image but the image is not being displayed using the 'Bind' command.

Here is my edit form:

<FormTemplate>
    <table id="table1" cellspacing="2" cellpadding="1" width="100%" border="1" rules="none"
        style="border-collapse: collapse;">
        <tr class="EditFormHeader">
            <td colspan="2">
                <b>Product Details</b>
            </td>
        </tr>
        <tr>
            <td>
                <table id="table2" cellspacing="1" cellpadding="1" width="100%" border="0" class="module">
                    <tr>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td>
                            Product Name:
                        </td>
                        <td>
                            <asp:TextBox ID="TextBox7" runat="server" Width="90%" Text='<%# Bind( "ProductName" ) %>'></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Product Price:
                        </td>
                        <td>
                            <asp:TextBox ID="TextBox8" runat="server" Width="90%" Text='<%# Bind( "ProductPrice" ) %>'></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Category:
                        </td>
                        <td>
                            <asp:TextBox ID="TextBox9" Enabled="false" runat="server" Width="90%" Text='<%# Bind( "CategoryName" ) %>'></asp:TextBox>
                            <br />
                            <asp:DropDownList ID="DropDownList1" runat="server"
                                DataSourceID="SqlDataSource1" Width="90%"
                                DataTextField="CategoryName" AutoPostBack="true">
                            </asp:DropDownList>
                            <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                                ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString %>"
                                SelectCommand="Select Distinct CategoryName From Categories">
                            </asp:SqlDataSource>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Thumb Image:
                        </td>
                        <td>
                            <asp:TextBox ID="testImage" runat="server" Text='../images/<%# Bind( "ImageName" ) %>'></asp:TextBox>
                            <img id="ThumbImage1" runat="server" alt="" src='../images/<%# Bind( "ImageName" ) %>' />
                            <asp:Image ID="Image1" runat="server" AlternateText="Thumb" ImageUrl='../images/<%# Bind( "ImageName" ) %>'/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Main Image:
                        </td>
                        <td>
                            <img id="MainImage" alt="" runat="server" src='../images/<%# Bind( "ImageNameMain" ) %>' />
 
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <telerik:RadTabStrip runat="server" ID="RadTabStrip1" Orientation="HorizontalTop"
                                SelectedIndex="0" MultiPageID="RadMultiPage1" Width="400px">
                                <Tabs>
                                    <telerik:RadTab Text="Ingredients">
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="Description">
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="Overview">
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="Directions">
                                    </telerik:RadTab>
                                </Tabs>   
                            </telerik:RadTabStrip>
                            <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0"
                                Height="218px" Width="400px" CssClass="multiPage">
                                <telerik:RadPageView runat="server" ID="RadPageView1" CssClass="pageView">
                                    <asp:TextBox ID="TextBox13" runat="server" TextMode="MultiLine" Rows="5" Columns="40" Width="370px"
                                        Text='<%# Bind( "ProductIngredients" ) %>'></asp:TextBox>
                                </telerik:RadPageView>  
                                <telerik:RadPageView runat="server" ID="RadPageView2" CssClass="pageView">
                                    <asp:TextBox ID="TextBox10" runat="server" TextMode="MultiLine" Rows="5" Columns="40"
                                        Text='<%# Bind( "ProductDescription") %>'></asp:TextBox>
                                </telerik:RadPageView>
                                <telerik:RadPageView runat="server" ID="RadPageView3" CssClass="pageView">
                                    <asp:TextBox ID="TextBox11" runat="server" TextMode="MultiLine" Rows="5" Columns="40"
                                        Text='<%# Bind( "ProductOverview" ) %>'></asp:TextBox>
                                </telerik:RadPageView>
                                <telerik:RadPageView runat="server" ID="RadPageView4" CssClass="pageView">
                                    <asp:TextBox ID="TextBox12" runat="server" TextMode="MultiLine" Rows="5" Columns="40"
                                        Text='<%# Bind( "ProductDirections" ) %>'></asp:TextBox>
                                </telerik:RadPageView>                                                                                     
                            </telerik:RadMultiPage>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td align="right" colspan="2">
                <asp:Button ID="btUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server"
                    CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'/>
                  
                <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="false"
                    CommandName="Cancel" />
            </td>
        </tr>   
    </table>                           
</FormTemplate>

I have added two image types (HTML & ASP.net) and a textbox to see the result of the bind, here are what i see

Textbox testImage = ../images/<%# Bind( "ImageName" ) %>
HTML ThumbImage1 = " id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl19_ThumbImage1" />

ASP Image1 = Alt text is shown 'Thumb'

How do i render an image in the edit form?
Antony
Top achievements
Rank 1
 answered on 31 Jan 2011
3 answers
101 views
Hello there,

I am trying to implement the following,  select one row at a time from Radgid1, then add the selected row to another grid.
So, the user select a record from RadGrid1 then this row will be inserted in RadGrid 2.

Please direct me or provide some code, I really appreciate any help

Thank you so much

Sean 
AHSAN
Top achievements
Rank 1
 answered on 31 Jan 2011
2 answers
74 views
I have a TreeView embedded within a combobox that is doubling as both a user-navigable tree and a filtered autocomplete tree if the user is typing into the combobox.
When the user is clicking through the tree, I want the SingleExpandPath behaviour to be used.
When they are typing and the (partial) tree is being filtered and displayed to them, I'd like this behaviour to be disabled since the filtered set of nodes will come from various branches of the tree.

I'd like to disabled this property in the combobox's OnClientKeyPressing event, and re-enable it on the OnClientDropDownOpened event. I haven't seen anything in the client side API that lets me control this.
Stefan
Top achievements
Rank 1
 answered on 31 Jan 2011
3 answers
148 views
How to set DataNavigateUrlFormatString with radopen javascript at run time?

I used the following code on page load, it doesn't work while uisng

glc.DataNavigateUrlFormatString = "javascript:function anon(){{window.radopen('View.aspx?TID={0}&LID={1}','View');}};anon();";

 

---------------------------------------------------------------------

 

if (!Page.IsPostBack)

 

{

 

 

 

GridHyperLinkColumn glc;

 

glc =

new GridHyperLinkColumn();

 

 

this.rgTranslationView.MasterTableView.Columns.Add(glc);

 

glc.DataTextField=

"English";

 

glc.HeaderText=

"English";

 

glc.UniqueName =

"English0";

 

glc.FilterControlWidth=

Unit.Pixel(100);

 

glc.DataType= System.

Type.GetType("System.String");

 

glc.AutoPostBackOnFilter=

true;

 

glc.AllowFiltering =

true;

 

glc.ShowFilterIcon =

false;

 

glc.DataNavigateUrlFormatString =

"javascript:function anon(){{window.radopen('View.aspx?TID={0}&LID={1}','View');}};anon();";

 

glc.DataNavigateUrlFields =

new String[] { "TagID, LanguageID" };

 

glc.CurrentFilterFunction =

GridKnownFunction.Contains; 

 

 

}


Can anyone help?

Thanks!

JJ
Top achievements
Rank 1
 answered on 31 Jan 2011
2 answers
224 views
How to set DataNavigateUrlFormatString with radopen javascript at run time?

I used the following code on page load, it doesn't work while uisng

glc.DataNavigateUrlFormatString = "javascript:function anon(){{window.radopen('View.aspx?TID={0}&LID={1}','View');}};anon();";

 

---------------------------------------------------------------------

 

if (!Page.IsPostBack)

 

{

 

 

 

GridHyperLinkColumn glc;

 

glc =

new GridHyperLinkColumn();

 

 

this.rgTranslationView.MasterTableView.Columns.Add(glc);

 

glc.DataTextField=

"English";

 

glc.HeaderText=

"English";

 

glc.UniqueName =

"English0";

 

glc.FilterControlWidth=

Unit.Pixel(100);

 

glc.DataType= System.

Type.GetType("System.String");

 

glc.AutoPostBackOnFilter=

true;

 

glc.AllowFiltering =

true;

 

glc.ShowFilterIcon =

false;

 

glc.DataNavigateUrlFormatString =

"javascript:function anon(){{window.radopen('View.aspx?TID={0}&LID={1}','View');}};anon();";

 

glc.DataNavigateUrlFields =

new String[] { "TagID, LanguageID" };

 

glc.CurrentFilterFunction =

GridKnownFunction.Contains; 

 

 

}


Can anyone help?

Thanks!

JJ
Top achievements
Rank 1
 answered on 31 Jan 2011
11 answers
191 views

Hi coders,
I have a <a> tag in the AppointmentTemplate and when a user clicks on the link, I would like to extract the ID of the clicked entry and pass it to a javascript function. This is the code I am trying but it doesn't work. Please let me know how to accomplish this:
 

<AppointmentTemplate>
   <div>
      <a href='#' onclick='openWindow(<%# Eval("ID") %>)'><%# Eval("Subject") %></a>
   </div>
</AppointmentTemplate>


openWindow
is my JavaScript function. Please let me know where I am going wrong.

Thanks, Peterson.

David
Top achievements
Rank 1
 answered on 31 Jan 2011
6 answers
207 views
Using this markup...
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1.Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1"
              runat="server">
            <telerik:RadScriptManager ID="RadScriptManager1"
                                      runat="server">
            </telerik:RadScriptManager>
            <div>
                <telerik:RadGrid ID="RadGrid1"
                                 runat="server"
                                 GridLines="None"
                                 DataSourceID="SQLData">
                    <MasterTableView AutoGenerateColumns="false">
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </ExpandCollapseColumn>
 
                        <Columns>
                            <telerik:GridBoundColumn UniqueName="ID" DataField="ProductID" HeaderText="ID" />
                            <telerik:GridBoundColumn UniqueName="Name" DataField="Name" HeaderText="Name" />
                        </Columns>
                        <NestedViewTemplate>
                            <asp:Label runat="server" ID="lblProductNumber" Text='<%#Eval("ProductNumber")%>' />
                            <telerik:RadButton runat="server" ID="btn" Text="Alarm" Icon-PrimaryIconUrl="~/Images/alarm-clock.png" />
                        </NestedViewTemplate>
                    </MasterTableView>
                    <ClientSettings Scrolling-UseStaticHeaders="true" Scrolling-AllowScroll="true" />
                </telerik:RadGrid>
 
                <asp:SqlDataSource runat="server"
                                   ID="SQLData"
                                   ConnectionString="<%$ ConnectionStrings:AdventureWorksConnectionString2 %>"
                                   SelectCommand="SELECT * FROM [Production].[Product]"/>
            </div>
        </form>
    </body>
</html>

open the page in IE8. Expand a row. See the button. Scroll the grid and see the button scroll.

Now do the same thing in IE7/IE8+Compatability mode. The button doesn't scroll. I suspect that this may be related to this issue but im unsure how I might go about solving it in this case.

Any pointers would be appreciated.

-- 
Stuart
Stuart Hemming
Top achievements
Rank 2
 answered on 31 Jan 2011
8 answers
399 views
Hi all,

I have a RadDockZone inside of a RadPane. The RadDockZone's height is 100%, has a minimum height, and the RadPane's height is unset.

I add a dock to the RadDockZone and this new dock does not fit completely inside of the RadDockZone (it's height + the height of other docks in the RadDockZone exceeds the minimum height set). I would like the RadDockZone's height to increase so that it can hold all the Dock's without any excess space. Currently, the last dock just gets clipped off -- even though the RadDockZone's height is 100%.

Any ideas?
Sean
Top achievements
Rank 2
 answered on 31 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?