Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
88 views
I am trying to use a RadTabStrip control with a Close button on every tab. The Close button is created using TabTemplates.

Everything works fine, with the exception of IE6, where even though I use the styles provided in the Telerik example for the IE6 to fix the line-height bug,  it still does not render properly. The bottom of the tabs is slightlly missaligned.  

I have included a screen shot of the problem (UISample.JPG). Also, bellow I listed the sample aspx code and the css I am using.

I have tried to play with the css style, but I did not manage to get it to work properly. Does anybody have a solution for this ?

Thanks a lot for the help !


This is the aspx code:

 

 

 

<head runat="server">   
<title>Untitled</title
<link rel="stylesheet" type="text/css" href="styles.css" /> 
</head>
<body>
<form id="mainForm" runat="server">
 <telerik:RadScriptManager runat=server ID="ScriptManager"></telerik:RadScriptManager
 <div
  <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" Skin="Vista" ScrollChildren="true" ScrollButtonsPosition="Middle" Orientation="HorizontalTop"
  <TabTemplate
   <div class="textWrapper"
    <%# DataBinder.Eval(Container, "Text") %> 
   </div
   <span class="ie6shim"></span
   <img src="Images/Close.gif" alt="Close" onclick="deleteTab('<%# DataBinder.Eval(Container, "Text") %>')" /> 
  <TabTemplate
<Tabs
 <telerik:RadTab runat="server" Selected="True" Text="Tab1"></telerik:RadTab
 <telerik:RadTab runat="server" Text="Tab2"></telerik:RadTab
 <telerik:RadTab runat="server" Text="Tab3"></telerik:RadTab
</Tabs
</telerik:RadTabStrip
</div
</form
</body>
  
  
  
This is the styles.css file:
   
  
.tabStrip
 position:absolute; 
 top:0; 
}
  
.rtsIn img 
 vertical-align:middle; 
 width: 14px; 
 height: 14px; 
 margin-left: 10px; 
}
  
  
.rtsIn .textWrapper 
 display: inline; 
}
   
  
/* IE6 fixes for line-height bug */
  
* html .rtsIn img 
 margin-bottom: 10px; 
}
  
* html .rtsIn .textWrapper 
 float: left; 
 height:26px; 
}
  
* html .rtsIn .ie6shim 
 height: 26px; 
 display: inline-block; 
}

 

 

 

 

 

 

 

 

 

vivek
Top achievements
Rank 1
 answered on 18 Mar 2011
4 answers
120 views
Hi,
I want to restrict the user to enter maximum of 4 alphabets in subjects field, and i also want to control the display size of the subject field.
Can u please guide me how to perform these activities. Your quick response will be greatly appreciated.

Thanks & Regards,
Sher
Sher
Top achievements
Rank 2
 answered on 18 Mar 2011
1 answer
83 views
hey there,

i have a radgrid with CRUD operations.I've used automatic inserts an updates and used this event OnInsertCommand="RadGrid1_InsertCommand" and used advanced data binding with NeddDataSource event.But the problem is that on clicking insert or update after filling the required fields, my edit form is not closed and grid is not refreshed.When i press cancel than the grid is refreshed and the values that i've inserted or updated are than visible.What cud be the possible reason??...

Thanks
Amit
Princy
Top achievements
Rank 2
 answered on 18 Mar 2011
2 answers
212 views
I have a grid with a repeater with a checkboxlist inside.  I have no problem displaying the page, but when i try and get the value of the checkboxlist on the insert command in the code behind ... I cannot seem to get the values

here is an example of my code the only part that doesnt work is when i try an get the selected check boxes

Any ideas?

<asp:Repeater ID="rptMarkets" runat="server" DataSourceID="objMarkets">
    <ItemTemplate>
        <b>
            <%#DataBinder.Eval(Container.DataItem, "Market")%></b>
        <!-- Nested Repeater Level 2 - START -->
        <asp:HiddenField ID="HiddenField1" runat="server" Value='<%# Eval("MarketID") %>' />
        <asp:ObjectDataSource ID="objProducts" runat="server" SelectMethod="GetProductsByMarketsID"
            TypeName="Ceradyne.clsLibrary">
            <SelectParameters>
                <asp:ControlParameter Name="MarketID" Type="Int32" ControlID="HiddenField1" PropertyName="Value" />
            </SelectParameters>
        </asp:ObjectDataSource>
         
        <ul>
            <asp:CheckBoxList ID="clProductName" runat="server" DataSourceID="objProducts" DataTextField="ProductName" DataValueField="ProductID" RepeatColumns="3" Font-Size="8px">
            </asp:CheckBoxList>
        </ul>
        <!-- Nested Repeater Level 2 - END -->
    </ItemTemplate>
    <SeparatorTemplate>
        <hr />
    </SeparatorTemplate>
