Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
130 views
Hey,
I'm brand new today to telerik and am currently having trouble finding support for my specific problem.

I am making a RadGrid that contains a dropdownlist and textbox in each of their own columns. The dropdownlist is currently populating, but the problem i'm having is that I cannot specify how many rows of data I want to display. The only data needed from the database is from a stored procedure which is populated directed into the dropdownlist for each row without using edit mode.

I only want 8 rows to show up but I cannot get any data to show up unless i directly fill the RadGrid from the database.

If you have any suggestions on how to make the RadGrid show 8 rows at all times, or generate a specific number of rows if would greatly be appreciated.

This is my code here:

<

rad:RadGrid ID="RadGrid1" runat="server" GridLines="None" PageSize="8"

Skin="3D" DataSourceID="SqlDataSource3" EnableAJAX="True">

<PagerStyle PageButtonCount="8" />

<mastertableview allowcustomsorting="True" autogeneratecolumns="False"

datasourceid="SqlDataSource3">

<rowindicatorcolumn visible="False">

<HeaderStyle Width="20px" />

</rowindicatorcolumn>

<expandcollapsecolumn resizable="False" visible="False">

<HeaderStyle Width="20px" />

</expandcollapsecolumn>

<Columns>

<rad:GridTemplateColumn UniqueName="Account" DataField="Account"

HeaderText="GL Account" SortExpression="Account">

<ItemTemplate>

<asp:DropDownList ID="DropDownList2" runat="server"

DataSourceID="SqlDataSource2" DataTextField="Account" DataValueField="Account">

</asp:DropDownList>

</ItemTemplate>

</rad:GridTemplateColumn>

<rad:GridTemplateColumn UniqueName="Amount" DataField="Amount"

HeaderText="Amount">

<ItemTemplate>

<asp:TextBox ID="txtAmount" runat="server"></asp:TextBox>

</ItemTemplate>

</rad:GridTemplateColumn>

</Columns>

</mastertableview>

Vlad
Telerik team
 answered on 17 Apr 2008
3 answers
235 views
I've added a tooltip to a button in an update panel and when clicking the button I get a Javascript error stating: Microsoft JScript runtime error: Sys.InvalidOperationException: Two components with the same id 'RadToolTip1' can't be added to the application.

I'm using Version: 2007.3 1218, VS 2008 RTM, & .Net Framework 3.5
Tervel
Telerik team
 answered on 17 Apr 2008
1 answer
90 views
I'm getting this error when attempting to compile with implementation of new ASP.NET AJAX Grid Control.

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\civil35\d66ff2a7\f4fa5262\App_Code.flp0cy5c.131.vb(34) : error BC30269: 'Public Sub New()' has multiple definitions with identical signatures.

    Public Sub New()

If course there is no way of knowing what module it is complaining about.

Any help would be appreciated.

Thanks
Vlad
Telerik team
 answered on 17 Apr 2008
1 answer
159 views
if controls are contained in a div with style display:none the look in Internet Explorer 7 is incorrect.

see the sample:

------------------------------------------------------------------------------

<!

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>Decorate button</title>

<script type="text/javascript">

function

pageLoad() {

}

function

show_div()

{

var div = $get("divContainer");

div.style.display=

"";

}

</script>

</

head>

<

body>

<form id="form1" runat="server">

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">

</telerik:RadScriptManager>

<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" />

<div style="display:none;" id="divContainer">

<div style="padding:3px;">

<span>

<input id="btnLoginOk" type="button" value="Conferma"/>

</span>

<span>

<input id="btnLoginCancel" type="button" value="Annulla" title="" />

</span>

</div>

</div>

<input id="btnShow" type="button" value="Show" onclick="show_div();" />

</form>

</

body>

</

html>

Tervel
Telerik team
 answered on 17 Apr 2008
1 answer
81 views
OK, I have a main web page with RADAjaxManager.  I have a user control with a grid.  Should I replace the RADAjaxManager with Microsoft ScriptManager.  Will your software allow me to drop the new radgrid into a user control without a ScriptManager?

Obviously the reason I am asking is because I have already tried it and it won't drop into the user control.

Thanks
Konstantin Petkov
Telerik team
 answered on 17 Apr 2008
0 answers
65 views

//<!-- <td width="100%" colspan="2">

// <div id="Div1" runat="server" width="100%" style="height:100%;">

// <table cellpadding="0" cellspacing="0" style="margin: 0 0 0 0;" align="center">

// <rad:RadGrid GridLines="both" AllowPaging="true" PageSize="5" EnableViewState="false" runat="server" BorderStyle="None"

