Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
750 views
Hi,
Im trying to Bind datasource to datagrid. On Click of refresh button on Grid,
 <CommandItemTemplate>
                <table width="100%">
                    <tr>
                        <td align="right">
                            <asp:Button ID="btnClearFilters" runat="server" CssClass="rgCancel" CommandName="ClearFilters" /><asp:LinkButton
                                ID="lnkClear" runat="server" CommandName="ClearFilters" Text="Clear Filters"></asp:LinkButton>&nbsp;&nbsp;&nbsp;
                           
                        </td>
                    </tr>
                </table>
            </CommandItemTemplate>


 protected void rgProjects_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
if (e.CommandName == RadGrid.RebindGridCommandName)
                {
                GridDataItem item = (GridDataItem)e.Item;  // Here e.Item is always null
                string documentID = DataBinder.Eval(e.Item.DataItem, "DocumentID").ToString();

                //  string documentID = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["DocumentID"].ToString();
                string library = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Library"].ToString();
                string application = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ApplicationName"].ToString();
                string document = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Document"].ToString();

                }
}

Can any1 tell me how to get the Dataitem for current roww

-Mahender
Erik
Top achievements
Rank 2
 answered on 29 Apr 2013
1 answer
209 views
Hi,

I am using the timeline view and I want to show only one appointment for timeslot. I have the following settings for the RadScheduler:

		this.RadScheduler1.TimelineView.SlotDuration = TimeSpan.Parse("1.00:00:00");
                RadScheduler1.TimelineView.TimeLabelSpan = 1;
                RadScheduler1.TimelineView.ColumnHeaderDateFormat = "MM/dd/yyyy";
                RadScheduler1.TimelineView.NumberOfSlots = 10;


How to set the appointment's size to fill the time slot? 

Thanks,

Plamen
Telerik team
 answered on 29 Apr 2013
1 answer
122 views
Hi guys,

I have 2 RadComboBoxes, the First ComboBox 'ProductGroups' gets populated directly from a SQL database, once i have made a selection from the 'ProductGroups' ComboBox the Second RadComboBox 'Products' should be populated automatically Only with the data that is related to the selectedValue made from the First ComboBox. So If an item was NOT selected from the first comboBox the second ComboBox Will not be populated.

ProductGroups (1st) box populates properly i am just having issues populating the second Box with data, the Second ComboBox does not have any TreeViews inside of it, its just single item select.

Here are my 2 Classes i am using

public class ProductGroup
    {
        #region Properties
 
        [Key]
        public int ProductGroupID { get; set; }
        
        [Column("ProductGroup")]
        public string ProductGroupName { get; set; }
        [Column]
        public bool Active { get; set; }
 
        #endregion
 
 
        #region Methods
        public static IEnumerable<ProductGroup> GetActiveProductGroups()
        {
            iThNkContext db = new iThNkContext();
 
            var ProductGroupList = db.ProductGroups.Where(grp => grp.Active == true).OrderBy(p => p.ProductGroupName);
 
            return ProductGroupList.ToList();
        }
        #endregion
    }


public class Product
    {
        #region Properties
 
        [Key]
        public int ProductID { get; set; }
         
        [Column("Product")]
        public string ProductName { get; set; }
        [Column]
        public bool Active { get; set; }
        [Column]
        public int ProductGroupID { get; set; }
 
        #endregion
 
        #region Methods
        // Checks for active products and will only return active ones in the form of a list.
            public static IEnumerable<Product> GetActiveProducts(int productGroupID)
            {
 
                    iThNkContext db = new iThNkContext();
 
                    var productList = db.Products.Where(p => p.ProductGroupID == productGroupID && p.Active == true).OrderBy(p => p.ProductName);
 
                    return productList.ToList();
 
            }
        #endregion
 
    }


And here is the other code i am using to do the actual populating

