Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
82 views
Hi,

I am using the webblue skin for my treeview, how do i stop nodes with a navigateurl showing as blue, and when selected, as purple.
(working similar to how normal hyperlink colours work)... ?

I want my nodes to be black when not selected, selected, or visited. What is the css value for this please ?

Many Thanks
Mark :-)
Yana
Telerik team
 answered on 17 Nov 2008
1 answer
116 views

Hi,

When I add a button to a RadToolBarDropDown object on the client-side the dropdown menu never resizes. As a result, if the button text is too long then part of it get chopped off. Anyone know how I can get dropdown menu to resize after a button has been added on the client-side?

 

Thanks

Man Cheong Liu

 

Yana
Telerik team
 answered on 17 Nov 2008
1 answer
57 views
Is it possible to make the editor works in this way:
select (highlight) one (all more) element(s) in design mode and then switch to HTML source mode, the selected (highlighted) source of the element(s) has still been selected(highlighted) ?
I tried several other editors, they all have this kind of functionality which really speed editing up.

Nikolay Raykov
Telerik team
 answered on 17 Nov 2008
7 answers
180 views
Hi.. I have input control - how can make the cursor go to the first position when a user clicks in the field.
thanks
Missing User
 answered on 17 Nov 2008
2 answers
230 views
I have a complex radgrid and everything was working. All I want to do is add an event when the user clicks save in my edit or insert form to validate the input data on the client side and popup a radalert if there is anything wrong with the data. After introducing this to my grid:

<ClientSettings>
             <ClientEvents OnCommand="commandClicked" />
        </ClientSettings>

...
 function commandClicked(sender, eventArgs) {
        var command = eventArgs.get_commandName();
        var arg = eventArgs.get_commandArgument();
        var x = 1;
   }

then the codebehind does not work the same way it did before. I have 2 template columns which are actually grids, and in my server side code I have   updateCommand   code to go through those grids and save the data from the grids to a temporary table. The findcontrol does not find the grids i(they are null) n the templates after I add the client event handler. I does find it in my insert code, but not in my update code. I will first put just the function that is trying to find the control and then the whole code will follow.

