Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
250 views
My numeric columns are right aligned.  In the edit mode (in place) I get a TextBox input that is left aligned.  I would like to have the text box that is right aligned e.g. numeric text is right justified within edit box.  Is this possible? Anybody know how? 

Chris
Princy
Top achievements
Rank 2
 answered on 08 Dec 2009
1 answer
126 views
Hi
I hope someone can help - I think I am list in syntax issues with this.
Trying to use showWindow(url) method to pass a record ID to the window.

I have this column in  a radgrid:
<telerik:GridTemplateColumn DataField="ID" DataType="System.Int32" SortExpression="ID" UniqueName="ID">  
    <ItemTemplate> 
      <asp:HyperLink ID="HyperLink1" runat="server"   
        NavigateUrl='<%# "javascript:onclientclick=showWindow('../podcast-player/play-podcast.aspx?ID=" & Eval("ID") & "');" %>'>Listen</asp:HyperLink>    
       </ItemTemplate> 
</telerik:GridTemplateColumn> 

and my javascript and window declaration:
<script type="text/javascript" language="javascript">  
     function showWindow(url) {  
         var oWnd = $find("<%=RadWindow1.ClientID%>");  
         oWnd.setUrl(url);  
         oWnd.show();  
     }  
     function OnClientClose(oWnd) {  
         oWnd.setUrl("about:blank"); // Sets url to blank      
     }     
</script>   
<telerik:RadWindow ID="RadWindow1" runat="server" Skin="Vista" Behaviors="Move,Close,Resize" VisibleStatusbar="False"   
Animation="Fade" Height="170px" Width="280px" 
                    OnClientClose="OnClientClose">  
                </telerik:RadWindow>              

