Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
93 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
139 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
55 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
47 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
117 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
155 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
151 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
125 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
326 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
5 answers
351 views
Hi, I have the following scenario:
A grid inside a UserControl
The user control in an aspx inside a div with width=100%
In the user control the grid is also inside a div with width=100%
The grid is using AutoGenerateColumns=True, and I'm setting the default size for each column to 170px in the ColumnCreatingEvent
           
column.ItemStyle.Width = Unit.Pixel(170);
column.HeaderStyle.Width = Unit.Pixel(170);

The grid is allowing AllowFilteringByColumn.

The grid headers and columns expands even bigger than the browser window and the scroll appears (this is OK), but the GroupPanel just render to the end of the window (where the scroll begins), and additionally in the last columns of the grid I can't drag & drop to group by these columns. Also when I click the filter button in these columns the dropdown render in another position of the screen, is like in someway the grid is lost in space and time.

Enclosed you can find a screenshot with more visual detail.

I've tried using FixedLayout in the MasterTable.
This is the definition of the grid.

Telerik Q1 2010

<div style="width: 100%;padding-top:15px">
    <telerik:RadGrid ID="gridData" runat="server" AllowPaging="true" AutoGenerateColumns="true"
        GridLines="Both" BorderStyle="None" Skin="Office2007" Width="100%" OnNeedDataSource="gridData_NeedDataSource"
        PageSize="100" ShowGroupPanel="true" OnItemCreated="gridData_ItemCreated" OnItemDataBound="gridData_ItemDataBound"
        OnDataBound="gridData_DataBound" OnPreRender="gridData_PreRender"
        AllowFilteringByColumn="True" EnableViewState="False"
        oncolumncreated="gridData_ColumnCreated"
        oncolumncreating="gridData_ColumnCreating">
        <GroupPanel Text="Arrastre una cabecera de columna hacia ésta barra para agrupar">
        </GroupPanel>
        <MasterTableView GridLines="Both" ShowGroupFooter="true" TableLayout="Auto"
            EnableViewState="False">
            <HeaderStyle Width="100%" />
            <RowIndicatorColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
        </MasterTableView>
        <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True"
            AllowColumnHide="false">
            <Selecting AllowRowSelect="True"></Selecting>
            <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True"
                ResizeGridOnColumnResize="true"></Resizing>
        </ClientSettings>
        <GroupingSettings ShowUnGroupButton="true" GroupContinuedFormatString="... continuación del grupo de la página anterior. "
            GroupContinuesFormatString=" El grupo continúa en la siguiente página." GroupSplitDisplayFormat="Mostrando {0} de {1} items."
            UnGroupButtonTooltip="Click aquí para remover grupo" UnGroupTooltip="Arrastre fuera de la barra para remover grupo"
            CaseSensitive="false" />
    </telerik:RadGrid>
</div>
Pavlina
Telerik team
 answered on 31 Jan 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?