</asp:Repeater>
Protected Sub RadGrid1_InsertCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.InsertCommand
    'save the file to the website
    Dim txtPDFFile As String = ""
    Dim Upload As RadUpload = TryCast(e.Item.FindControl("upBrochurePDF"), RadUpload)
    Dim BrochureFolder As String = Server.MapPath("~/uploads/brochures/")
    If Upload.UploadedFiles.Count > 0 Then
        For Each file As UploadedFile In Upload.UploadedFiles
            txtPDFFile = file.GetName()
            file.SaveAs(BrochureFolder & txtPDFFile, True)
        Next
    End If
 
    'check to see if this file name exists already
    '(not written yet)
 
 
    ' save the file name to the database
    objBrochure.AddBrochure(txtPDFFile)
 
    'look up the brochure id based on the filename
    objBrochure.GetBrochuresByFilename(txtPDFFile)
    Dim BrochureID As Integer = objBrochure.BrochureID
 
    'save the value of the check boxes
    Dim ProductID As Integer
    Dim i As Integer
    Dim List As CheckBoxList = DirectCast(e.Item.FindControl("clProductName"), CheckBoxList)
    For i = 0 To List.Items.Count - 1
        If List.Items(i).Selected = "true" Then
            ProductID = List.Items(i).Value
            'add brochure links to products
            objBrochure.AddBrochureProductLink(BrochureID, ProductID)
        End If
    Next
 
    Response.Redirect("/admin/Library/ManageBrochures.aspx")
End Sub
Michael
Top achievements
Rank 1
 answered on 18 Mar 2011
2 answers
56 views
Hello,

I am using the client-side API and use AllowMultiRowSelection="True". I need to rebind a second control when a grid row is selected or deselected. My problem is that using the shift key or the checkbox at the top of the grid, many or all rows can be selected at once and each (correctly) fires the RowSelected event, causing many rebinds of the second control.

 

I only want to fire the rebind once per user action. Any suggestion is appreciated.

Marcel
Top achievements
Rank 1
 answered on 17 Mar 2011
2 answers
141 views
hi,
trying to set the date of raddatepicker on radnumerictextbox clientevents_onvaluechanged. but it is not working..

aspx:

<

 

telerik:GridTemplateColumn HeaderText="Months To Recall" UniqueName="MonthsCol" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">

 

 

<ItemTemplate>

 

 

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

 

 

</ItemTemplate>

 

 

<EditItemTemplate>

 

 

<telerik:RadNumericTextBox ID = "MonthsEditTxt" runat = "server" ClientEvents-OnValueChanged = "MonthsTextChanged">

 

 

<NumberFormat DecimalDigits="0"/>

 

 

</telerik:RadNumericTextBox>

 

<%

--<telerik:RadTextBox ID = "MonthsEditTxt" runat = "server"></telerik:RadTextBox>--%>

 

 

 

</EditItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn UniqueName="NextRecallCol" HeaderStyle-HorizontalAlign="Center"

 

 

HeaderText="Next Recall" ItemStyle-HorizontalAlign="Center">

 

 

<ItemTemplate>

 

 

<asp:Label ID = "NextRecall" runat = "server" Width = "150px" Text = '<%#DataBinder.Eval(Container.DataItem, "RecallDate")%>'></asp:Label>

 

 

<%

-- <telerik:RadTextBox ID = "NextRecallbox" runat = "server" Text = '<%#DataBinder.Eval(Container.DataItem, "RecallDate")%>' Width = "160px"></telerik:RadTextBox>--%>

 

 

 

</ItemTemplate>

 

 

<EditItemTemplate>

 

 

<telerik:RadDatePicker ID="NextRecallEdit" runat="server" Width="140px" AutoPostBack="true" MinDate="2006/1/1"

 

 

DateInput-EmptyMessage="NextRecallDate" DbSelectedDate='<%# Bind("RecallDate") %>' Calendar-ClientEvents-OnDateSelected = "RecallDateChange">

 

 

 

</telerik:RadDatePicker>

 

<%

--<telerik:RadTextBox ID= "NextRecallEditBox" runat="server"></telerik:RadTextBox>--%>

 

 

 

</EditItemTemplate>

 

 

</telerik:GridTemplateColumn>

 



JAVASCRIPT:

 

<script type="text/javascript">

 

 

 

function MonthsTextChanged(sender, eventArgs)

 

 

{

 

<%

for(int index = 0; index < MonthLabelClientIDList.Count; index++)

 

 

{

 

string monthLblClientID = MonthLabelClientIDList[index];

 

string NextRecallClientID = NextRecllClientIDList[index];

 

 

 

%>

 

 

var months = $find("<%=monthLblClientID %>");

 

 

 

var nextrecall = $find("<%=NextRecallClientID %>");

 

 

 

var todaysDate = new Date();

 

 

 

var newdate = [months.get_value(),todaysDate.getDate(),todaysDate.getFullYear()];

 

 

 

 

nextrecall.set_selectedDate(newdate);

 

 

 

<% } %>

 

 

 

}


