Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
169 views
I have a RadListBox with checkboxes.  I would like the user to be able to select an item in the listbox and click on an Edit link to open up a popup in which the user can edit the information based on the selected item.  So I need to pass the selected value as an id (key) in the LoadContentFrom on my Telerik Window.  I am not sure as to how to do this.  I tried creating a hidden field and setting it using the OnClientItemChecked, but I am having difficulty actually getting the selected item and its value.  The listbox is not being found - please see the code below.

    <script language="javascript" type="text/javascript">
  
        function setSelectedUser() {
            var listBox = $find('<%= UsersLB.ClientID %>_ClientState');
            var selectedItem = listBox.get_selectedItem();
            document.getElementById("selectedUser").value = selectedItem.get_value());
        }
    </script>
    <%  UsersLB.DataSource = Model.userList
        UsersLB.DataValueField = "Value"
        UsersLB.DataTextField = "Text"
        UsersLB.DataBind()
          
        UserGroupsLB.DataSource = Model.userGroupList
        UserGroupsLB.DataValueField = "Value"
        UserGroupsLB.DataTextField = "Text"
        UserGroupsLB.DataBind()
    %>
    <div id="mainright">
        <asp:HiddenField ID="selectedUser" runat="server"/>
        <div>
            <telerik:RadListBox ID="UsersLB" runat="server" CheckBoxes="true" Height="300px" OnClientItemChecked="setSelectedUser()">
            </telerik:RadListBox>
            <a href="#" id="newUser">New</a>       <a href="#" id="editUser">Edit</a>
            <%  Html.Telerik().Window().Name("CreateWindow") _
                .LoadContentFrom("Create", "User") _
                .Buttons(Function(buttons) buttons.Refresh().Maximize().Close()) _
                .Draggable(True) _
                .Height(450) _
                .Width(500) _
                .Resizable() _
                .Title("Create New GMC Web User") _
                .HtmlAttributes(New With {.class = "windows7"}) _
                .Visible(False) _
                .Render()
             %>
            <%  Html.Telerik().Window().Name("EditWindow") _
                .LoadContentFrom("Edit", "User") _
                .Buttons(Function(buttons) buttons.Refresh().Maximize().Close()) _
                .Draggable(True) _
                .Height(450) _
                .Width(500) _
                .Resizable() _
                .Title("Edit GMC Web User") _
                .HtmlAttributes(New With {.class = "windows7"}) _
                .Visible(False) _
                .Render()
             %>
        </div>
        <div>
            <telerik:RadListBox ID="UserGroupsLB" runat="server" CheckBoxes="true" Height="300px">
            </telerik:RadListBox>
        </div>
  
    </div>
    <%  Html.Telerik().ScriptRegistrar().OnDocumentReady("$('#newUser').bind('click', function openWindow(e){ $('#CreateWindow').data('tWindow').center().open().refresh();})")
            .OnDocumentReady("$('#editUser').bind('click', function openWindow(e){$('#EditWindow').data('tWindow').center().open()>refresh();})")
%>


 Can you please point me in the right direction as to how to do what I need?

Thank you very much,
Donna
Donna Stewart
Top achievements
Rank 1
 answered on 05 Jan 2011
3 answers
290 views
I'm using Version=2009.3.1314.35 because the latest version seems to mess up my grid skins which I don't feel like dealing with right now.

Anyway in this version, is there an easy way to show an excel icon like in the latest? Something like showExcelIcon = true?

Also, if I don't supply a command item template, a default one renders with input elements of type submit with <a> tags.
Is there an example of how I can do this manually in the command item template?
If I just put an input element in the command item template and set runat to server, it doesn't get acknowledged by the Command Item clicked event like link buttons do. 
How do I successfully implement my own <a> tag for an input element in the command item template?

I need something like the following but i'm confused by the autogenerated $ctl00$ctl02$ctl00$ text
<a href="javascript:__doPostBack('InactiveUnitGrid$ctl00$ctl02$ctl00$RebindGridButton','')" id="InactiveUnitGrid_ctl00_ctl02_ctl00_RebindGridButton">Refresh</a>