// MasterTableView-ShowHeader="false" ID="rdgSample" Skin="" OnItemDataBound="radItemDataBound" CssClass="" AutoGenerateColumns="false"

// MasterTableView-ShowFooter="true" AllowSorting="true">

// <MasterTableView BorderWidth="0" CssClass="" CellPadding="0" CellSpacing="0" ItemStyle-BorderWidth="0"

// BorderStyle="None" HeaderStyle-BorderWidth="0">

// <PagerStyle PageButtonCount="4" BackColor="Aquamarine" />

// <Columns>

// <rad:GridTemplateColumn HeaderStyle-BackColor="Red" ConvertEmptyStringToNull="true"

// ItemStyle-BorderWidth="0" ShowSortIcon="true" ItemStyle-CssClass="paddingclass"

// UniqueName="TemplateColumn" SortExpression="">

// <HeaderTemplate>

// <tr style="background-color: CadetBlue; margin: 0 0 0 0;">

// <td colspan="3" align="left" style="padding-left: 5px; border-left: solid 1px black;

// border-bottom: solid 1px black; border-top: solid 1px black; margin: 0 0 0 0;"

// nowrap="nowrap">

// <asp:Label ID="lblAllFigures" runat="server" Font-Size="Medium" Font-Bold="true">All Figures in MUSD</asp:Label>

// </td>

// <td colspan="3" rowspan="2" align="center" style="border-left: solid 1px black; border-bottom: solid 1px black;

// border-top: solid 1px black; margin: 0 0 0 0;" nowrap="nowrap">

// <a href="RptOrdersByCountry.aspx">

// <asp:Label ID="lblCountryCode" runat="server" Font-Size="Medium" Font-Bold="true">Country</asp:Label></a>

// </td>

// <td colspan="3" align="center" style="border-left: solid 1px black; border-bottom: solid 1px black;

// border-top: solid 1px black; margin: 0 0 0 0;">

// <asp:Label ID="lblDirectOrders" runat="server" Font-Size="Medium" Font-Bold="true">Direct Orders</asp:Label>

// </td>

// <td colspan="3" align="center" style="border-right: solid 1px black; border-left: solid 1px black;

// border-bottom: solid 1px black; border-top: solid 1px black; margin: 0 0 0 0;">

// <asp:Label ID="Label1" runat="server" Font-Size="Medium" Font-Bold="true">Indirect Orders</asp:Label>

// </td>

// <td colspan="3" align="center" style="border-right: solid 1px black; border-bottom: solid 1px black;

// border-top: solid 1px black; margin: 0 0 0 0;">

// <asp:Label ID="Label17" runat="server" Font-Size="Medium" Font-Bold="true">Account Totals</asp:Label>

// </td>

// </tr>

// <tr style="background-color: CadetBlue; margin: 0 0 0 0; border: solid 1px black;">

// <td align="left" colspan="3" style="padding-left: 5px; margin: 0 0 0 0; border-bottom: solid 1px black;

// border-left: solid 1px black">

// <asp:Label ID="lblSubReportingPeriod" runat="server" Font-Size="Medium" Font-Bold="true"></asp:Label>

// </td>

// <%--<This is a blank column the first row column has row span ==2>--%>

// <td align="center" style="border-bottom: solid 1px black; border-right: solid 1px black;

// border-left: solid 1px black;">

// <asp:Label Font-Size="Medium" Font-Bold="true" ID="lblDirectPreviousYear" runat="server">2006</asp:Label>

// </td>

// <td align="center" style="border-bottom: solid 1px black; border-right: solid 1px black;">

// <asp:Label ID="lblDirectCurrentYear" runat="server" Font-Size="Medium" Font-Bold="true"> 2007</asp:Label>

// </td>

// <td align="center" style="margin: 0 0 0 0; border-bottom: solid 1px black;">

// <asp:Label ID="lblDirectGrowth" runat="server" Font-Size="Medium" Font-Bold="true">Growth</asp:Label>

// </td>

// <td align="center" style="border-bottom: solid 1px black; border-right: solid 1px black;

// border-left: solid 1px black;">

// <asp:Label Font-Size="Medium" Font-Bold="true" ID="lblInDirectPreviousYear" runat="server">2006</asp:Label>

// </td>

// <td align="center" style="border-bottom: solid 1px black; border-right: solid 1px black;">

// <asp:Label ID="lblInDirectCurrentYear" runat="server" Font-Size="Medium" Font-Bold="true"> 2007</asp:Label>

// </td>

// <td align="center" style="margin: 0 0 0 0; border-bottom: solid 1px black; border-right: solid 1px black;">