The problem is 'the server tag is not well formed' at runtime.   I tried replacing the regular apostrophes inside the showWindow('....') with a different type of apostrophe (`), which removed the runtime error message, but the link does not do anything when clicked.

Please help me out of the syntax (I think) mire!

Thanks

Clive
Shinu
Top achievements
Rank 2
 answered on 08 Dec 2009
1 answer
179 views

how can I programmatically build an item template for a radcombobox with a checkbox?

                <telerik:RadComboBox ID="cmbOfficeMultiple" runat="server">  
                    <ItemTemplate> 
                            <asp:CheckBox runat="server" ID="chkListValues" /> <%#Eval("ListValueName")%> 
                    </ItemTemplate> 
                </telerik:RadComboBox> 

I want to start with this in the code in front, but add the itemtemplate in the codebehind. How is that done?

<telerik:RadComboBox ID="cmbOfficeMultiple" runat="server">  
</telerik:RadComboBox> 

 

Thanks!

Shinu
Top achievements
Rank 2
 answered on 08 Dec 2009
2 answers
877 views
Hi!

I'm using RadListView control that has two buttons with events inside as well as populating other
information inside ItemDataBound event. However, I'm not getting arguments right and compile
errors. What am I doing wrong?

<telerik:RadListView PageSize="3"

 

OnItemDataBound="lstRelatedItems_ItemDataBound" ID="lstRelatedItems"

 

 

ItemPlaceholderID="ListViewContainer" DataKeyNames="ItemID" runat="server">

 

<

 

LayoutTemplate>

 

 

<asp:PlaceHolder runat="server" id="ListViewContainer" />

 

 

</LayoutTemplate>

 

 

<ItemTemplate>

 

 

<asp:ImageButton ID="btnAddToFavourites" OnCommand="AddToFavourites_Command" CommandArgument='<%# Eval("ItemID") %>' runat="server" /><br />

 

<telerik:RadNumericTextBox ID="txtQuantity" Runat="server" Width="40px" CssClass="txt"

 

 

DataType="System.Int16" MaxLength="5" MinValue="1" MaxValue="99999" ToolTip="quantity">

 

 

<NumberFormat DecimalDigits="0" GroupSeparator="" />

 

 

</telerik:RadNumericTextBox>

 

 

<asp:ImageButton ID="btnAddToCart" OnCommand="AddToCart_Command" CommandArgument='<%# Eval("ItemID") %>' runat="server" />

 

 

</div>

 

 

</div>

 

 

</fieldset>

 

 

</ItemTemplate>

 

 

</telerik:RadListView>

 



protected

 

void lstRelatedItems_ItemDataBound(object sender, RadListViewCommandEventArgs e)

 

{

 

ImageButton btnAddToFavourites = e.ListViewItem.FindControl("btnAddToFavourites") as ImageButton;

 

 

ImageButton btnAddToCart = e.ListViewItem.FindControl("btnAddToCart") as ImageButton;

 

btnAddToFavourites.ImageUrl =

HttpContext.Current.Request.ApplicationPath + "\\images\\ATFButton.gif";

 

btnAddToCart.ImageUrl =

HttpContext.Current.Request.ApplicationPath + "\\images\\ATOButton.gif";

 

 

 

RadListViewDataItem lvitem = (RadListViewDataItem)e.ListViewItem;

 

 

Item item = ItemManager.GetByItemID(Convert.ToInt32(lvitem.GetDataKeyValue("ItemID")));

 

}

 

public

 

void AddToFavourites_Command(Object sender, DataListCommandEventArgs e)

 

{

 

int itemID = Convert.ToInt32(e.CommandArgument);

 

 

try

 

 

 

 

{

 

ShoppingCartManager.AddToCart(ShoppingCartTypeEnum.Favourites, itemID, 1);

 

}

 

catch (Exception ex)

 

{

 

}

}

 

public void AddToCart_Command(Object sender, DataListCommandEventArgs e)

 

{

 

TextBox txtQuantity = e.Item.FindControl("txtQuantity") as TextBox;

 

 

int itemID = Convert.ToInt32(e.CommandArgument);

 

 

if (txtQuantity.Text != string.Empty)

 

{

 

try

 

 

 

 

{

 

ShoppingCartManager.AddToCart(ShoppingCartTypeEnum.ShoppingCart, itemID, Convert.ToInt16(txtQuantity.Text));

 

((

BaseOclMasterPage)Page.Master).LoadCart();

 

((

BaseOclMasterPage)Page.Master).LoadViewCart();

 

 

if (SettingManager.GetSettingValueBoolean("Display.StayOnSamePageWhenAddedToCart") == false)

 

Response.Redirect(

"~/ECommerce/ShoppingCart.aspx");

 

}

 

catch (Exception ex)

 

{

}

}

}

Joe
Top achievements
Rank 1
 answered on 08 Dec 2009
1 answer
362 views
I am fairly new to using RadGrid and my terminology and approach may be off, but...

I would like to add a boolean-type column to a RadGrid that is filterable using a checkbox, but renders in each row with one of two images (true=green check-mark, false=red X)

I have tried adding a GridCheckBoxColumn and it provids the checkbox in the filter as desired, but it renders true and false in the Grid with a checkbox which is checked or not checked.

Similarly, I have tried adding a GridImageColumn and it renders true and false values with the check-mark and X images, but the filter cell provides a text field to filter on, not a checkbox.

Is there an obvious way to do what I am trying to do? Would it be to start with a checkbox column and customize how the cells are rendered, or to start with an image column and customize how the filter cell behaves, or maybe some other approach?

Thanks,
-Eric

Princy
Top achievements
Rank 2
 answered on 08 Dec 2009
1 answer
68 views
Can a grid with hierarchal tables be exported? None of the hierarchal samples have the ability to export.
Princy
Top achievements
Rank 2
 answered on 08 Dec 2009
4 answers
668 views
hello,

I have two date/time pickers within the site details page.  It was working fine, but now I'm getting the error in my MVC view as shown below.  Again,  this is in a view and I have a RadScriptManager defined within the Site.Master master page.

Thanks.

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
   System.Web.UI.ControlCollection.Add(Control child) +8677431
   Telerik.Web.SkinRegistrar.RegisterCssReference(Page _page, Control _control, String _url) +257

[HttpException (0x80004005): Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error.]
   Telerik.Web.SkinRegistrar.RegisterCssReference(Page _page, Control _control, String _url) +305
   Telerik.Web.SkinRegistrar.RegisterCssReferences(ISkinnableControl _control) +435
   Telerik.Web.UI.RadWebControl.RegisterCssReferences() +51
   Telerik.Web.UI.RadWebControl.OnPreRender(EventArgs e) +53
   Telerik.Web.UI.RadInputControl.OnPreRender(EventArgs e) +12
   Telerik.Web.UI.RadDateInput.OnPreRender(EventArgs e) +288
   Telerik.Web.UI.DatePickingInput.OnPreRender(EventArgs e) +238
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

It was working, but now I don't know why I'm getting the error?


Scott Rakestraw
Top achievements
Rank 1
 answered on 08 Dec 2009
3 answers
135 views
When adding an appointment in the advanced form, I am only able to choose from 8am - 5:30pm.

How do I change this from 00:00 to 23:00?

Can't seem to find the answer to this... I am only interested in the Advanced Form. Thank you.
David
Top achievements
Rank 1
 answered on 07 Dec 2009
3 answers
240 views
Hi,
is there any way to set a max Level for the Treeview?
I just want to allow 3 Level Main Node -> Nodes -> Subnodes and not further! Because in my case it wont be used so i need a way to disable or block adding a "SubSubNode".

So it should look like this:

Main Node
 |_Node 1
 | |_Subnode 1
 | |_Subnode 2
 | |_Subnode 3
 |_Node 1
 | |_Subnode 1
 |_Node 1
  |_Subnode 1
   |_Subnode 2

And not like:

Main Node
 |_Node 1
 | |_Subnode 1
 | | |_SubSubnode 1
 | | |_SubSubnode 2
 | |_Subnode 2
 | |_Subnode 3
 |_Node 1
 | |_Subnode 1
 |_Node 1
  |_Subnode 1
   |_Subnode 2

Schlurk
Top achievements
Rank 2
 answered on 07 Dec 2009
2 answers
189 views
Hi, I am trying to run the image manager dialog with out rad editor and have viewed and am using samples from

http://www.telerik.com/community/forums/aspnet-ajax/editor/client-side-methods.aspx

I am using Q3 2009 and VS 2008 and no matter what I do i get a web.config registration missing error. I also viewed this page for help on this and tried several variations for the web.config as documented here

http://www.telerik.com/support/kb/aspnet-ajax/editor/error-web-config-registration-missing-the-telerik-dialogs-require-a-httphandler-registration-in-the-web-config-file.aspx

the client side code for this is

<telerik:Raddialogopener runat="server" id="DialogOpener1" AdditionalQueryString=""
            HandlerUrl="Telerik.Web.UI.DialogHandler.axd" style="display: none;">
 </telerik:Raddialogopener>
 <button onclick="$find('<%= DialogOpener1.ClientID %>').open('ImageManager');return false;">
  Open Image Manager
 </button>

and in web.config we have

 <httpHandlers>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
      <add path="Telerik.Web.UI.DialogHandler.axd" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
    </httpHandlers>

and at the bottom in system.webServer we have

 <handlers>
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
      <add name="Telerik_Web_UI_DialogHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.axd" type="Telerik.Web.UI.DialogHandler" />
    </handlers>

Any thoughts on why this is not working? We have tried quite a few combinations without success. Thanks.











Karl Wilkens
Top achievements
Rank 1
 answered on 07 Dec 2009
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?