protected void usersGrid_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
        string tableName = temptablename.Text;
        string packagecd = package_cd.Text;
        //  int sbOrderDetailID = Convert.ToInt32(Session["sbOrderDetailID"]);
        int sbOrderDetailID = Convert.ToInt32(TextBoxOrderDetailID.Text);
        int nUserID = Convert.ToInt32(TextBoxUserID.Text);
        string sLoginName = TextBoxLoginName.Text;
        string sPassword = TextBoxPassword.Text;
        string sEmail = TextBoxEmail.Text;
        string sActive = TextBoxActive.Text;
        // string sPrice = Session["price"].ToString();
        double dblPrice = Convert.ToDouble(RadNumericTextBoxPrice.Value);

        GridEditableItem editedItem = e.Item as GridEditableItem;
        //      UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);

        RadGrid PackageGrid = (editedItem.FindControl("PackagePriceGrid") as RadGrid);
        RadGrid alaGrid = (editedItem.FindControl("AlaCartePriceGrid") as RadGrid);

        foreach (GridDataItem item in PackageGrid.Items)
        {
            System.Web.UI.WebControls.CheckBox chkbx = (System.Web.UI.WebControls.CheckBox)item["CHECKED"].FindControl("Entitled");

            int service_id = Convert.ToInt32(PackageGrid.MasterTableView.DataKeyValues[item.ItemIndex]["service_id"]);
            Boolean oldIchecked = Convert.ToBoolean(PackageGrid.MasterTableView.DataKeyValues[item.ItemIndex]["Checked"]);

            Boolean entitled = chkbx.Checked;
            if (oldIchecked != entitled)
                Insert_update_checkbox(temptablename.Text, package_cd.Text, service_id, 0, entitled);

            item.Edit = false;
        }
        PackageGrid.Rebind();

        foreach (GridDataItem item in alaGrid.Items)
        {
            System.Web.UI.WebControls.CheckBox chkbxEntitled = (System.Web.UI.WebControls.CheckBox)item["CHECKED"].FindControl("Entitled");
            System.Web.UI.WebControls.CheckBox chkbxInvoice = (System.Web.UI.WebControls.CheckBox)item["INCLINV"].FindControl("InclInv");
            RadNumericTextBox txtboxPrice = (RadNumericTextBox)item["alaPrice"].FindControl("alaPrice");


            int service_id = Convert.ToInt32(alaGrid.MasterTableView.DataKeyValues[item.ItemIndex]["service_id"]);
            Boolean oldIchecked = Convert.ToBoolean(alaGrid.MasterTableView.DataKeyValues[item.ItemIndex]["Checked"]);
            double oldPrice = Convert.ToDouble(alaGrid.MasterTableView.DataKeyValues[item.ItemIndex]["Price"]);
            Boolean oldIncludeInvoice = Convert.ToBoolean(alaGrid.MasterTableView.DataKeyValues[item.ItemIndex]["InvoiceChecked"]);


            Boolean entitled = chkbxEntitled.Checked;
            Boolean inclInvoice = chkbxInvoice.Checked;
            double price = Convert.ToDouble(txtboxPrice.Value);

            if (oldIchecked != entitled)
                Insert_update_checkbox(temptablename.Text, TextBoxAdditionalItemsPackageCdAla.Text, service_id, 0, entitled);
            if (oldIncludeInvoice != inclInvoice)
                Insert_update_checkbox(temptablename.Text, TextBoxAdditionalItemsPackageCdAla.Text, service_id, 1, inclInvoice);
            if (oldPrice != price)
                Insert_update_price(temptablename.Text, TextBoxAdditionalItemsPackageCdAla.Text, service_id, price);
        }

        alaGrid.Rebind();
        int updated = Update_User_Calling_StoredProc(tableName, packagecd, sbOrderDetailID, nUserID, sLoginName, sPassword, sEmail, sActive, dblPrice);
        int trying = 0;
         while (updated != 0 && trying++ < 10)
           updated = Update_User_Calling_StoredProc(tableName, packagecd, sbOrderDetailID, nUserID, sLoginName, sPassword, sEmail, sActive, dblPrice);
            

        usersGrid.Rebind();
        DisplayMessage(Session["updateString"].ToString());
        CompanyInfoGrid.Rebind();

    }

........