protected void cboProductGroup_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
        {
            cboProductGroup.DataSource = iThNkPOCO.Models.ProductGroup.GetActiveProductGroups();
            cboProductGroup.DataBind();
        }
 
        protected void cboProductGroup_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            cboProduct.DataSource = iThNkPOCO.Models.Product.GetActiveProducts(Convert.ToInt32(e.Value));
            cboProduct.DataBind();
        }

I dont get any Errors, the second RadComboBox just isnt populating.

Thanx in advance
Plamen
Telerik team
 answered on 29 Apr 2013
2 answers
198 views
Hi everything is working when I run locally.
But RadUpload not showing after upload to IIS, i am using asp.net 4.0, IIS 7

My web config
<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  -->
<configuration>
  <connectionStrings>
    <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
    <add name="DB" connectionString="server=.;user id=sa;password=sa123!;database=AspNetHelper" providerName="System.Data.SqlClient" />
  </connectionStrings>
  <appSettings>
    <add key="SiteAddress" value="http://localhost:9339/" />
     <add key="ImagePath" value="c:\AspNetHelperImage"/>
    <add key="ProjectFile" value="C:\AspNetHelperProjectFile" />
  </appSettings
 
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <trust level="Full" originUrl="" />
    <httpRuntime
    executionTimeout="90"
    maxRequestLength="4096000"
    useFullyQualifiedRedirectUrl="false"
    minFreeThreads="8"
    minLocalRequestFreeThreads="4"
    appRequestQueueLimit="100"
    enableVersionHeader="true"
    />
     <httpModules>
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
    </httpModules>
 
    <httpHandlers>
      <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource" validate="false" />
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
     <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
   </httpHandlers>
    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
    </authentication>
    <membership>
      <providers>
        <clear/>
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
      </providers>
    </membership>
    <profile>
      <providers>
        <clear/>
        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
      </providers>
    </profile>
    <roleManager enabled="false">
      <providers>
        <clear/>
        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
        <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
      </providers>
    </roleManager>
<customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
    <pages theme="BlueTheme">
    </pages>
  </system.web>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
    <validation validateIntegratedModeConfiguration="false" />
     
     
    <handlers>
      <add name="Telerik.Web.UI.WebResource.axd*" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource" />
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" />
      <add name="Telerik.RadUploadProgressHandler.ashx_*" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.RadUploadProgressHandler" />
  </handlers>
  </system.webServer>
</configuration>

aspx page is
<telerik:RadProgressManager ID="Radprogressmanager1" runat="server"  />
 
 Project File
<input type="file" id="file1" runat="server" name="file1" />
<telerik:RadProgressArea ID="progressArea1" runat="server" Skin="Office2007"
Language=""  />

Please help
Arijit Chatterjee
Mohammad
Top achievements
Rank 1
 answered on 29 Apr 2013
8 answers
540 views
Hello,

I need a help to display checkbox in proper format using item template.

My scenorio is to select mutiple rows from mutilpe column combo and display the count of selected rows either in Footer or displaying a alert box( using OnClientDropDownClosing) after selecting the items .If I use builtin Checkbox (CheckBoxes="true" ) ,I am able to get the count in alert box but I am not able to format the content(mutilple coulmn) properly(Checkbox and Item Template contents are coming in different rows) . In order to format the content I am using Checkbox control in Item Template but not able to get the count using the code given in Telerik site for OnClientDropDownClosing. My code is as below.

<
telerik:RadComboBox ID="rcbPorts" runat="server" EnableLoadOnDemand="true"
                        HighlightTemplatedItems="true" OnClientItemsRequested="UpdateItemCountField" OnClientDropDownClosing
                        OnDataBound="rcbPorts_DataBound" OnItemDataBound="rcbPorts_ItemDataBound" MarkFirstMatch="true"
                        EmptyMessage="Select Ports" AutoPostBack="true" Width="500px" DataTextField="PortName"
                        DataValueField="PortCode">
                          <HeaderTemplate>
                            <ul>
                                <li class="col1">Select</li>
                                <li class="col2">Country Name</li>
                                <li class="col3">Port Name</li>
                                <li class="col4">Port Type</li>
                            </ul>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <ul>
                                <li class="col1">
                                    <asp:CheckBox runat="server" ID="chkport" Text="" onclick="stopPropagation(event);" />
                                </li>
                                <li class="col2">
                                    <%# DataBinder.Eval(Container.DataItem, "PCountryName")%></li>
                                <li class="col3">
                                    <%# DataBinder.Eval(Container.DataItem, "PortName")%></li>
                                <li class="col4">
                                    <%# DataBinder.Eval(Container.DataItem, "PortType")%></li>
                            </ul>
                        </ItemTemplate>
                        <FooterTemplate>
                            A total of
                            <asp:Literal runat="server" ID="RadComboItemsCount" />
                            items
                        </FooterTemplate>
                    </telerik:RadComboBox>

