Telerik Forums
UI for ASP.NET AJAX Forum
26 answers
417 views
Hi guys,

New slider looks very tasty (in fact it all does) but can we have a two thumb version of the slider. Very useful for specifying numeric ranges ie. ring size > 4 and ring size < 8

Cheers,

Pete
Vanessa
Top achievements
Rank 1
 answered on 08 Dec 2010
1 answer
104 views

Hi,
I'm relatively new to the Radgrid and EntitySpaces. I know that they work extremely well together but I've been stumped for a few hours today with a problem. I've got a rad grid that is bound to an esDataSource, the datasource has a field that is a lookup value. I can bind the grid to the initial datasource and at this stage insertion and editing works fine. However, when I use a template column to add an dropdown control for the look up field (binding it in the ItemDataBound event handler), I can edit values well but when I insert new values though the lookup values are saved as empty values. I cant seem to grab the lookup dropdown value during the insert event.

Any suggestions would be helpful. Sample code or examples would be appriciated.

Here's my code:

<asp:Panel ID="pnlBreadcrumb" runat="server">
</asp:Panel>
  
<asp:Label ID="lblMessage" runat="server" Visible="false" Text="No list configuration found" />
  
  
<telerik:RadGrid ID="grdLevelValues" runat="server" GridLines="None" 
    AllowAutomaticInserts="True" AllowAutomaticUpdates="True" 
    DataSourceID="datListValues" AutoGenerateColumns="False" 
    onitemcommand="grdLevelValues_ItemCommand" 
    onitemdatabound="grdLevelValues_ItemDataBound" 
    onitemcreated="grdLevelValues_ItemCreated"    
    AllowSorting="True"
    AllowPaging="True" 
    PageSize="25"
    >
<HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>
  
<MasterTableView datakeynames="IdBusinessUnit" datasourceid="datListValues" CommandItemDisplay="Top" EditMode="InPlace">
    <Columns>
        <telerik:GridBoundColumn DataField="BusinessUnitName" HeaderText="Business Unit" 
            UniqueName="column1">            
        </telerik:GridBoundColumn>                    
        <telerik:GridTemplateColumn UniqueName="State">
            <HeaderTemplate>
                <asp:Label ID="lblStateNameHeader" Text="State Name" runat="server"></asp:Label>               
            </HeaderTemplate>
            <ItemTemplate>
                <asp:Label ID="lblStateName" runat="server" Text='<%# Eval("UpToAddressStateItemByIdState.State") %>' />
            </ItemTemplate>
            <EditItemTemplate>
                <asp:DropDownList ID="ddlStateName" runat="server"></asp:DropDownList>
            </EditItemTemplate>
        </telerik:GridTemplateColumn
                                                                         
  
          
        <telerik:GridEditCommandColumn></telerik:GridEditCommandColumn>
         
    </Columns>
  
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1"></EditColumn>
</EditFormSettings>
</MasterTableView>
</telerik:RadGrid>
  
  
  
<cc1:esDataSource ID="datListValues" runat="server" 
    onescreateentity="datListValues_esCreateEntity" 
    onesselect="datListValues_esSelect"
    AutoPaging="true" 
    AutoSorting="true"/>