ASPX.CS

protected

 

IList<string> MonthLabelClientIDList

 

 

{

 

 

get

 

{

 

return (IList<string>)ViewState["MonthLabelClientIDList"];

 

 

}

 

 

set

 

{

ViewState[

"MonthLabelClientIDList"] = value;

 

 

}

 

}

 

 

protected IList<string> NextRecllClientIDList

 

 

{

 

 

get

 

{

 

return (IList<string>)ViewState["NextRecllClientIDList"];

 

 

}

 

 

set

 

{

ViewState[

"NextRecllClientIDList"] = value;

 

 

}

 

}


protected

 

void ItemDataBound(object sender, GridItemEventArgs e)

 

 

{

 

 

if (MonthLabelClientIDList == null)

 

 

{

 

MonthLabelClientIDList =

new List<string>();

 

 

NextRecllClientIDList =

new List<string>();

 

 

 

 

}

 

 

if (e.Item is GridEditableItem && (e.Item as GridEditableItem).IsInEditMode)

 

 

{

 

 

GridEditableItem editItem = e.Item as GridEditableItem;

 

 

RadNumericTextBox monthsToRecall = (RadNumericTextBox)e.Item.FindControl("MonthsEditTxt");

 

 

 

RadDatePicker nextRecall = (RadDatePicker)e.Item.FindControl("NextRecallEdit");

 

MonthLabelClientIDList.Add(monthsToRecall.ClientID);

NextRecllClientIDList.Add(nextRecall.ClientID);

}

Please guide me..

Chinna
Top achievements
Rank 1
 answered on 17 Mar 2011
3 answers
512 views
I have a TreeView which is bound to a webservice which works fine. However if you go to the asmx file to see the webservice definition. You get the following error

Cannot serialize member Telerik.Web.UI.ControlItemData.Attributes of type System.Collections.Generic.IDictionary`2[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] because it is an interface.

This is obvoiusly the same issue as described here :





http://www.telerik.com/community/forums/aspnet-ajax/combobox/radcombobox-load-on-demand-with-web-service.aspx

To fix it you suggest creating a custom class type

Is this possible as I am refering to the attributes property when returning the array of data , so creating a custom class wont make any difference.

i.e. public IDictionary<string, object> Attributes { get; set; }

it would be nice if the definition would display properly.

thanks
Toby
jason
Top achievements
Rank 1
 answered on 17 Mar 2011
6 answers
135 views

Has anyone else tried using the RadListBox in Sitefinity yet?

I have a user controls I've created, and switched from the regular listbox to the radlistbox, but for some reason, each item inside a listbox is preceded with a bullet.  It doesn't matter what skin I use, and I've even left the skin blank with EnabledEmbeddedSkins set to false, and it still does it.

I've searched through all the CSS files that sitefinity uses, and I don't see any that would be interfereing with the RadListBox.
(Note:  If I create the exact same listbox in a standard aspx, I don't have the problem).

If anyone else can give it a shot, I'd appreciate it.

Note: Using Sitefinity 3.6 SP2.

Since I can't attach a screenshot, it looks something like this inside the list box:

  • Customer List
  • Customer Mailing List


Thanks, Kuba

Simon
Telerik team
 answered on 17 Mar 2011
4 answers
223 views
I have a RadGrid with the allow sorting property turned on.  I'm doing a databind to this object in the OnLoad event.  When the page loads up, I can click on the header name to do a sort, but when I click on the down/up arrow, it get an error.  This is what I see in my stack trace.

   at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument)
   at System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

And this is what the description says.
Invalid postback or callback argument. Event validation is enabled using

I'm simply binding my datasource which is a datatable to the datagrid.  I do have the columns set up so that the correct data column in my data table will go into the correct column in the RadGrid object.

Thanks in advance,
Kai Thao
Dinker Batra
Top achievements
Rank 1
 answered on 17 Mar 2011
2 answers
388 views
If I set the color of a row for the grid it works great until the user pages or sorts the grid then I loose the color setting for the row.  I have tried using the the CellAction and it also looses the HtmlAttributes. Is it because it is an Ajax bound grid?  Is there a work around?

        .Grid(Model)
        .Name("DetailGrid")
.RowAction(row =>
{
if (row.DataItem.Status == "X")
{
row.HtmlAttributes["style"] = "background:#FFCCCC;";
}
})

                code for .columns goes here........
        .DataBinding(x => x.Ajax().Select("AjaxDetails""Policy"new { OID = ViewData["OID"] }))
D
Top achievements
Rank 1
 answered on 17 Mar 2011
Narrow your results
Selected tags
Tags
+124 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?