Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
374 views
Hello!

I've made a simple site - the same as here:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/listview/defaultcs.aspx

I will explain on example above.

In ItemTemplate i need CustomerID to format hyperlink with this variable.

But I don't want to show CustomerID in header and allow users to sorting and filtering by CustomerID value.

How to do this? The file structure (.aspx and code behind) the same as in link above.

Thanks.



Sebastian
Telerik team
 answered on 30 Sep 2009
1 answer
80 views
I want to use a GridTemplateColumn in my grid, this is how im using it
<telerik:GridTemplateColumn DataField="CastMember" DataType="System.String" HeaderText="Cast Member"    
                        SortExpression="CastMember" UniqueName="CastMember">     
                        <EditItemTemplate> 
                            <telerik:RadTextBox ID="RadTextBoxCastMember2" runat="server" Skin="Vista" Width="250px" MaxLength="100" > 
                            </telerik:RadTextBox>     
                              
                        </EditItemTemplate>    
                    </telerik:GridTemplateColumn>   

when I edit the grid, I want the text box to contain the contents of the underlying datafield, so in my

ItemCreated

event ive puit this code

protected void RadGridCast_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)  
        {  
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
            {  
                if (!e.Item.OwnerTableView.IsItemInserted)  
                {  
                      
                    GridEditableItem item = e.Item as GridEditableItem;  
                    RadTextBox tb = (RadTextBox)item.FindControl("RadTextBoxCastMember2");  
 
                      
                      
 
                     
                }  
 
            }  
               
 
        }    

how do I obtain the data to put in the textbox when its in edit mode ???  Ive tried several methods but none of them work.  Can someone give me a working example ?
Daniel
Telerik team
 answered on 30 Sep 2009
8 answers
378 views
is there a way for me to set a back color for a certain row like. row 1 backcolor is red, row 4 pink, row 9 blue.

Also, is there a away to align the column to the right on certain column?. like column1 right, 3 left, 7 right, etc...
Dimo
Telerik team
 answered on 30 Sep 2009
1 answer
140 views
I am having a problem when any ajax call is made from a page that has a special character in the page title.  The title displays correctly when the page loads, but once an ajax call is made the special character is replaced by the character code used to represent the character.  For example, the trademark symbol is shown when the page loads, but &#0153; is shown after the ajax call.  Any suggestions?
Daniel
Telerik team
 answered on 30 Sep 2009
1 answer
182 views
Hello,
I'm trying create grid without pager with vertical scroll.

Please see code below:
 
<radG:RadGrid runat="server" ID="gvMultiUpload" 
              AutoGenerateColumns="false"   
              AllowMultiRowSelection="true" 
              Height="105px" 
              Width="364px">   
                        <MasterTableView Width="100%" TableLayout="Fixed">  
                            <Columns> 
                               <radG:GridClientSelectColumn AutoPostBackOnFilter="false" HeaderStyle-Width="23px" /> 
                                <radG:GridBoundColumn UniqueName="PalletSerialNumber" DataField="PalletSerialNumber" HeaderText="<%$ Resources:GridResource, PalletNum %>" />     
                                <radG:GridBoundColumn UniqueName="TagSerialNumber" DataField="TagSerialNumber" HeaderText="<%$ Resources:GridResource, SensorID %>" />                                 
                                <radG:GridTemplateColumn UniqueName="PalletLocation" HeaderText="<%$ Resources:Resource, lblPalletLocation %>">  
                                     <itemstyle horizontalalign="Center" /> 
                                     <headerstyle horizontalalign="Center" /> 
                                     <itemtemplate> 
                                        <radI:RadNumericTextBox ID="txtPalletLocation" runat="server" Type="Number"  Width="30px"   
                                            MinValue="1" MaxValue="26" 
                                            CssClass="smallTextBox" 
                                            ShowSpinButtons="true">    
                                            <NumberFormat DecimalDigits="0" />    
                                        </radI:RadNumericTextBox>    
                                     </itemtemplate> 
                                </radG:GridTemplateColumn> 
                            </Columns> 
                        </MasterTableView> 
                        <ClientSettings> 
                            <Selecting AllowRowSelect="true" /> 
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" /> 
                        </ClientSettings> 
                    </radG:RadGrid>      