<telerik:RadGrid ID="usersGrid" runat="server"  AllowPaging="True" PageSize="15"
            DataSourceID="ContentCentralUsers" GridLines="None" Skin="Office2007" AutoGenerateColumns="False"
            ondatabound="usersGrid_DataBound"  AllowFilteringByColumn="True"  
            onitemdatabound="usersGrid_ItemDataBound"   OnItemCreated="usersGrid_ItemCreated"
            onitemevent="usersGrid_ItemDataBound"   
            oniteminserted="usersGrid_ItemInserted" onitemupdated="usersGrid_ItemUpdated"
            ShowStatusBar="True" OnPreRender="usersGrid_PreRender"
            oninsertcommand="usersGrid_InsertCommand" OnItemCommand="usersGrid_ItemCommand"
            onupdatecommand="usersGrid_UpdateCommand"   >
         <ClientSettings>
             <ClientEvents OnCommand="commandClicked" />
        </ClientSettings>
        <PagerStyle Mode="NextPrevAndNumeric" />
        <GroupingSettings CaseSensitive="false" />
     
       <MasterTableView  DataSourceID="ContentCentralUsers"  DataKeyNames="user_id,package_cd" AllowAutomaticDeletes="false"
             AllowFilteringByColumn="True" AllowSorting="True"   AllowAutomaticUpdates="false" AllowAutomaticInserts="false"
              InsertItemPageIndexAction="ShowItemOnFirstPage" CommandItemDisplay="Top"
             NoMasterRecordsText="No users to display.">
            
             <CommandItemTemplate >
               <div style="padding:10px 5px;">
                 <asp:LinkButton  runat="server" id="wizardButton" OnClientClick="openWin('<%# TextBoxOrderDetailID.Text %>'); return false;" >
                        <img style="border:0px;vertical-align:middle;" alt="" src="Img/Wand1.gif" />Add multiple users wizard</asp:LinkButton>
                
                     &nbsp;&nbsp;&nbsp;&nbsp;
                     
                  <asp:LinkButton ID="insertButton" runat="server" CommandName="InitInsert"  >
                        <img style="border:0px;vertical-align:middle;"  alt="" src="Img/AddRecord.gif" /> Add new user</asp:LinkButton>  
                   
                     &nbsp;&nbsp;&nbsp;&nbsp;
                     
                   <asp:LinkButton ID="LinkButton4" runat="server" CommandName="RebindGrid">
                        <img style="border:0px;vertical-align:middle;" alt="" src="Img/Refresh.gif" /> Refresh</asp:LinkButton>
                   
                </div>
             </CommandItemTemplate>
            <CommandItemSettings AddNewRecordText="Add new user"  />
            
            
            <RowIndicatorColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
   
            <ExpandCollapseColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
          
   
     <Columns>
        <telerik:GridEditCommandColumn ButtonType="ImageButton"  UniqueName="EditCommandColumn1">
                    <HeaderStyle Width="20px" />
        </telerik:GridEditCommandColumn>
        <telerik:GridBoundColumn DataField="user_id" UniqueName="user_id" Visible="false" ReadOnly="true" ></telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="package_cd" UniqueName="package_cd" Visible="false" ReadOnly="true" ></telerik:GridBoundColumn>

        <telerik:GridTemplateColumn HeaderText="Seat(User)" SortExpression="login_name" UniqueName="login_name" AllowFiltering="true" DataField="login_name"  >
          <ItemTemplate>
             <asp:Label ID="login_name"   runat="server"  Text='<%#Eval("login_name") %>'></asp:Label>
          </ItemTemplate>
          <EditItemTemplate>
             <asp:TextBox ID="loginname" Text='<%#Eval("login_name") %>'  runat="server"  OnTextChanged="change_loginName"></asp:TextBox>
             <asp:RequiredFieldValidator id="loginnameRequiredFieldValidator" runat="server" ErrorMessage="* User name required" Display="Dynamic"
                ControlToValidate= "loginname"></asp:RequiredFieldValidator>
           </EditItemTemplate>
         </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn HeaderText="Password" SortExpression="password" UniqueName="password"  EditFormColumnIndex="1" AllowFiltering="false">
          <ItemTemplate>
             <asp:Label ID="password"   runat="server"  Text='<%#Eval("password") %>'></asp:Label></ItemTemplate>
             <EditItemTemplate>
              <asp:TextBox ID="editPassword" Text='<%#Eval("password") %>'  runat="server"  OnTextChanged="change_Password" ></asp:TextBox><asp:RequiredFieldValidator id="passwordRequiredFieldValidator" runat="server" ErrorMessage="* Password required" Display="Dynamic"
                  ControlToValidate= "editPassword"></asp:RequiredFieldValidator>
             </EditItemTemplate>
          </telerik:GridTemplateColumn><telerik:GridTemplateColumn HeaderText="Email" SortExpression="email" UniqueName="email"  AllowFiltering="true" DataField="email">
          <ItemTemplate>
             <asp:Label ID="email"   runat="server"  Text='<%#Eval("email") %>'></asp:Label></ItemTemplate><EditItemTemplate>
             <asp:TextBox ID="editEmail" Text='<%#Eval("email") %>'  runat="server"  OnTextChanged="change_email"></asp:TextBox><asp:RequiredFieldValidator id="emailValidator1" runat="server" ErrorMessage="* Email required"    Display="Dynamic"
                 ControlToValidate= "editEmail"></asp:RequiredFieldValidator><asp:RegularExpressionValidator Runat="server" ErrorMessage="* Invalid E-mail Address" ID="emailValidator2"  Display="Dynamic"
                 ControlToValidate="editEmail" ValidationExpression=".+@.+\.[a-z]+"></asp:RegularExpressionValidator></EditItemTemplate></telerik:GridTemplateColumn>
                 <telerik:GridTemplateColumn HeaderText="Package"  UniqueName="DefaultPackage" EditFormColumnIndex="1"  AllowFiltering="true" DataField="package_name">
                      
                        <ItemTemplate>
                            <asp:Label runat="server" ID="Label1" Text='<%#Eval("package_name") %>'></asp:Label><telerik:RadToolTip runat="server" ID="RadToolTip1" TargetControlID="Label1"
                                Skin="Web20" ShowDelay="500" AutoCloseDelay="200000" Font-Names="arial"
                                Font-Size="XX-Large" BorderStyle="Inset" HideDelay="100000" ManualClose="False"
                                Position="BottomRight" Sticky="True" Width="300">   
                                    <asp:Label runat="server" ID="Label3" Text='<%#Eval("descriptions") %>'></asp:Label><br/>                                                  
                             </telerik:RadToolTip>
                        </ItemTemplate>
                        <EditItemTemplate>
                        <telerik:RadComboBox  
                            ID="package"  
                            Width="220px"  
                            runat="server"  
                            OnSelectedIndexChanged="RadComboBoxSelectedIndexChanged"
                            MarkFirstMatch="True"  
                            AllowCustomText="True"
                            DataSourceID="ContentCentralPackages"   
                            EmptyMessage="Select a package"
                            ExpandAnimation-Type="None"  
                            CollapseAnimation-Type="None"
                            AutoPostBack="true"
                            AppendDataBoundItems="false"
                            OnClientSelectedIndexChanging="setnewprice"
                            DataTextField="package_name"
                            DataValueField="package_cd"
                            DropDownWidth="650px"  
                            OnClientKeyPressing="setnewprice"
                            Skin="WebBlue"
                            SelectedValue='<%# Bind("package_cd") %>'
                            EnableVirtualScrolling="True"
                            CausesValidation="false"
                            HighlightTemplatedItems="True">
                             <ExpandAnimation Type="None" />
                             <CollapseAnimation Duration="200" Type="None" />
                          <HeaderTemplate>
                           <table style="width: 620px; text-align: left">
                            <tr>
                                <td style="width: 170px;">
                                    Package Name
                                </td>
                                <td style="width: 450px;" >
                                    Description
                                </td>
                                <td style="width: 0px;" >
                                    
                                </td>
                            </tr>
                          </table>
                        </HeaderTemplate>
                    <ItemTemplate>
                        <table style="width: 620px; text-align: left">
                            <tr>
                                <td style="width: 170px;" valign="top">
                                    <%# DataBinder.Eval(Container.DataItem, "package_name") %>
                                </td>
                                <td style="width: 450px;">
                                    <%# DataBinder.Eval(Container.DataItem, "descriptions") %>
                                </td>
                               
                                
                            </tr>
                        </table>
                    </ItemTemplate>
            
                          </telerik:RadComboBox>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                   <telerik:GridTemplateColumn HeaderText="Package Price" UniqueName="NumericPrice" AllowFiltering="false" >
                      <ItemTemplate>
                        <telerik:RadNumericTextBox ID="inGridPkgPrice" runat="server"  Price='<%# Eval("packageprice") %>'  
                                    Culture="English (United States)" Type="Currency"   DbValue='<%# DataBinder.Eval(Container.DataItem, "packageprice") %>'  
                                      Width="75px"  OnTextChanged="RadNumericInlineGridTextChanged" AutoPostBack= "true">  
                                     
                         </telerik:RadNumericTextBox>
                      </ItemTemplate>
                      <EditItemTemplate>
                        <telerik:RadNumericTextBox ID="inFormPkgPrice" runat="server"  Price='<%# Eval("packageprice") %>'  
                                    Culture="English (United States)" Type="Currency"   DbValue='<%# DataBinder.Eval(Container.DataItem, "packageprice") %>'  
                                      Width="125px"   OnTextChanged="RadNumericDefaultPackageTextChanged">  
                                      <ClientEvents OnLoad="PriceBoxLoad"  />
                                  </telerik:RadNumericTextBox>
                      </EditItemTemplate>
                      <HeaderStyle Width="100px" />
                    
                    </telerik:GridTemplateColumn>
                      <telerik:GridMaskedColumn  DataField="packageprice"  Mask="$ #####.##" DataFormatString="{0:C2}" HeaderText="Package Price" Display="true" UniqueName="readonlyPackagePrice"
                                  readonly="true"  AllowFiltering="false">
                         <ItemStyle HorizontalAlign="Right" />
                      </telerik:GridMaskedColumn>
                   
                        <telerik:GridMaskedColumn  DataField="packagealaprice"  Mask="$ #####.##" DataFormatString="{0:C2}" HeaderText="Ala Carte Price" Display="true" UniqueName="packagepriceala"
                                  readonly="true"  AllowFiltering="false"  >
                         <ItemStyle HorizontalAlign="Right" />
                         <HeaderStyle Width="100px" />
                      </telerik:GridMaskedColumn>
       
            <telerik:GridTemplateColumn EditFormHeaderTextFormat=""  HeaderStyle-VerticalAlign="Top" Visible="false" UniqueName="PackagePriceGrid">
             <EditItemTemplate>
               <telerik:RadGrid ID="PackagePriceGrid" runat="server" AutoGenerateColumns="False" DataSourceID="spAddNewsTradeProduct"  
                                GridLines="None" Skin="Office2007" onitemdatabound="PackagePriceGrid_ItemDataBound" OnItemCommand="PackageGrid_ItemCommand"
                              ShowStatusBar="True" OnPreRender="PackagePriceGrid_PreRender" >
                  <MasterTableView CommandItemDisplay="None" EditMode="InPlace" DataKeyNames="service_id,Checked" >   
                    <Columns>
                       <telerik:GridBoundColumn  UniqueName="service_id" DataField="service_id" Visible="false" Display="false">
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="service_name" HeaderText="Default Package"  Display="true" UniqueName="service_name" >
                       </telerik:GridBoundColumn>
                       <telerik:GridTemplateColumn HeaderText="Purchased" UniqueName="CHECKED">
                        <ItemTemplate>
                          <asp:CheckBox ID="Entitled"  Checked='<%# Eval("Checked") %>' runat="server" />
                                 </ItemTemplate>
                          </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn  UniqueName="PKGPRICE" HeaderText=""  Display="false" >
                        <ItemTemplate>
                                  
                                  <telerik:RadNumericTextBox ID="PKGPRICE" runat="server"  Price='<%# Eval("Price") %>'
                                    Culture="English (United States)" Type="Currency"   DbValue='<%# DataBinder.Eval(Container.DataItem, "Price") %>'  
                                      Width="125px" >  
                                      <ClientEvents    OnLoad="priceLoaded"  OnValueChanged="priceLoaded" />
                                  </telerik:RadNumericTextBox>
                               </ItemTemplate>
                           <EditItemTemplate>
                                  
                                  <telerik:RadNumericTextBox ID="PKGPRICE" runat="server"  Price='<%# Eval("Price") %>'
                                    Culture="English (United States)" Type="Currency"   DbValue='<%# DataBinder.Eval(Container.DataItem, "Price") %>'  
                                      Width="125px" >  
                                      <ClientEvents    OnLoad="priceLoaded"  OnValueChanged="priceLoaded" />
                                  </telerik:RadNumericTextBox>
                               </EditItemTemplate>
                         </telerik:GridTemplateColumn>
                     </Columns>
                    
                  </MasterTableView>
                </telerik:RadGrid>                    
              </EditItemTemplate>
             <HeaderStyle VerticalAlign="Top"></HeaderStyle>
          </telerik:GridTemplateColumn>   
          
          
           <telerik:GridTemplateColumn EditFormHeaderTextFormat=""  HeaderStyle-VerticalAlign="Top" Visible="false">
             <EditItemTemplate>
               <telerik:RadGrid ID="PackageReadOnlyGrid" runat="server" AutoGenerateColumns="False" Visible="false"
                             DataSourceID="spAddNewsTradeProduct" GridLines="None" Skin="Office2007"
                             onitemdatabound="PackageReadOnlyGrid_ItemDataBound"
                             ShowStatusBar="True"
                             OnPreRender="PackageReadOnlyGrid_PreRender" >
                 <MasterTableView CommandItemDisplay="None" >     
                    <Columns>
                       <telerik:GridBoundColumn HeaderText="Service ID" UniqueName="service_id" DataField="service_id"
                         Visible="false" Display="false"></telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="service_name" HeaderText="Default Package" Display="true"  
                                UniqueName="service_name" ></telerik:GridBoundColumn>
                                              <telerik:GridCheckBoxColumn HeaderText="Purchased" UniqueName="CHECKED" DataField="Checked" EditFormColumnIndex="1">
                       </telerik:GridCheckboxColumn >
                       <telerik:GridMaskedColumn  DataField="Price"  Mask="$ #####.##" DataFormatString="{0:C2}" HeaderText="Price" Display="false" UniqueName="Price"
                                  EditFormColumnIndex="2"     >
                         <ItemStyle HorizontalAlign="Right" />
                      </telerik:GridMaskedColumn>
                       </Columns>
                     <EditFormSettings ColumnNumber="5">
                     </EditFormSettings>
                     <PagerStyle AlwaysVisible="True" />                          
                    </MasterTableView>
                 </telerik:RadGrid>                    
              </EditItemTemplate>
             <HeaderStyle VerticalAlign="Top"></HeaderStyle>
          </telerik:GridTemplateColumn>
        
        <telerik:GridTemplateColumn EditFormHeaderTextFormat=""  HeaderStyle-VerticalAlign="Top" Visible="false" EditFormColumnIndex="1" UniqueName="AlaCartePriceGrid">
           <EditItemTemplate>
               <telerik:RadGrid ID="AlaCartePriceGrid" runat="server" AutoGenerateColumns="False"
                             DataSourceID="spAddNewsTradeProductAlaCarte" GridLines="None" Skin="Office2007"  OnItemCommand="AlaCartePriceGrid_ItemCommand"
                             onitemdatabound="AlaCartePriceGrid_ItemDataBound"
                             ShowStatusBar="True" OnPreRender="AlaCartePriceGrid_PreRender" >
                 <MasterTableView CommandItemDisplay="None"  EditMode="InPlace" DataKeyNames="service_id,Price,Checked,InvoiceChecked" >     
                    <Columns>
                         <telerik:GridBoundColumn HeaderText="Service ID" UniqueName="service_id" DataField="service_id" ReadOnly="true"
                          Visible="false" Display="false"></telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="service_name" HeaderText="Available a la carte Content" Display="true"   ReadOnly="true"
                                 UniqueName="service_name"  ></telerik:GridBoundColumn>
                         <telerik:GridTemplateColumn HeaderText="Purchased" UniqueName="CHECKED">
                         <ItemTemplate>
                          <asp:CheckBox ID="Entitled"  Checked='<%# Eval("Checked") %>' runat="server" />
                                 </ItemTemplate>
                          </telerik:GridTemplateColumn>
                        
                         <telerik:GridTemplateColumn HeaderText="Price" UniqueName="alaPrice">
                           <ItemTemplate>
                                  <telerik:RadNumericTextBox ID="alaPrice" runat="server"  Price='<%# Eval("Price") %>'
                                    Culture="English (United States)" Type="Currency"   DbValue='<%# DataBinder.Eval(Container.DataItem, "Price") %>'  
                                      Width="125px">  
                                  </telerik:RadNumericTextBox>
                               </ItemTemplate>
                         </telerik:GridTemplateColumn>
                         <telerik:GridTemplateColumn HeaderText="Inv. Disp" UniqueName="INCLINV">
                        <ItemTemplate>
                          <asp:CheckBox ID="InclInv"  Checked='<%# Eval("InvoiceChecked") %>' runat="server" />
                                 </ItemTemplate>
                          </telerik:GridTemplateColumn>
                       </Columns>
                    </MasterTableView>
                 </telerik:RadGrid>                    
              </EditItemTemplate>

             <HeaderStyle VerticalAlign="Top"></HeaderStyle>
           </telerik:GridTemplateColumn>   
          
           <telerik:GridTemplateColumn EditFormHeaderTextFormat=""  HeaderStyle-VerticalAlign="Top" Visible="false" EditFormColumnIndex="1">
           <EditItemTemplate>