// <asp:Label ID="lblInDirectGrowth" runat="server" Font-Size="Medium" Font-Bold="true">Growth</asp:Label>

// </td>

// <td align="center" style="border-bottom: solid 1px black; border-right: solid 1px black;">

// <asp:Label Font-Size="Medium" Font-Bold="true" ID="lblAccountToalPreviousYear" runat="server">2006</asp:Label>

// </td>

// <td align="center" style="border-bottom: solid 1px black; border-right: solid 1px black;">

// <asp:Label ID="lblAccountToalCurrentYear" runat="server" Font-Size="Medium" Font-Bold="true"> 2007</asp:Label>

// </td>

// <td align="center" style="margin: 0 0 0 0; border-bottom: solid 1px black; border-right: solid 1px black;">

// <asp:Label ID="lblAccountTotalGrowth" runat="server" Font-Size="Medium" Font-Bold="true">Growth</asp:Label>

// </td>

// </tr>

// </HeaderTemplate>

// <ItemTemplate>

// <tr>

// <td align="left" colspan="3" style="margin: 0 0 0 0; padding: 0 2 0 5; border-bottom: solid 1px black;

// border-left: solid 1px black;">

// <asp:Label ID="lblCustomerName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"CustomerName") %>'>'></asp:Label>

// </td>

// <%--' first Section End Here '--%>

// <td align="center" colspan="3" style="margin: 0 0 0 0; padding: 0 2 0 5; border-bottom: solid 1px black;

// border-left: solid 1px black;">

// <asp:Label ID="lblCountryCodeValue" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Country")%>' />

// </td>

// <td align="center" style="padding: 0 0 0 0; margin: 0 0 0 0; border-bottom: solid 1px black;

// border-right: solid 1px black; border-left: solid 1px black;">

// <asp:Label ID="lblDirectPreviousYearValue" Text='<%#(Convert.ToString(DataBinder.Eval(Container.DataItem,"PYDirectOrders"))!="" )?Int32.Parse(Convert.ToString(DataBinder.Eval(Container.DataItem,"PYDirectOrders"))).ToString("###,###,###.00"):"0"%>'

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

// </td>

// <td align="center" style="margin: 0 0 0 0; padding: 0 0 0 0; border-right: solid 1px black;

// border-bottom: solid 1px black;">

// <asp:Label ID="lblDirectCurrentYearValue" runat="server" Text='<%#Convert.ToString(DataBinder.Eval(Container.DataItem,"CYDirectOrders"))!=""?Int32.Parse(Convert.ToString(DataBinder.Eval(Container.DataItem,"CYDirectOrders"))).ToString("###,###,###.00"):"0"%>'></asp:Label>

// </td>

// <td align="center" style="margin: 0 0 0 0; padding: 0 2 0 5; border-bottom: solid 1px black;">

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

// </td>

// <%--' first Section End Here '--%>

// <td align="center" style="padding: 0 0 0 0; margin: 0 0 0 0; border-bottom: solid 1px black;

// border-right: solid 1px black; border-left: solid 1px black;">

// <asp:Label ID="lblInDirectPreviousYearValue" runat="server" Text='<%#Convert.ToString(DataBinder.Eval(Container.DataItem,"PYIndirectOrders"))!=""?Int32.Parse(Convert.ToString(DataBinder.Eval(Container.DataItem,"PYIndirectOrders"))).ToString("###,###,###.00"):"0"%>'></asp:Label>

// </td>

// <td align="center" style="margin: 0 0 0 0; padding: 0 0 0 0; border-right: solid 1px black;

// border-bottom: solid 1px black;">

// <asp:Label ID="lblInDirectCurrentYearValue" runat="server" Text='<%#Convert.ToString(DataBinder.Eval(Container.DataItem,"CYIndirectOrders"))!=""?Int32.Parse(Convert.ToString(DataBinder.Eval(Container.DataItem,"CYIndirectOrders"))).ToString("###,###,###.00"):"0"%>'></asp:Label>

// </td>

// <td align="center" style="margin: 0 0 0 0; padding: 0 2 0 5; border-bottom: solid 1px black;

// border-right: solid 1px black;">

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

// </td>

// <%--' first Section End Here '--%>

// <td align="center" style="padding: 0 0 0 0; margin: 0 0 0 0; border-bottom: solid 1px black;

// border-right: solid 1px black;">

// <asp:Label ID="lblAccountPreviousYearValue" runat="server" Text='<%#Convert.ToString(DataBinder.Eval(Container.DataItem,"PYAllOrders"))!=""?Int32.Parse(Convert.ToString(DataBinder.Eval(Container.DataItem,"PYAllOrders"))).ToString("###,###,###.00"):"0"%>'></asp:Label>

