Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
274 views
Hello,

I have a website project where I created a custom ASP.Net theme with the stylebuilder.  I have all the controls using this custom theme by setting the EnableEmbeddedSkins="false" and setting Skin="mySkin". 

I would like to be able to have a combobox to dynamically change the "theme" used.  If possible I would also like to be able to switch between the standard Telerik Skins and custom themes.

I have tried in code behind using the combobox selection changed event and in case of custom theme setting EnableEmbeddedSkins="false" and setting Skin="mySkin", and in cases of default skins setting EnableEmbeddedSkins="true" and setting Skin="WebBlue" for example.  

Ive looked all over the forums and documentation and havent been able to find a tutorial to do this.  Even if it can be done just using traditional asp.net themes and avoiding the compiled themes all together that would be fine.  I would just have to create each one I wanted from the stylebuilder without changes. 

Can you lead me in the right direction?
Dimo
Telerik team
 answered on 13 Sep 2010
9 answers
260 views
Hi,
I have a RadGrid in which the following resize settings are set  <Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" ClipCellContentOnResize="false" />. The columns in the radgrid also have the "ItemStyle-Width" property set to 7%. Now if I try to resize the columns, it does not resize consistently. Sometimes there is resize and sometimes there is no resize.
I would like to know how column resizing can be made to work consistently.

Thanks
Satyaprakash J
Dimo
Telerik team
 answered on 13 Sep 2010
4 answers
251 views
I am seeing some strange behavior from the RadGrid I have on my page (asp.net 3.5/VS 2008 all SP1).  On the page load, the grid binds correctly to my datasource and displays just fine, including a nice "Items x of y" at the bottom of the grid.  The problem is I also have a button on the page the user can click that displays a previously hidden panel, all simple stuff (button does a postback, the onclick handler is wired up, and the visible property of the panel is toggled... nothing touches the grid in code at this point).  But, when that button gets clicked, all of sudden the Pager item/row is now displayed at the TOP of my grid, above the column headers!

       <telerik:RadGrid ID="RadGrid1" runat="server" SkinID="RadGrid" AllowPaging="True" AllowSorting="true"
OnEditCommand="Grid_EditCommand" OnDeleteCommand="Grid_DeleteCommand" OnUpdateCommand="Grid_UpdateCommand"
DataSourceID="myDataSourceGoesHere" PageSize="20" GridLines="None">
  
<PagerStyle AlwaysVisible="True" Mode="NumericPages" ShowPagerText="true" PagerTextFormat="{4}Items {2} to {3} of {5}" />
  
<MasterTableView DataKeyNames="EFileID" ShowFooter="False" EditMode="EditForms" DataSourceID="myDataSourceGoesHere">
  
<NoRecordsTemplate>
                    No files.
</NoRecordsTemplate>
<Columns>
.
.
.
Pavel
Telerik team
 answered on 13 Sep 2010
1 answer
98 views
Is there a way to add a tab at a specific spot in the tabstrip rather than having it always just adding the new tab to the end?

Thanks!
Shinu
Top achievements
Rank 2
 answered on 13 Sep 2010
3 answers
85 views
Hello,

I recently created a page layout that includes use of the RADEditor for a page content section.
The page layout is quite complex and includes a table section which has an image in the top left corner, a title in the top right and text beneath the title, along the right side of the image and, if the text goes on lower than the base of the image, underneath the image and title columns. (see image)

The code I have to do this is as follows:

<table>        
       <div style='float:left'><PublishingWebControls:RichImageField FieldName="CFGImage1" runat="server"></PublishingWebControls:RichImageField></div>
       <div class="custom-page-title"><SharePointWebControls:TextField FieldName="Title" runat="server"></SharePointWebControls:TextField></div>
       <div><PublishingWebControls:RichHtmlField id="PageContent1" FieldName="CFGPageContent1" runat="server"/></div>
</table>


This works fine although when I edit the page I get a big grey box above the Telerik editor and also a large white space below the Telerik Editor (there is other content on the page too)

Does any one know why the grey box and white space are appearing?

Thanks,
Joe
Stanimir
Telerik team
 answered on 13 Sep 2010
1 answer
125 views
Hi Team

I have a rad grid in that i'm adding some Details at the end of the row i've the delete link button. If i click the Delete link button all the details will deleted , but if do any control Selected Index Changed i'm getting an empty row with Delete link button.

I need to do if i delete the row means all the entire row could be delted.

See attached Images.

Sample.png having All the Details with Delete button.
Sample1.png having after any controls postbacked i'm getting like this.

Pleae give me the Solution as soon as possible.

Regards,
Ashok Anbarasu.
Shinu
Top achievements
Rank 2
 answered on 13 Sep 2010
1 answer
459 views
Hi

I have a RadCombobox with EnableLoadingOnDemand enabled (Attached as bottom). I have a TemplateItem with a Checkbox included. Problem is when I try to get selected items on clientside it works fine only in first page.After that the  items.get_count() which  I am looping through increments (eg becomes more in increments as specified in the ItemsPerRequest), but the CheckBox item on new page defaults to 0, next one bocomes 1 etc, until next page where it repeats in same fasion.Thus this code does not work because the i in the loop becomes 0 for checkbox on new page (in this case the third record because ItemsPerRequest is set to 2).

Problem in short
This code : var chk1 = $get(combo.get_id() + "_i" + i + "_chk1");
Gives result of :ctl00_Content_MainBody_lstProductsTemplate_i0_chk1 (i becomes 0) 
For each Checkbox at top of new page and gets incremented by 1 from there on eg ctl00_Content_MainBody_lstProductsTemplate_i1_chk1,ctl00_Content_MainBody_lstProductsTemplate_i2_chk1