Iana Tsolova
Telerik team
 answered on 17 Nov 2008
7 answers
395 views

I'm unable to get a horizontal RadMenu to stretch to exactly 100% of a page's body width. I simply set the BODY style to have 0px margin and 0px padding then insert a RadMenu with Flow="Horizontal" and Width="100%".

My goal is to have a menu bar stretch across the top of the screen. It does this, but with a few extra pixels, causing IE7 to display the horizontal scroll bar.



 

<%

@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<%

@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<%

@ Register TagPrefix="telerik" Namespace="Telerik.Charting" Assembly="Telerik.Charting" %>

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

html xmlns="http://www.w3.org/1999/xhtml">

<

head runat="server">

<title>Untitled Page</title>

</

head>

<

body style="margin:0px; padding:0px">

<form id="form1" runat="server"><telerik:RadScriptManager ID="RadScriptManager1" runat="server">

</

telerik:RadScriptManager>

<div>

<telerik:RadMenu ID="RadMenu1" runat="server" DataSourceID="SiteMapDataSource1"

Flow="Horizontal" Width="100%"

ClickToOpen="false" >

<DefaultGroupSettings Flow="Vertical" ExpandDirection="Auto"></DefaultGroupSettings>

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

<ExpandAnimation Type="OutQuart"></ExpandAnimation>