// </td>

// <td align="center" style="margin: 0 0 0 0; padding: 0 0 0 0; border-right: solid 1px black;

// border-bottom: solid 1px black;">

// <asp:Label ID="lblAccountCurrentYearValue" runat="server" Text='<%#Convert.ToString(DataBinder.Eval(Container.DataItem,"CYAllOrders"))!=""?Int32.Parse(Convert.ToString(DataBinder.Eval(Container.DataItem,"CYAllOrders"))).ToString("###,###,###.00"):"0"%>'></asp:Label>

// </td>

// <td align="center" style="margin: 0 0 0 0; padding: 0 2 0 5; border-bottom: solid 1px black;

// border-right: solid 1px black;">

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

// </td>

// <%--' first Section End Here '--%>

// </tr>

// </ItemTemplate>

// <FooterTemplate>

// <tr style="background-color: DarkGray;">

// <td colspan="6" align="left" style="border-left: solid 1px black; border-bottom: solid 1px black;

// margin: 0 0 0 0; padding-left: 5px;" nowrap="nowrap">

// <asp:Label ID="lblTotalsHeading" runat="server" Font-Bold="true" Font-Size="Small">Totals:</asp:Label>

// </td>

// <td align="center" style="border-left: solid 1px black; border-right: solid 1px black;

// border-bottom: solid 1px black; margin: 0 0 0 0;">

// <asp:Label ID="lblDirectOrdersPreviousYearTotal" Font-Bold="true" Font-Size="Small"

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

// </td>

// <td align="center" style="border-right: solid 1px black; border-bottom: solid 1px black;

// margin: 0 0 0 0;">

// <asp:Label ID="lblDirectOrdersCurrentYearTotal" Font-Bold="true" Font-Size="Small"

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

// </td>

// <td align="center" style="border-bottom: solid 1px black; margin: 0 0 0 0;">

// <asp:Label ID="lblDirectOrdersGrowthTotal" Font-Bold="true" Font-Size="Small" runat="server"></asp:Label>

// </td>

// <td align="center" style="border-left: solid 1px black; border-bottom: solid 1px black;

// margin: 0 0 0 0; border-right: solid 1px black;">

// <asp:Label ID="lblInDirectOrdersPreviousYearTotal" Font-Bold="true" Font-Size="Small"

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

// </td>

// <td align="center" style="border-right: solid 1px black; border-bottom: solid 1px black;

// margin: 0 0 0 0;">

// <asp:Label ID="lblInDirectOrdersCurrentYearTotal" Font-Bold="true" Font-Size="Small"

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

// </td>

// <td align="center" style="border-right: solid 1px black; border-bottom: solid 1px black;

// margin: 0 0 0 0;">

// <asp:Label ID="lblInDirectOrdersGrowthTotal" Font-Bold="true" Font-Size="Small" runat="server"></asp:Label>

// </td>

// <td align="center" style="border-right: solid 1px black; border-bottom: solid 1px black;

// margin: 0 0 0 0;">

// <asp:Label ID="lblAccountPreviousYearTotal" Font-Bold="true" Font-Size="Small" runat="server"></asp:Label>

// </td>

// <td align="center" style="border-right: solid 1px black; border-bottom: solid 1px black;

// margin: 0 0 0 0;">

// <asp:Label ID="lblAccountCurrentYearTotal" Font-Bold="true" Font-Size="Small" runat="server"></asp:Label>

// </td>

// <td align="center" style="border-right: solid 1px black; border-bottom: solid 1px black;

// margin: 0 0 0 0;">

// <asp:Label ID="lblAccountGrowthTotal" Font-Bold="true" Font-Size="Small" runat="server"></asp:Label>

// </td>

// </tr>

// </tr>

// </FooterTemplate>

// </rad:GridTemplateColumn>

// </Columns>

// </MasterTableView>

// </rad:RadGrid>

// </table>

// </div>

// </td> --|>

sanjeev
Top achievements
Rank 1
 asked on 17 Apr 2008
3 answers
229 views
I am experiencing a strange problem when using the web.config setting to apply a skin to all of the telerik controls in my site.  If I apply a skin through the Skin attribute on an individual RadComboBox, it seems to work fine, and look quite nice.  However, if I apply the same skin by adding the appSetting:
<add key="Telerik.Skin" value="Telerik"/>
The control does not look or behave properly.  The combobox itself looks OK but when I click on it to drop down the list of items, the list doesn't have a background.  Any text that appears on the line below the combo box shows beneath the items in the list.  Also, there is no response when I click on one if the items in the list.  I have to click on the dropdown arrow again to get the list to close.