code behind:
protected void Page_Load(object sender, EventArgs e)
       {
                 }
       protected void grdLevelValues_ItemCommand(object source, GridCommandEventArgs e)
       
                 }
       protected void grdLevelValues_ItemDataBound(object sender, GridItemEventArgs e)
       {
           if ((e.Item is GridEditableItem) && e.Item.IsInEditMode)
           {
                
               AddressStateCollection states = new AddressStateCollection();
               states.Query.SelectAll();
               states.Query.Load();
               GridEditableItem gridEditableItem = (GridEditableItem)e.Item;
                  
               DropDownList dropDownList = (DropDownList)gridEditableItem["State"].FindControl("ddlStateName");
               dropDownList.DataSource = states;
               dropDownList.DataTextField = "State";                
               dropDownList.DataValueField = "IdState";
                 
               //Find the selected index by assuming that the ddl datasource will maintain the order inwhich its items were added.
               int ddlSelectedIndex =0;
               foreach(AddressStateItem state in states)
               {
                  if ((gridEditableItem.DataItem is GridInsertionObject) == false)                   
                   {
                       if (state.IdState == System.Convert.ToInt32(((Westpac.VOS.Data.BusinessUnitItem)gridEditableItem.DataItem).IdState))
                       {
                           break;
                       }
                       ddlSelectedIndex ++;
                   }
                   else
                       break;
               }
               dropDownList.SelectedIndex =  ddlSelectedIndex; 
                 
               dropDownList.DataBind();
           }   
       }
       protected void grdLevelValues_ItemCreated(object sender, GridItemEventArgs e)
       {
           if (e.Item is GridEditableItem && e.Item.IsInEditMode)
           {
               GridEditableItem item = e.Item as GridEditableItem;
               //validation code goes here...
           }
       }
       protected void datListValues_esSelect(object sender, EntitySpaces.Web.esDataSourceSelectEventArgs e)
       {
           BusinessUnitCollection values = new BusinessUnitCollection();
           values.Query.SelectAll();
           values.Query.Load();
           e.Collection = values;
         
       }
       protected void datListValues_esCreateEntity(object sender, EntitySpaces.Web.esDataSourceCreateEntityEventArgs e)
       {
           BusinessUnitItem entity = new BusinessUnitItem();
           // Insert
           if (e.PrimaryKeys == null) // A new record to be created
           {
               entity.AddNew();
               entity.IdBrand = VosContext.Current.Brand.Id;
               foreach (GridDataItem item in this.grdLevelValues.Items)
               {
                   DropDownList dropDownList = (DropDownList)item["State"].FindControl("ddlStateName");
                   if (dropDownList != null)
                   {
                       entity.IdState = System.Convert.ToInt32(dropDownList.SelectedValue);
                   }
               }  
           }
           else // Update
           {                
               entity.LoadByPrimaryKey((int)e.PrimaryKeys[0]);
               
               foreach (GridDataItem item in this.grdLevelValues.Items)
               {
                    
                    DropDownList dropDownList = (DropDownList)item["State"].FindControl("ddlStateName");
                    
                    if (dropDownList != null)
                    {
                        entity.IdState = System.Convert.ToInt32(dropDownList.SelectedValue);
                    }
                 
               }  
                  
           }
           e.Entity = entity;
       }
       

evo
Top achievements
Rank 1
 answered on 08 Dec 2010
2 answers
141 views
I have version 2008.3.1125.20 of the Telerik RadControls for ASP.NET AJAX.

Does some newer version of Telerik.Web.UI.dll support Japanese language in the chart? Currently, all I get is squares showing up in place of the actual characters.
Gregory
Top achievements
Rank 1
 answered on 08 Dec 2010
1 answer
77 views

Hi guys,
I have a following code in my aspx page:

 

<

 

telerik:GridTemplateColumn HeaderText ="Eis-Id" UniqueName ="PRICol" Groupable="true" DataField="FILENO" SortExpression="FILENO" ReadOnly="true" HeaderButtonType="TextButton">

 

 

 

<ItemTemplate>

 

 

 

<asp:Label ID="PRI" runat="server" ></asp:Label>

 

 

 

<asp:Image ID="Image1" runat="server" AlternateText="EIS CHARGES"/>

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 


When I export grid to pdf I need to hide image label.I need just PRI label on the report.

I add some code but entire column disappeared from pdf:

DetailGrid.MasterTableView.GetColumn(

"PRICol").Visible = false;

 


Thanks so much for your help.
Daniel
Telerik team
 answered on 07 Dec 2010