</telerik:RadMenu>

<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" />

</div>

</form>

</

body>

</

html>


Yana
Telerik team
 answered on 17 Nov 2008
3 answers
117 views
Hi All,

I have a page in which i divide the whole screen in three parts by using rad splitter(Page1.aspx).
In each rad splitter pane i have called different url(Page2.aspx, Page3.aspx).
But when i open a rad window (window manager is on Page2.aspx, Page3.aspx), this window does not apper on whole screen. It appears only in container splitter area of the page.

How will i open this rad window on whole screen.

Thanks & Regards
Brijendra Pandey
Svetlina Anati
Telerik team
 answered on 17 Nov 2008
3 answers
116 views
Have two dependent grids and after much browsing on your site finally got them linked up and working on display.

However, my insert is failing on the second grid because it doesn't know what the key value from the first grid is.

I downloaded an example from another posting but all the code was empty in it so it wasn't much help.

I presume I need to use the 'selectedvalue' of the first grid but I'm not sure how to tell the second grid what that value is. How or where.

That is where I need help.

Thank you,

Paulette
Yavor
Telerik team
 answered on 17 Nov 2008
1 answer
168 views
Hi

How can I set values (bind) to the RadNumericInput control:
(as shown below)

Value='<%# DataBinder.Eval(Container, "DataItem.Salary")%>'    