What is this RebindGridButton that gets referenced in the doPostBack method?
Should I be able to just reference the RebindGridButton without the InactiveUnitGrid_ctl00_ctl02_ctl00_ prefix? 
Matt
Top achievements
Rank 1
 answered on 05 Jan 2011
2 answers
588 views

I am trying to add an .net button dynamically to the radgrid footer with the following code.  The button gets displayed correctly.
However, the btn_Click event does not get fired when the button is clicked.
Am I missing something in the code?

Thanks for your help.

  protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)  
{  
        if (e.Item is GridFooterItem)  
        {  
            GridFooterItem footerItem = (GridFooterItem)e.Item;  
            RadScriptManager1.RegisterAsyncPostBackControl(btn);
            Button btn = new Button();  
            btn.Text = "Button";  
            btn.Click += new System.EventHandler(btn_Click);
            footerItem.Cells[2].Controls.Add(btn);  
        }  
    }  

weezie
Top achievements
Rank 1
 answered on 05 Jan 2011
2 answers
284 views

Hi Telerik team;

Currently we have a web page in our site which is using radcombobox and after we upgraded to Q2 2010, the arrow cell image is getting cut off.  We upgraded to .net 4.0 and the telerik to Q2 2010.  Could you please take a look and let me know what the problem is?  I tried setting EnableEmbeddedBaseStyleSheet = "false" and that did not fix it.

Here is the way the radcombobox is declared on the page:

 

<

 

 

telerik:RadComboBox ID="cmbRegion" runat="server" AllowCustomText="false" MarkFirstMatch="false" DropDownWidth="222" Width="185" EnableVirtualScrolling="false" EnableEmbeddedBaseStylesheet="false">
</telerik:RadComboBox>

 

 

 

 


I have attached images of the radcombobox before upgrade and after upgrade which shows the arrow being cut off.

Please see the stylesheet we are using for the radcombobox below:

Thanks a lot in advance for your help,

Meera

 

.RadComboBox_Response

 

 

*

 

 

 

 

 

{

 

 

margin:0;

 

 

 

padding:0;

 

}

 

 

 

.RadComboBox_Response

 

 

,

 

 

 

 

.RadComboBox_Response

 

 

.rcbInput,

 

 

 

 

.RadComboBoxDropDown_Response

 

 

 

 

{

 

 

font:12px arial,verdana,sans-serif;

 

 

 

color:#000;

 

}

 

 

 

/* combobox */

 

 

 

 

.RadComboBox_Response

 

 

 

 

{

 

 

vertical-align:bottom;

 

 

 

text-align: left;

 

}

 

 

 

.RadComboBox_Response

 

 

table

 

 

 

 

 

{

 

 

border:0;

 

}

 

 

 

.RadComboBox_Response

 

 

td.rcbInputCell

 

 

 

 

 

{

 

 

background: url('ComboBox/rcbBg.gif') no-repeat 0 0;

 

 

 

height:19px;

 

 

 

line-height:20px;

 

 

 

vertical-align:top;

 

 

 

padding:0;

 

 

 

border:0;

 

}

 

 

 

.RadComboBox_Response

 

 

td.rcbInputCellRight

 

 

 

 

 

{

 

 

background-position: 100% 0;

 

}

 

 

 

.RadComboBox_Response

 

 

.rcbDisabled .rcbInputCell .rcbInput

 

 

 

 

 

{

 

 

color: #999;

 

}

 

 

 

.RadComboBox_Response

 

 

.rcbHovered .rcbInputCell { background-position: 0 -21px; }

 

 

 

 

.RadComboBox_Response

 

 

.rcbHovered .rcbInputCellRight { background-position: 100% -21px; }

 

 

 

 

.RadComboBox_Response

 

 

.rcbFocused .rcbInputCell { background-position: 0 -42px; }

 

 

 

 

.RadComboBox_Response

 

 

.rcbFocused .rcbInputCellRight { background-position: 100% -42px; }

 

 

 

 