Please provide me solution for either of the below 2 isuues:
- If we use Checkbox control in Item Template,how to get the count?
- If we use builtin checkbox,how to format the Item Template and Header Template?

Thanks in Advance!
Rev
Top achievements
Rank 1
 answered on 29 Apr 2013
0 answers
170 views
Hi, I am using a RadCombobox to display a list of values from a DB. i want to display two columns separated by a '-' as the Text so i used 
this:
<telerik:RadComboBox runat="server" ID="tlkBiennium" EmptyMessage="select a biennium from the list" Filter="Contains" Width="200" AppendDataBoundItems="true" DataValueField="BienniumId">
                    <ItemTemplate>
                        <table>
                            <tr>
                                <td><%# DataBinder.Eval(Container.DataItem,"StartYear") %></td>
                                <td>-</td>
                                <td><%# DataBinder.Eval(Container.DataItem,"EndYear") %></td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </telerik:RadComboBox>

in the code behind:
if(!IsPostBack){
    tlkBiennium.DataSource = container.Bienniums.ToList();
    tlkBiennium.DataBind();
}

the items are displayed properly however when  select one, I get the name of the class in the combobox. 
can someone tell me what i am doing wrong?
thanks
ck
Top achievements
Rank 1
 asked on 29 Apr 2013
2 answers
133 views
Hi, I've searched and found similar topics but I'm seeing some unusual behaviour. For reference I am using 2013Q1 and have access to the latest version.

I know the fundamentals behind hiding the classes by pointing to an external empty css stylesheet or adding a blank class CssClasses.Add("", "") etc.

This doesn't work however because I want to hide the Apply Class dropdown list on the main editor toolbar (deleted from toolsfile), the add blank class doesn't work when it is omitted, as soon as I put it on the main editor the Apply Class dropdown list clears in the hyperlink manager.

I can leave the dropdown on the main toolbar if necessary, and that is what I am doing at the moment but was wondering if I could get access to add a blank style to the Apply Class dropdown list on the hyperlink manager without having to add it to the main editor toolbar?

Additionally I'd like to not map external templates if possible.

Thanks for any pointers,
John C.
John Colclough
Top achievements
Rank 1
 answered on 29 Apr 2013
2 answers
67 views

Recently our QA team assigned the issue to me. Cursor is blinking over tooltip in the IE10 (and older versions of the Internet Explorer.   

I am able to recreated the issue in the Telerik online examples, here http://demos.telerik.com/aspnet-ajax/tooltip/examples/waiariasupport/defaultcs.aspx

See attached image.

However there is no such issue in the Fire Fox or Google Chrome.

Any solutions for the problem?

Ruben Markosyan
Top achievements
Rank 1
 answered on 29 Apr 2013
4 answers
130 views
hello
 i want to display the bars on same chart with different color ,i tried many ways it's not working.....
Gokul
Top achievements
Rank 1
 answered on 29 Apr 2013
1 answer
97 views
I'm using version 2013.1.417.40 demo mode of the RadEditor. If I change the font in the middle of a line and start typing the new font works. When I press Enter to start a new line, the font reverts back. Is there a way to configure the editor to "carry" the font to the new line? I'm using IE10 on Win7. Thanks.
Misho
Telerik team
 answered on 29 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?