But cater for DbNull.Value values?
The users do not want to see the value zero "0.0000" they want to be able to see that the value is null, nothing / blank textbox.
I receive a "Specified cast is not valid." error message if I try and bind it to a datatable with some Null values.

Here is my full RadNumericTextBox control declaration:

                        <telerik:RadNumericTextBox ID="radNumericTextBox" runat="server" Type="Number" 
                            Value='<%# DataBinder.Eval(Container, "DataItem.Salary")%>'                           
                            LabelCssClass="radLabelCss_Web20" Skin="Telerik" Width="80px" style="TEXT-ALIGN: left"   
                            Font-Size="8pt" > 
                            <NumberFormat DecimalDigits="4" /> 
                            <FocusedStyle BorderColor="Red" BorderStyle="Double" /> 
                            <HoveredStyle BorderColor="Red" BorderStyle="Double" /> 
                        </telerik:RadNumericTextBox> 
Missing User
 answered on 17 Nov 2008
1 answer
328 views

VS2005 SP1, RadControls for ASP.NET Ajax version 2008.3.1105.20, VS2005 Integrated Web Hosting

I am getting the following popup error message:

"Web.Config registration missing!
 The Telerik dialogs require a HttpHandler registration in the web.config file.  Please, use the control's Smart Tag to add the handler automatticaly, or see the help for more information: Controls > Editor > Dialogs"

