Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
181 views
The page tabs show up on the datapager, and only the first 10 items are shown.   When I click on one of the page numbers though, a) the results don't change; b) the new page number is not highlighted (when I click a second time, it is highlighted however but the results still don't change).

Any help would be much appreciated.

My aspx markup:
<table border="0" cellspacing="0" cellpadding="4">
    <tr>
        <td>
            <telerik:RadTextBox ID="txtInstitutionName" runat="server" Columns="30" /><asp:RequiredFieldValidator
                ID="RequiredFieldValidator1" ControlToValidate="txtInstitutionName" runat="server"
                ErrorMessage="*" />
        </td>
        <td>
            <asp:Button ID="btnSearch" runat="server" Text="Search" />
        </td>
    </tr>
</table>
<telerik:RadListView ID="listInstitutions" runat="server" AllowPaging="true">
    <ItemTemplate>
        <li>
            <%# Eval("InstitutionName") %></li>
    </ItemTemplate>
    <EmptyDataTemplate>
        No financial institution was found.</EmptyDataTemplate>
    <LayoutTemplate>
        <ul>
            <li id="itemPlaceholder" runat="server" />
        </ul>
        <telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="listInstitutions" PageSize="10" >
            <Fields>
                <telerik:RadDataPagerButtonField FieldType="Numeric" />
            </Fields>
        </telerik:RadDataPager>
    </LayoutTemplate>
</telerik:RadListView>


My code for clicking the submit button:
InstitutionContext = New ProjectTobyEntities()
 
Dim institutionQuery As ObjectQuery(Of Institution) = _
    From i In InstitutionContext.Institutions _
    Where i.InstitutionName.Contains(txtInstitutionName.Text) And i.Active = True
    Select i
 
listInstitutions.DataSource = CType(institutionQuery, ObjectQuery).Execute(MergeOption.NoTracking)
listInstitutions.DataBind()
Rosen
Telerik team
 answered on 13 Sep 2010
1 answer
64 views
I need to be able to access the edit user control from the page and the page from the edit user control - specifically non-grid controls from the page in the edit user control. I can do this separately, but when I try to access both at the same time, I get a "Circular file references are not allowed." error because I have to reference the user control in the page and the page in the user control. How can I work around this issue?

Mira
Telerik team
 answered on 13 Sep 2010
3 answers
184 views
Hi

there is a new localization text option for radwindow

but how can i do it with radalert called like this from codebehind.

Label1.Text = "<script language='javascript'> window.onload = function(){radalert('My Message.', 300, 150);}</script>";
Georgi Tunev
Telerik team
 answered on 13 Sep 2010
1 answer
262 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
242 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
240 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
87 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
77 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
120 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
453 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?