Attachment is a result of this code!!!

Any ideas?

Thanks a lot

Dimo
Telerik team
 answered on 30 Sep 2009
1 answer
115 views
Hi,

I have a client-side situation where I need to control when the <asp:CustomValidator> ClientValidationFunction is called. Is there any way to disable the default (implicit) call and then call it explicitly from javascript?

Thanks for any tips!
R
Yana
Telerik team
 answered on 30 Sep 2009
4 answers
117 views
If you go to our site www.baudville.com and search for item 71238RD and click on the personalize and add to cart, and then select the drop down for Anniversary year, it seems to jump off to the right in any version of Firefox. Any help on this would be appreciated, thanks.

 

 

<tr style="display: none;" id="trQualFlagA" runat="server">

 

 

 

<td nowrap="nowrap">

 

 

 

<span id="Span1">Anniversary Year</span>

 

 

 

</td>

 

 

 

<td>

 

 

 

 

<rad:RadComboBox ID="radDdlYear" runat="server" NoWrap="false"

 

 

 

Skin="Vista" Width="50px" AutoPostBack="false" OnClientSelectedIndexChanged="changeYear"

 

 

 

EnableScreenBoundaryDetection="false" EnableVirtualScrolling="false">

 

 

 

</rad:RadComboBox>

 

 

 

<rad:RadTextBox ID="radTbAnnivYear" Style="width: 20px; display: none;" TextMode="SingleLine"

 

 

 

runat="server" MaxLength="2">

 

 

 

</rad:RadTextBox>

 

 

 

</td>

 

 

 

<td>

 

 

 

&nbsp;

 

 

 

</td>

 

 

 

</tr>

 

Kamen Bundev
Telerik team
 answered on 30 Sep 2009
1 answer
171 views
Hi

I'm having trouble with the RadAjax tools, I guess it stems from not fully understanding them, dispite being able to use them due to their ease of use.

I have an update trigger that updates several area of a page, at first I didn't have a loading panel, but for lengthy updates the users didn't get any feedback that something was going on.

When I add the loading panel it showed in each area of the page when working, that upto 4 instances.

I have set the IsSticky to true and it appears on the left only, and dispite seting the background position property to center it stays there.

How do I get a loading panel to disply in the centre of my page?

Andy
Dimo
Telerik team
 answered on 30 Sep 2009
0 answers
194 views
Hi
          I used the user control, the user control functions like combo box with rad tree view. this user control i used so many pages. I used the sessions for selected rad tree view selected nodes for searching or inserting values. it is working fine.When i select(node rad tree view) and search. the result found.  when i move to another page search by default this session value search result is showing. Herewith i cannot clear the session value after search because the need data source asking session value for  Edit and retrieval purpose. Let me how can i solved this problem..

Herewith i send some sample coding


Ascx User Cotnrol Sample Codings

 <telerik:RadAjaxPanel ID="ajaxPnlcmbUniversalSearchDestination" runat="server">
 <telerik:RadComboBox  CausesValidation="false" ID="cmbUniversalSearchDestination"   Text="Destination" EmptyMessage="Destination"
OnItemsRequested="cmbUniversalSearchDestination_OnItemsRequested"
   runat="server"  Width="98%" Font-Size="Small" TabIndex="11">
   <ItemTemplate>                           
   <div class="cmbareadiv">                                    
  <div style="overflow: auto">
 <asp:LinkButton ID="btnDestinationSelect" CausesValidation="false"  OnClick="lnkDestinationSelect_Click" CssClass="footsize"   Text="Select" runat="server"></asp:LinkButton>                                                                                                                                                                                                                                               
<asp:LinkButton ID="btnDestinationClear" CausesValidation="false"  OnClick="btnDestinationClear_Click" CssClass="footsizeclose"   Text="Clear" runat="server"></asp:LinkButton>                                                                                                             
 </div></div>    