The loop itself
for (var i = 0; i < items.get_count(); i++) {
Gets incremented correctly eg bocomes 4,6,8 etc
I am therefore getting error because this
var chk1 = $get(combo.get_id() + "_i" + i + "_chk1"); 
gives me null value.

Pease help.

Thanks

function

 

onCheckBoxClick(chk) {

 

 

var combo = $find("<%= lstProductsTemplate.ClientID %>");

 

 

//prevent second combo from closing

 

cancelDropDownClosing =

true;

 

 

//holds the text of all checked items

 

 

var text = "";

 

 

//holds the values of all checked items

 

 

var values = "";

 

 

//get the collection of all items

 

 

var items = combo.get_items();

 

 

//enumerate all items

 

 

for (var i = 0; i < items.get_count(); i++) {

 

 

var item = items.getItem(i);

 

 

//get the checkbox element of the current item

 

 

//var chk1 = $get(combo.get_id() + "_i" + (i + recordCounterPerPage) + "_chk1");

 

 

var chk1 = $get(combo.get_id() + "_i" + i + "_chk1"); 

 

 

//if (chk1 != null) {

 

 

if (chk1.checked) {

 

text += item.get_text() +

",";

 

values += item.get_value() +

",";

 

}

 

//}

 

}

 

//remove the last comma from the string

 

text = removeLastComma(text);

values = removeLastComma(values);

alert(values);

 

if (text.length > 0) {

 

 

//set the text of the combobox

 

 

//combo.set_text(text);

 

}

 

else {

 

combo.set_text(

"");

 

}

}




 

<telerik:RadComboBox ID="lstProductsTemplate" runat="server" DataSourceID="dsGetProductSearch"

 

 

DataTextField="ProductName" DataValueField="ProductID" EmptyMessage="Start typing first characters of search here"

 

 

Height="450px" Width="650px" Skin="Web20" LoadingMessage="Loading search result..."

 

 

EnableAutomaticLoadOnDemand="True" ItemsPerRequest="2" ShowMoreResultsBox="True"

 

 

EnableVirtualScrolling="True" Sort="Ascending" ToolTip="Enter your search snipped to start (Set filter accordingly eg Contains or StartsWith)"

 

 

ZIndex="10001" OnClientItemsRequested="ItemsRequested">

 

 

<HeaderTemplate>

 

 

<table style="width: 440px" cellspacing="0" cellpadding="0">

 

 

<tr>

 

 

<td>

 

 

</td>

 

 

<td style="width: 400px;">

 

Product Name

 

</td>

 

 

<td style="width: 40px;">

 

StockOnHand

 

</td>

 

 

</tr>

 

 

</table>

 

 

</HeaderTemplate>

 

 

<ItemTemplate>

 

 

<table style="width: 440px" cellspacing="0" cellpadding="0">

 

 

<tr>

 

 

<td>

 

 

<div onclick="StopPropagation(event)">

 

 

<asp:CheckBox runat="server" ID="chk1" onclick="onCheckBoxClick(this)" />

 

 

</div>

 

 

</td>

 

 

<td style="width: 400px;">

 

<%

# Eval("ProductName")%>

 

 

</td>

 

 

<td style="width: 40px;">

 

<%

#Eval("StockOnHand")%>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</ItemTemplate>

 

 

</telerik:RadComboBox>

 

Kalina
Telerik team
 answered on 13 Sep 2010
4 answers
87 views
I am trying edit on double click in Grid, but getting javascript error "Expected }".  I am implementing this feature from this page

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editondblclick/defaultcs.aspx

I have tried data binding using SqlDataSource and manually created dataset using data table on seperate pages.
Purushottam Somani
Top achievements
Rank 2
 answered on 13 Sep 2010
1 answer
140 views
I have a fairly straightforward hyperlink bound column in a RadGrid like so:

<telerik:GridHyperLinkColumn DataNavigateUrlFields="FileID" DataNavigateUrlFormatString="~/goto.aspx?f={0}"
    DataTextField="Name" DataTextFormatString="{0}" HeaderText="Filename" UniqueName="FileName"
    Target="_blank" SortExpression="Name">

What I'd like to do is put a tooltip on the hyperlink that's bound to something other than the DataTextField.  Is there a way to do this in the GridHyperLinkColumn?
Shinu
Top achievements
Rank 2
 answered on 13 Sep 2010
0 answers
116 views
I have a 3-level hierarchical structure in the radgrid.  All the data is being pulled programmatically.

Is there any way to only allow level-2 rows to be drag-and-dropped? 
Example, if the grid looks like this:
            
Week #
  1
        Section
            A
                     Names
                      Sarah
            B
                     Names
                      Jim
                      John
            C
                     Names
                      Bob
                      Karl
                      Jane
  2
        Section
            D
                     Names
                      Karla
                      Jack
           
etc.

I want to be able to only drag sections between various week numbers.  If I drag Section "D" from Week 2 into Week 1, I want it to take all the names in D with it.

Currently, if I allowdragdrop, every row is movable.
Any help would be appreciated.

EDIT:
Well, scratch that, I figured it out.  Sorry, I guess I just  overlooked the fact that I could distinguish between levels of the hierarchy when I did all the reordering in the  RowDrop event.

Remove this thread, if you'd like. 
jasenko
Top achievements
Rank 1
 asked on 12 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?