Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
76 views
We want to perform checkbox multi selection in radcombobox. We achieve multi selection functionality but comma separated text is not accepted by telerik API We tried using setText method but telerik combo box sets internally only last selected value of checkbox. Below is sample code along with Javascript functions public class RadComboCustomControl : RadComboBox { private string txtValue; protected override void PerformDataBinding(IEnumerable dataSource) { if (dataSource != null) { foreach (object dataItem in dataSource) { if (DataTextField.Length > 0) { txtValue = DataBinder.GetPropertyValue(dataItem, DataTextField, null); Items.Add(new RadCustomComboBoxItem(txtValue)); } } } } } public class RadCustomComboBoxItem : RadComboBoxItem { public RadCustomComboBoxItem(string text) : base(text) { } public RadCustomComboBoxItem() : base() { } protected override void CreateChildControls() { base.CreateChildControls(); CheckBox chkBox = new CheckBox(); chkBox.Text = this.Text; chkBox.Attributes.Add("onclick", "CheckboxClick();"); this.Controls.Add(chkBox); } } JAVA Script Code function CheckboxClick() { collectSelectedItems(); } function getItemCheckBox(item) { //Get the 'div' representing the current RadComboBox Item. var itemDiv = item.get_element(); //Get the collection of all 'input' elements in the 'div' (which are contained in the Item). var inputs = itemDiv.getElementsByTagName("input"); for (var inputIndex = 0; inputIndex < inputs.length; inputIndex++) { var input = inputs[inputIndex]; //Check the type of the current 'input' element. if (input.type == "checkbox") { return input; } } return null; } function collectSelectedItems() { var combo = $find("<%=radComboBox1.ClientID%>"); var items = combo.get_items(); var selectedItemsTexts = ""; var selectedItemsValues = ""; var itemsCount = items.get_count(); for (var itemIndex = 1; itemIndex < itemsCount; itemIndex++) { var item = items.getItem(itemIndex); var checkbox = getItemCheckBox(item); //Check whether the Item's CheckBox) is checked. if(checkbox!=null) { if (checkbox.checked) { selectedItemsTexts += item.get_text() + ", "; selectedItemsValues += item.get_value() + ", "; } } } selectedItemsTexts = selectedItemsTexts.substring(0, selectedItemsTexts.length - 2); selectedItemsValues = selectedItemsValues.substring(0, selectedItemsValues.length - 2); //Set the text of the RadComboBox with the texts of the selected Items, separated by ','. combo.set_text(selectedItemsTexts); }
ganesh g
Top achievements
Rank 1
 asked on 07 Dec 2010
3 answers
164 views
I have a master page, then i have a content page that hosts a RadTabStrip and RadMultiPage. I load some user controls inside the multipage (on demand). In one of the user controls i have a radGrid that looks fine in Firefox (http://www.telerik.com/ClientsFiles/235428_ff.jpg) and other browser but in IE it looks like on the picture below:
http://www.telerik.com/ClientsFiles/235429_ie.jpg

Is it bug or what?

The ASP.NET code looks like following:

<telerik:RadGrid ID="RadGrid1" runat="server" Skin="Windows7"
        AllowAutomaticInserts="true"
        AllowAutomaticDeletes="true"
        AllowAutomaticUpdates="true"
        AllowPaging="true"
        PageSize="10" GridLines="None"
        AutoGenerateColumns="false"
        AutoGenerateDeleteColumn="false">
     
    <MasterTableView DataKeyNames="RecordID" CommandItemDisplay="Top" PagerStyle-Position="Bottom" PagerStyle-Mode="NextPrevAndNumeric">
    <CommandItemSettings AddNewRecordText="Add new record" />
    <Columns>
       ' just a few columns here
    </Columns>
    </MasterTableView>
</telerik:RadGrid>
Dimo
Telerik team
 answered on 07 Dec 2010
1 answer
105 views
HI all,

I want to enable the multi select in the rad combobox.
I am using dataset at runtime to populate the combo box.
Please advise. Quick !!!!!


Thanks in Advance :)


Bharat Rathore
Princy
Top achievements
Rank 2
 answered on 07 Dec 2010
1 answer
228 views
Hi,

I'm trying to open a new window from the a RadGrid column.  I have 5 columns that required hyperlinks and those 5 columns need to open 5 separate popup forms.

How does one go about in doing this?  This is a configuration tasks however I didn't see any examples in RadGrid that does this.  Can someone help me on this task.

Thank You,
Shinu
Top achievements
Rank 2
 answered on 07 Dec 2010
1 answer
76 views
Hi All,
 I am very new into this RAD calendar control.
 we have bought RAD controls recently. I have started to implement the RAD Calendar control in to our developing application. So i have copied the Calender style and its scripts into our developing application. I also modified the calender style But the problem is the changed styles are not reflected. When i using firebug some default style is showing. I dont know where the styles are comming from. It automatically bring some styles from some default location.

current developement is "Present.png"
Requested design proto is "requestedproto.png"

So please solve my problem.

Thank you in advance
Princy
Top achievements
Rank 2
 answered on 07 Dec 2010
1 answer
51 views
Is there a way I can have an external button (not in side the grid\command template) to tell the grid to show the insert template, and then the automatic operations can handle it from there?
Princy
Top achievements
Rank 2
 answered on 07 Dec 2010
2 answers
85 views
Is there a way to set client side focus on a child tab when the parent tab is selected (something like having the parent tab have a property to set the focus on one of its child tabs)?

If so, do I need to find & manually enable the child tab or will it be auotmatically done as explained above?

Once there, I want to set focus on the first field on the child tab.
Bill
Top achievements
Rank 2
 answered on 07 Dec 2010
4 answers
124 views
I have an asp.net program where a user can fill out a few text boxes, select a file to upload, and then click Submit. 

Upon clicking Submit the progress bar appears, the file is uploaded, and some info is inserted into a database.

After that process completes the user is shown a confirmation page with some buttons to go back and submit another sale or exit the program.

When clicking the button to submit another sale the progress bar will briefly pop up again.  It shows 0 Total files and the progress bar is about half way across.

This doesn't always happen, but sometimes will.  I don't understand what's causing the progress area to display itself again.  No files are selected, we're not clicking refresh or anything, just a normal button click causing a postback event.  Neither the button click event, nor the page load event has any code that references the file upload control in any way. 

I have attached a picture of the error as it's happening.  Please let me know what other information you need to diagnose why this is happening.

/<evin
Kevin
Top achievements
Rank 1
 answered on 06 Dec 2010
6 answers
270 views
I have checkbox column in Radgrid. When I filter the Radcombox to "Yes" it gives following error
"Error: Sys.WebForms.PageRequestManagerServerErrorException: Operator '=' incompatible with operand types 'Boolean' and 'Int32' "

My Code
<telerik:GridCheckBoxColumn DataField="Active" HeaderText="Is Active" SortExpression="Active"
  
UniqueName="Active" AutoPostBackOnFilter="true" 
  
CurrentFilterFunction="EqualTo" ShowFilterIcon="false">
  
<FilterTemplate>
  
<telerik:RadComboBox ID="ImportedFilter" runat="server" OnClientSelectedIndexChanged="ImportedFilterSelectedIndexChanged"
  
SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Active").CurrentFilterValue %>'
  
Width="70px">
  
<Items>
  
<telerik:RadComboBoxItem Text="NoFilter" Value="" />
  
<telerik:RadComboBoxItem Text="Yes" Value="1" />
  
<telerik:RadComboBoxItem Text="No" Value="0" />
  
</Items>
  
</telerik:RadComboBox>
  
<telerik:RadScriptBlock ID="RadScriptBlock12" runat="server">
  
<script type="text/javascript">
  
function ImportedFilterSelectedIndexChanged(sender, args) {
  
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
  
var filterVal = args.get_item().get_value();
  
if (filterVal == "") {
  
tableView.filter("Active", filterVal, "NoFilter");
  
}
  
else if (filterVal == "1") {
  
tableView.filter("Active", "1", "EqualTo");
  
}
  
else if (filterVal == "0") {
  
tableView.filter("Active", "0", "IsNull");
  
}
  
  
</script>
  
</telerik:RadScriptBlock>
  
</FilterTemplate>
  
</telerik:GridCheckBoxColumn>
Jessy Joseph
Top achievements
Rank 1
 answered on 06 Dec 2010
5 answers
301 views
I have a checkbox column in my radgrid. Is it possible to have filter value as checked when it's loaded. I have shown in the attached  image.

Thanks.
Jessy Joseph
Top achievements
Rank 1
 answered on 06 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?