Here is the httpHandlers section of the web.config:

<httpHandlers> 
     <remove path="*.asmx" verb="*" /> 
      <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.3.1105.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 
          validate="false" /> 
      <add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.3.1105.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 
       validate="false" /> 
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.3.1105.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 
       validate="false" /> 
      <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
      <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
      validate="false" /> 
      <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
      validate="false" /> 
      <add path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI, Version=2008.3.1105.20, Culture=neutral, PublicKeyToken=121FAE78165BA3D4" /> 
      <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
      validate="false" /> 
</httpHandlers> 

and the markup from the page:

<script type="text/javascript" language="javascript">  
    function SpellCheck() {  
         var spell = $find('commentsSpellCheck');  
         spell.startSpellCheck();  
    }  
 
    function SpellCheckComplete() {  
         var comments = $find('comments');  
         comments.updateDisplayValue();  
    }  
</script> 
<table> 
  <tr> 
        <td>&nbsp;</td> 
        <td><span class="table_header">Comments:</span></td>                          
        <td align="right">  
             <asp:ImageButton ID="spellCheck"   
                                    runat="server"   
                                    ImageUrl="~/images/spellcheck.png"   
                                    OnClientClick="SpellCheck();" /> 
        </td> 
  </tr> 
  <tr> 
        <td valign="top">  
        </td> 
        <td colspan="2" valign="top">  
             <telerik:RadSpell ID="commentsSpellCheck" 
                                     runat="server" 
                                     ControlToCheck="comments" 
                                     SupportedLanguages="en-US,English" 
                                     DictionaryPath="~/App_Data" 
                                     WordIgnoreOptions="UPPERCASE,WordsWithCapitalLetters,WordsWithNumbers" 
                                     FragmentIgnoreOptions="All" 
                                     OnClientDialogClosed="SpellCheckComplete"   
                                     Skin="Inox"   
                                     ButtonText=""   
                                     ButtonType="None" />                                              
             <telerik:RadTextBox ID="comments"   
                                        runat="server"   
                                        Skin="Inox"   
                                        EmptyMessage="Enter any comments here"   
                                        Rows="5" 
                                        Width="100%" 
                                        TextMode="MultiLine" 
                                        Wrap="true" /> 
        </td> 
  </tr> 
</table>                  
 

Rumen
Telerik team
 answered on 17 Nov 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?