This problem is occurring in IE7, and Firefox 2.0.0.13

Has anyone else experience such an issue?  I haven't been able to find any information about this on the forums.
Scott Daub
Top achievements
Rank 1
 answered on 17 Apr 2008
2 answers
420 views
How to set the RadColorPicker.SelectedColor to selected the transparent color(no color) from code behind.I try with SelectedColor = Color.Transparent and Color.FromName("Transparent") it not working also.  Please help us.
วรวุฒิ
Top achievements
Rank 2
 answered on 16 Apr 2008
2 answers
299 views
I'm a little new at this- but I'm trying to update my MembershipUser via the built-in EditForm in the RadGrid, but it's not taking any of my edits. It doesn't produce any errors, it just updates the user with the same exact info as before, ignoring my changes. What am I doing wrong? I'd greatly appreciate any help or direction.

    protected void RadGrid1_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
    { 
        // Get edited row 
        GridEditableItem editedItem = e.Item as GridEditableItem; 
         
        // Get primary key of editted item 
        object dataKey = editedItem.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ProviderUserKey"]; 
 
        //Locate the changed row in the data source 
        MembershipUser liveUser = membershipProvider.GetUser(dataKey, false); 
 
        // Check if user still exists in data source 
        if (liveUser == null) 
        { 
            statusLabel.Text += "Unable to locate the user for updating."; 
            e.Canceled = true; 
            return; 
        } 
 
        // Update new values 
        Hashtable newValues = new Hashtable(); 
 
        // The GridTableView will fill the values from all editable columns in the hash 
        editedItem.OwnerTableView.ExtractValuesFromItem(newValues, editedItem); 
 
        try 
        { 
            // Update user object with form data 
            liveUser.Email = (string)newValues["Email"]; 
 
            membershipProvider.UpdateUser(liveUser); 
            statusLabel.Text += "User " + liveUser.UserName + " updated."; 
        } 
        catch (Exception ex) 
        { 
            statusLabel.Text += "Unable to update user. Reason: " + ex.Message + "."; 
            e.Canceled = true; 
        } 
 
        // Refresh grid view data 
        RadGrid1.Rebind(); 
    } 

bemara57
Top achievements
Rank 1
 answered on 16 Apr 2008
3 answers
223 views

I am attempting to use the ResourceView of the RadScheduler to show me the Appointments for specific resources. I have specified that the ForeignKey for the ResourceMapping is the ResourceID field which is a CustomAttribute of the Appointment object. I have verified that the data for the ResourceID field is being correctly populated in the Appointment and I have also verified that the resources are being bound to the control. My question is this: when I try to use the ResourceView, I can see the resources, but none of the Appoinments that use those Resources. Am I missing something for the relationship between these two to make this work? Below is the code(s) I am using to establish the relationship:

<ResourceTypes> 
  <telerik:ResourceType   
    ForeignKeyField="ResourceID"   
    DataSourceID="odsResources"       
    Name="Route" 
    KeyField="Id"    
    TextField="RouteName" /> 
 </ResourceTypes> 

The code that populates the Appoinment object is below:

appts = new List<TelerikAppointment>();  
 
foreach (Schedule s in schedules)  
{                         
  temp = new Appointment();  
  temp.Attributes["ResourceID"] = s.Route.Id.ToString();  
  temp.Attributes["MobilityID"] = s.Appointment.Mobility.Id.ToString();  
  temp.Attributes["FromID"]     = s.Appointment.FromAddress.Id.ToString();  
  temp.Attributes["ToID"]       = s.Appointment.ToAddress.Id.ToString();  
  temp.End                      = s.EndTime;  
  temp.ID                       = s.Id;  
  temp.Start                    = s.StartTime;  
  temp.Subject                  = s.Description;  
 
  appts.Add(temp);  
}  
 
this.RadScheduler1.DataSource = appts; 

The RadScheduler control has defined the custom attributes and the group by in the control declaration. Below is the abbreviated control declaration:

CustomAttributeNames="ResourceID,MobilityID,FromID,ToID" 
DataEndField="End"   
DataKeyField="ID"   
DataStartField="Start"   
DataSubjectField="Subject" 
DayEndTime="22:00:00" 
DayStartTime="05:00:00" 
EnableCustomAttributeEditing="true" 
FirstDayOfWeek="Sunday" 
GroupBy="Route" 

Again, when I switch to the ResourceView, I can see the resources, there simply aren't any appointments assigned to the resources.

Thanks in advance!
shawn
Top achievements
Rank 1
 answered on 16 Apr 2008
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?