<telerik:RadTreeView runat="server" ID="treeDestination"    PersistLoadOnDemandNodes="true"   Skin="Web20" CheckBoxes="true" MultipleSelect="true">                                             
</telerik:RadTreeView>   
 </ItemTemplate>  
<Items>  
 <telerik:RadComboBoxItem Text="" />  
   </Items>  
<CollapseAnimation Duration="200" Type="OutQuint" />
  </telerik:RadComboBox>
 </telerik:RadAjaxPanel>

ascx User control Code behind




        //Load SubArea Details in DropDown
        public void LoadSubAreaFromDB()
        {

            IList<AreaData> subAreaData = new List<AreaData>();
            ArrayList AreaIdList = new ArrayList();
            List<long> destinationlist = new List<long>();
            RadTreeView treedestination = (RadTreeView)cmbUniversalSearchDestination.Items[0].FindControl("treeDestination");
            // treedestination.ClearCheckedNodes();
            destinationlist.Clear();
            foreach (RadTreeNode node in treedestination.Nodes)
            {

                if (node.Checked)
                {
                    destinationlist.Add(Convert.ToInt32(node.Value));
                    long destinationnode = (Convert.ToInt32(node.Value));
                    AreaIdList.Add(destinationnode);
                    Destinationvalues += node.Text + ",";
                    
                }
            }

            JSSessionHandler.SetSessionValue("AreaIdList", AreaIdList);
}}



Aspx Page Calling this function

 
        //Load Area Reference Data From Page
        public AreaAssociationData LoadAreaReferenceDataFromPage()
        {

            UserData sessionUser = (UserData)JSSessionHandler.GetSessionValue("UserData");
            AreaAssociationData aAreaAssociationData = new AreaAssociationData();
            if (sessionUser != null && sessionUser.Id > 0)
            {

                if ((ArrayList)JSSessionHandler.GetSessionValue("AreaIdList") != null)
                {
                    List<AreaData> AssociatedDestinations = new List<AreaData>();
                    List<AreaData> AssociatedSubAreas = new List<AreaData>();
                    List<AreaData> AssociatedLocations = new List<AreaData>();

                    ArrayList DestinationList = new ArrayList();
                    DestinationList = (ArrayList)JSSessionHandler.GetSessionValue("AreaIdList");

                    if (DestinationList != null)
                    {
                        foreach (long DestinationId in DestinationList)
                        {
                            AreaData aDestination = new AreaData();
                            aDestination.Id = DestinationId;
                            AssociatedDestinations.Add(aDestination);

                        }
                    }
                 

                    aAreaAssociationData.DestinationCollection = AssociatedDestinations;
                   
            }
            else
            {
                Server.Transfer("~/Default.aspx");
            }
            return aAreaAssociationData;
        }



  if ((txtUniversalSearchFirstName.Text == string.Empty) && (txtUniversalSearchLastName.Text == string.Empty) && (txtUniversalSearchEmail.Text == string.Empty) && (txtUniversalSearchPostalZipCode.Text == string.Empty) && (JSSessionHandler.GetSessionValue("AreaIdList") == null) && (JSSessionHandler.GetSessionValue("SessioncontactTypelist") == null) && txtContactCode.Text == string.Empty)
            {
                LblSearchMsg.Visible = true;
            }

            else
            {

 SearchContacts();

   }

}



mani
Top achievements
Rank 1
 asked on 30 Sep 2009
1 answer
210 views
Hello.

I am using a rad numeric textbox on my page, but however, I cannot make use of the decimal key of my numeric keypad.
I have tried using groupseparator="," and even groupseparator="." but still, the control does not accept the [del] key value.
Instead, if I press the comma "," key, the control accepts it.

<telerik:RadNumericTextBox ID="tbxtest" runat="server">
</telerik:RadNumericTextBox>



I have not set any localization on my page


Can someone please advise how I can achieve that? My users make intensive use of the numeric keypad.
Thanks
Dimo
Telerik team
 answered on 30 Sep 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?