1 answer
36 views
I'm exporting a radgrid to Excel successfully. This is my code
gvwMaterial.ExportSettings.ExportOnlyData = true;
gvwMaterial.ExportSettings.IgnorePaging = true;
gvwMaterial.ExportSettings.OpenInNewWindow = true;
gvwMaterial.ExportSettings.Excel.Format = GridExcelExportFormat.Html;
gvwMaterial.ExportSettings.FileName = String.Format("File_{0}_{1}_in_{2}.xls", aaa, bbb.ToString(), ccc.ToString());
gvwMaterial.MasterTableView.ExportToExcel();

When Excel is opened, numbers with decimals, (percents like 0.12), are rounded to 0 or 1
How I can to format this columns?

Thanks

Carlos 
Daniel
Telerik team
 answered on 07 Dec 2010
3 answers
61 views
Hi .
    when i try to  bind data to grid it showing the error like this htmlfile: Unknown runtime error.It also showing error when i click the next page(paging) in grid.

Can  any one tell me what is the problem  here.And how to over come it.

Thank You.
Suresh K.
Daniel
Telerik team
 answered on 07 Dec 2010
3 answers
150 views
Hi everyone.

I am trying to create my own skin to the rad grid. I tried the example 
http://demos.telerik.com/aspnet-ajax/grid/examples/styles/customskin/defaultcs.aspx

I want to put a border of 1px in the radpager but i can´t .
With firebug i see
.RadGrid td.rgPagerCell {
    border0 none;
    padding5px 0 4px;
}
if i put border :1 , the border shows up.. but this come from a web resources...  How can i create the border .

Thanks.

jolynice
Top achievements
Rank 1
 answered on 07 Dec 2010
2 answers
297 views
Hi!  I have a RadGrid which uses the FilterTemplate with a RadComboBox in GridBoundColumns.   When the page initially loads all of the filter options in the RadComboBox are not listed, however, if the page is refreshed all the options appear in the filter.

Currently the SQL statement used to initially populate the filter is in the Page_Load method, and is outside of the 'IF Not IsPostBack' logic.

 A method to refresh the combo boxes gets called in the RadGrid1_PreRender event handler.  This method takes the original SQL statement and appends a where clause which contains the value selected in the combo box by the user, after which a call to RadGrid1.MasterTableView.Rebind() is made.  The actual filtering does work as expected.

I was wondering if someone could provide some insight on how the filtering works in regards to a page initially loading, and if there is a better place to put the logic.

Thanks!
Amy
Top achievements
Rank 1
 answered on 07 Dec 2010
1 answer
65 views
I am trying to apply custom Dropdown Filter in Detail grid and the filter is coming up but Filter Row Height , not sure from where its picking this height , can anyone help me on this to reduce this white space.
v s
Top achievements
Rank 1
 answered on 07 Dec 2010
3 answers
214 views
I'm using the basic features of the list box (Q2 2009) and the functionality seems to work fine. I am having an issue with how it handles page resizing and div scrolling.
1. when I resize the browser window (IE 7) - the list box does not move and it overlaps the div border, causing it to cover the footer content.
2. when I scroll the div - all other controls move up or down, but the list box stays put.

I have it sitting in a <div> that has overflow set to auto and it's height set dynamically. The same div contains several Labels. 

The short and sweet version of the aspx...

<div id="MainDiv">   
<telerik:RadAjaxPanel> 
<div id="MultipageDiv">   -- this div is set to overflow:auto in a stylesheet;   
<telerik:RadMultiPage> 
<telerik:RadPageView ID="RadPageViewCustomers" runat="server">   
<div id="ViewPageDiv" >              
<asp:Table ID="Table1" runat="server" Width="800px">   
<asp:TableRow> 
<asp:TableCell>   
<telerik:RadListBox>
   
 
   
 
 
 
   
 
   
 
 
 
   
 
 
 

 

 Any ideas?

kapil sharma
Top achievements
Rank 1
 answered on 07 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?