.RadComboBox_Response

 

 

td.rcbInputCell,

 

 

 

 

.RadComboBox_Response

 

 

.rcbInputCell .rcbInput

 

 

 

 

 

{

 

 

padding: 0 0 0 2px;

 

}

 

 

 

.RadComboBox_Response_rtl

 

 

td.rcbInputCell,

 

 

 

 

.RadComboBox_Response_rtl

 

 

.rcbInputCell .rcbInput

 

 

 

 

 

{

 

 

padding: 0 2px 0 0;

 

}

 

 

 

.RadComboBox_Response

 

 

.rcbInputCell .rcbInput

 

 

 

 

 

{

 

 

width:100%;

 

 

 

background:transparent;

 

 

 

vertical-align:top;

 

 

 

height: 16px;

 

 

 

border: 0;

 

 

 

margin-top: 2px;

 

 

 

outline: 0;

 

}

 

 

 

.RadComboBox_Response

 

 

.rcbInputCell .rcbEmptyMessage

 

 

 

 

 

{

 

 

color: #ccc;

 

 

 

font-style: italic;

 

}

 

 

 

.RadComboBox_Response

 

 

td.rcbArrowCell

 

 

 

 

 

{

 

 

width:24px;

 

 

 

padding:0;

 

 

 

border:0;

 

 

 

background:transparent url('ComboBox/rcbArrowCell.gif') no-repeat 0 0;

 

}

 

 

 

.RadComboBox_Response

 

 

.rcbArrowCellRight

 

 

 

 

 

{

 

 

background-position: 0 0;

 

}

 

 

 

.RadComboBox_Response

 

 

.rcbArrowCellLeft

 

 

 

 

 

{

 

 

background-position: 0 -21px;

 

}

 

 

 

.RadComboBox_Response

 

 

.rcbArrowCell a

 

 

 

 

 

{

 

 

line-height:21px;

 

 

 

width:24px;

 

 

 

height:21px;

 

 

 

text-decoration:none;

 

 

 

text-indent: -9999px;

 

 

 

font-size: 0;

 

}

 

 

 

.RadComboBox_Response

 

 

td.rcbArrowCellHidden,

 

 

 

 

.RadComboBox_Response

 

 

.rcbArrowCellHidden a

 

 

 

 

 

{

 

 

background: url('ComboBox/rcbBg.gif') no-repeat top right;

 

 

 

width: 1px;

 

}

 

 

 

.RadComboBox_Response_rtl

 

 

.rcbArrowCell a

 

 

 

 

 

{

 

 

text-indent: 9999px;

 

}

 

 

 

.RadComboBox_Response

 

 

.rcbDisabled .rcbArrowCell a

 

 

 

 

 

{

 

 

cursor:no-drop;

 

}

 

 

 

/* dropdown */

 

 

 

 

.rcbSlide

 

 

 

 

{

 

 

position:absolute;

 

 

 

overflow:hidden;

 

 

 

display:none;

 

 

 

_height:1px;

 

 

 

float:left;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

 

 

{

 

 

position:absolute;

 

 

 

background:#fff;

 

 

 

border: 1px solid #8b9cac;

 

 

 

cursor:default;

 

 

 

font-size:11px;

 

 

 

text-align: left;

 

}

 

 

 

.RadComboBoxDropDown_Response_rtl

 

 

 

 

{

 

 

text-align: right;

 

 

 

direction: rtl;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbScroll

 

 

 

 

 

{

 

 

overflow:auto;

 

 

 

position:relative;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbList

 

 

 

 

 

{

 

 

list-style:none;

 

 

 

margin:0;

 

 

 

padding:0;

 

 

 

zoom:1;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbHeader,

 

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbFooter

 

 

 

 

 

{

 

 

background:#dfeeff;

 

 

 

color:#000;

 

 

 

padding:4px;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbHeader

 

 

 

 

 

{

 

 

border-bottom: 1px solid #a7c0df;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbFooter

 

 

 

 

 

{

 

 

border-top: 1px solid #a7c0df;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbNoWrap .rcbItem,

 

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbNoWrap .rcbHovered,

 

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbNoWrap .rcbDisabled,

 

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbNoWrap .rcbLoading

 

 

 

 

 

{

 

 

white-space:nowrap;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbItem,

 

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbHovered,

 

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbDisabled,

 

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbLoading

 

 

 

 

 

{

 

 

padding:4px 20px 4px 4px;

 

 

 

border-top: 1px solid #f0f2f3;

 

 

 

min-height: 14px;

 

}

 

 

 

*

 

 

html .RadComboBoxDropDown_Response .rcbItem,

 

 

 

 

*

 

 

html .RadComboBoxDropDown_Response .rcbHovered,

 

 

 

 

*

 

 

html .RadComboBoxDropDown_Response .rcbDisabled,

 

 

 

 

*

 

 

html .RadComboBoxDropDown_Response .rcbLoading

 

 

 

 

 

{

 

 

height: 14px;

 

}

 

 

 

.RadComboBoxDropDown_Response_rtl

 

 

.rcbItem,

 

 

 

 

.RadComboBoxDropDown_Response_rtl

 

 

.rcbHovered,

 

 

 

 

.RadComboBoxDropDown_Response_rtl

 

 

.rcbDisabled,

 

 

 

 

.RadComboBoxDropDown_Response_rtl

 

 

.rcbLoading

 

 

 

 

 

{

 

 

padding:4px 4px 4px 20px;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbImage

 

 

 

 

 

{

 

 

vertical-align: middle;

 

 

 

margin: 0 6px 2px 0;

 

}

 

 

 

.RadComboBoxDropDown_Response_rtl

 

 

.rcbImage

 

 

 

 

 

{

 

 

margin: 0 0 2px 6px;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

em

 

 

 

 

 

{

 

 

font-style: normal;

 

 

 

font-weight: bold;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbItem em

 

 

 

 

 

{

 

 

background: #e5e5e5;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbHovered

 

 

 

 

 

{

 

 

background:#f0f2f4;

 

 

 

color:#000;

 

 

 

border-top: 1px solid #d8dde0;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbSeparator

 

 

 

 

 

{

 

 

color: #222;

 

 

 

background: #F4F4F4;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbDisabled

 

 

 

 

 

{

 

 

color:#808080;

 

 

 

cursor:no-drop;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbLoading

 

 

 

 

 

{

 

 

background:#f0f0f0;

 

 

 

text-align:center;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbMoreResults

 

 

 

 

 

{

 

 

clear:both;

 

 

 

background:#E0E3E6;

 

 

 

border-top: 1px solid #c7c7c7;

 

 

 

padding:4px;

 

 

 

text-align:center;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbMoreResults a

 

 

 

 

 

{

 

 

display:block;

 

 

 

width:9px;

 

 

 

height:6px;

 

 

 

background:url('ComboBox/rcbMoreResults.gif') no-repeat transparent;

 

 

 

margin:0 auto 4px;

 

 

 

text-indent:-3333px;

 

 

 

overflow:hidden;

 

 

 

text-decoration:none;

 

 

 

cursor:pointer;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbMoreResults a:hover

 

 

 

 

 

{

 

 

background-position:0 -6px;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbMoreResults span

 

 

 

 

 

{

 

 

display:block;

 

 

 

text-align:center;

 

}

 

 

 

.RadComboBoxDropDown_Response

 

 

.rcbScroll

 

 

 

 

 

{

 

 

scrollbar-face-color: #e9e9e9;

 

 

 

scrollbar-highlight-color: #ffffff;

 

 

 

scrollbar-shadow-color: #e9e9e9;

 

 

 

scrollbar-3dlight-color: #dbdbdb;

 

 

 

scrollbar-arrow-color: #787878;

 

 

 

scrollbar-track-color: #f5f5f5;

 

 

 

scrollbar-darkshadow-color: #aeaeae;

 

}

 

 

 

/*hacks*/

 

 

 

 

/*Opera start*/

 

 

 

 

@media

 

 

screen and (min-width:550px)

 

{

 

 

.RadComboBoxDropDown_Response_rtl .rcbItem,

 

 

 

.RadComboBoxDropDown_Response_rtl .rcbHovered,

 

 

 

.RadComboBoxDropDown_Response_rtl .rcbDisabled,

 

 

 

.RadComboBoxDropDown_Response_rtl .rcbLoading

 

 

 

 

 

{

 

 

padding:4px 20px 4px 4px;

 

 

 

zoom:1;

 

}

}

 

 

 

/*Opera end*/

 

 

 




m chotu
Top achievements
Rank 1
 answered on 05 Jan 2011
6 answers
204 views
Hello,
I'd like to save with GridSettingsPersister http://demos.telerik.com/aspnet-ajax/grid/examples/programming/savinggridsettingsonperuserbasis/defaultcs.aspx the settings of a radgrid.

Is it possible to save also the filter width? How?

It is possible to save the column width without the automatic resize of grid's width shown in the example. I want the grid to be scrolled beyond the viewed part.
David
Top achievements
Rank 1
 answered on 05 Jan 2011
6 answers
420 views
I just received a new machine at work. It has Windows XP, and I believe had the 2.0 .NET Framework installed out of the box. I installed Visual Studio 2008, and when I attempt to install ASP.NET AJAX I get the following error when it attempts to install the ASP.NET AJAX Extensions 1.0:

Setup has failed to deploy Microsoft ASP.NET AJAX Extensions 1.0. Microsoft ASP.NET AJAX 1.0 is a required component for the components targetting .NET 2.0. Please, install Microsoft ASP.NET AJAX Extensions 1.0 from the following URL: http://www.asp.net/ajax/downloads/archive/

That link no longer goes to where it thinks it does, but I do believe I was able to find the ASP.NET AJAX Extensions 1.0 installation file, and when I try to install it I receive the message:

Microsoft ASP.NET 2.0 AJAX Extensions 1.0 Setup Wizard ended prematurely because of an error. Your system has not been modified. To install this program at a later time, run the Setup Wizard again.

Edit: Added error message from ASP.NET 2.0 AJAX Extensions 1.0 Setup Wizard
Hrisi
Telerik team
 answered on 05 Jan 2011
3 answers
79 views
Hi,

I have been looking at the Window's and the Tooltip's functionality and to be honest I am slightly struggling to see what the real differences are.

Can someone give me an overview of example scenario's of when you would use one over the other, and what the limitations are of one over the other.

Many Thanks

Svetlina Anati
Telerik team
 answered on 05 Jan 2011
2 answers
135 views
Hello,

I have a ASP repeater control inside the editformsettings and I am using EditMode="EditForms" in the MasterTableView.

I have a 'delete' button inside the Repeater for each row. When I click it I can delete the row and the table data by using the Item command of the repeater with a partialpostback and leaving the Editmode on so that the user can see the item is already removed. But now I also want to update the Grid column which has one of the column as the counts of the files in repeater without closing the Edit form and doing only partial postback to change the value of the column which has the count inside the RadGrid to a value to decrease by one.

1) How do I access the column from the Repeater?

2) Also can I access the Datakeys of the Radgrid from the Reapeter itemcommand. If so how?


Thanks,
Sanjay
Sanjay
Top achievements
Rank 1
 answered on 05 Jan 2011
3 answers
225 views
hello!
i want to open a radwindow in right bottom of the page. then it retains the same position when i scrolling down or up the page. anybody please help me.
thanks.
priya.
Fiko
Telerik team
 answered on 05 Jan 2011
3 answers
120 views
We use the RAD editor to create a string that will ultimately be used to send emails. In older versions, there were line breaks (CRLF) inserted throughout the HTML between tags. The new version (2010.2) does not do this. It produces one long line of HTML. Outlook doesn't like that and inserts its own line breaks, sometimes in the middle of HTML tags. Is there any way to bring back the old functionality, or or otherwise get physical line breaks in the produced HTML?

Thanks in advance,
Boris Zakharin
Rumen
Telerik team
 answered on 05 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?