Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
139 views
Hi Team,

Can we apply jquery to get the checked item and apply the css?
Can I do the same as I am doing for RoleName, means need to apply the jquery for radlistbox

function SaveRolePermissions() {

var roleName = $("#" + "<%=txtRoleName.ClientID %>");
var permission = $find("<%=rdlistMenuPermission.ClientID %>");
var validationMsg = headerMessage;

var validationFlag = false;
if (!jQuery.trim(roleName.val())) {
roleName.css("background-color", colorCode);
validationMsg = validationMsg + "Role is required \n";
validationFlag = true;
} else roleName.css("background-color", "");
var item;
var items;
var i;
if (permission._checkedIndices == "") {
items = permission.get_items();
for (i = 0; i <= items.get_count() - 1; i++) {
item = items.getItem(i);
item._element.style.backgroundColor = colorCode;
}
validationMsg = validationMsg + "Permission is required \n";
validationFlag = true;

} else {
items = permission.get_items();
for (i = 0 ; i <= items.get_count() - 1; i++) {
item = items.getItem(i);
item._element.style.backgroundColor = "";
}
}

if ( validationFlag) {
alert(validationMsg);
return false;
}
return true;


}
Shinu
Top achievements
Rank 2
 answered on 11 Aug 2014
6 answers
492 views
Hi,
I can access a TextBox control in RadGrid <DetailItemTemplate> in server side using C# [the code below works fine], but how can I access the TextBox in client side using javascript?

ASPX code:

<telerik:RadGrid ID="Grd_Pad" runat="server" GridLines="None" AllowSorting="true" AllowPaging="true" PageSize="20"AllowFilteringByColumn="true" AutoGenerateColumns="false" AllowMultiRowSelection="true" AllowMultiRowEdit="true"AllowAutomaticInserts="true" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true"DataSourceID="Sql_Pad" Width="100%">
    <SortingSettings SortToolTip=""/>
    <FilterItemStyle Width="100%"></FilterItemStyle>
    <GroupingSettings CaseSensitive="false"></GroupingSettings>
    <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric"/>
    <MasterTableView DataKeyNames="pad_id" CommandItemDisplay="Top" EditMode="InPlace"
        GroupLoadMode="Client" GroupsDefaultExpanded="true" TableLayout="Fixed" Width="100%">
            <telerik:GridTemplateColumn DataField="pad_name" HeaderText="Show Hide" SortExpression="pad_name"
                UniqueName="pad_showhide" CurrentFilterFunction="Contains"
                ShowFilterIcon="false" FilterControlToolTip="" FilterImageToolTip="" FilterControlAltText=""
                FilterControlWidth="100%">
                <HeaderStyle HorizontalAlign="Left" Width="5%"/>
                <ItemStyle HorizontalAlign="Left" Width="5%"/>
                <ItemTemplate>
                    <telerik:RadButton ID="Btn_Pad_Toggle" runat="server" Text="Toggle" ButtonType="StandardButton"
                        ToggleType="CheckBox" AutoPostBack="true" OnClick="CsPadShowHide">
                        <ToggleStates>
                           <telerik:RadButtonToggleState Text="Show"/>
                           <telerik:RadButtonToggleState Text="Hide" Selected="true"/>
                        </ToggleStates>
                    </telerik:RadButton>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        <DetailItemTemplate>
            <telerik:RadTextBox ID="Txt_Pad_Dtl" runat="server" TextMode="MultiLine" InputType="Text" Wrap="false"
                Label="" Text='<%# Eval("pad_text") %>' EmptyMessage="None..."
                AutoPostBack="false" Display="false" ReadOnly="true"
                BorderColor="#25A0DA" BorderWidth="1px" Width="100%" Height="200px">
            </telerik:RadTextBox>
        </DetailItemTemplate>
    </MasterTableView>
</telerik:RadGrid>

C# code:
protected void CsPadShowHide(object s, EventArgs e)
{
    RadButton btn = (RadButton)s;
    GridDataItem di = (GridDataItem)btn.NamingContainer;
    RadTextBox pad = di.DetailTemplateItemDataCell.FindControl("Txt_Pad_Dtl") as RadTextBox;
    //pad.Display = true; // Ali - works
    pad.Display = btn.SelectedToggleState.Selected;
}




Ali
Top achievements
Rank 1
 answered on 11 Aug 2014
2 answers
90 views
Hi All,

A seemingly novice issue but I fail to figure out the solution. In my radgrid, I have cells with dataformatstring = "{0:p}", which give for example a value of 0.01 a value of 1% on the grid when batch editing. Problem occurs when I try to update the cells.

While the value includes a "%" sign, the update value then becomes string rather than decimal that is required by my data entry and returning error. I'm quite sure there should be a official work around, any advice will be much appreciated!

Best Regards.

Konstantin Dikov
Telerik team
 answered on 11 Aug 2014
1 answer
130 views
Column does not belong to table GroupedTable when export data in excel using GridHyperlinkColumn of telerik radgrid
Daniel
Telerik team
 answered on 11 Aug 2014
3 answers
116 views
Hi,
button code is

<asp:Button ID="btnAddtask" runat="server" Text="Add " BackColor="#4F647D"
                          ForeColor="White" Font-Bold="true" Width="138px" OnClick="btnAdd_Click" OnClientClick="return CheckSelected();"
                          Enabled="False" Visible="False" />
Maria Ilieva
Telerik team
 answered on 11 Aug 2014
2 answers
181 views
Peeps,

Please save the hair I have left.  I want to export some data from a radgrid, but the radgrid has </br> in the data.  Im doing a find and replace in the RadGrid1_ExcelMLExportRowCreated function, replacing </br> with &#13;&#10;.  However the string is being encoded into HTML therefore it ends up looking like this in the xml &amp;#13;&amp;#10;.  How do I escape & so it gets injected as an ampersand, or is there anyway i can override an element that replaces all </br> to carriage return.  Surely someone has done this.
Daniel
Telerik team
 answered on 11 Aug 2014
4 answers
290 views
i am trying to change my tree to a load after the page loads of the initial tree (and perhaps a selected node in tree)
I currently have my tree working with webservice and the initial load loads in enough branches to a preselected node if a querystring of that category is present.
else it loads in the top folders.

what I want to do is use javascript on the load of the tree to initiate a loading of the tree.
in my control I have OnClientLoad="DoLoadTree" and a webservice of
WebServiceSettings Path="/DesktopModules/DocumentTree/TreeViewWebService.asmx" Method="GetTreeViewCategories"

my js function I am trying to call into the webservice with the top tree item for it to start adding in the nodes
​function DoLoadTree(){
var treeView = $find("<%=RadTreeView1.ClientID %>");

I can create a node if I wanted to but still cant see how to tell that node to have the + sign
and I cannot see how to tell that node or that tree parent to call into the webservice.
Boyan Dimitrov
Telerik team
 answered on 11 Aug 2014
2 answers
155 views
Hello there!

I want to know if the next scenerio is possible:

On my project, I have a RadListBox which gets populated with information from a database. Instead of showing records from the database, I want to show images for every record (the same image), and get as DataValueField an identificator that comes from the database for each record.

I hope you understood what I tried to describe in here hahaha.

Thanks a lot for the support! :)
Nencho
Telerik team
 answered on 11 Aug 2014
3 answers
181 views
Can someone point me in the direction of a document or demo that shows how to change the filter control layout?

See attached image for an example of what I am trying to accomplish...

Eyup
Telerik team
 answered on 11 Aug 2014
3 answers
147 views
Hi,

I want tabs to be at the bottom but its  showing at the top only,

<telerik:RadTabStrip runat="server" ID="RadTabStrip1" Orientation="HorizontalBottom"
                SelectedIndex="0" MultiPageID="RadMultiPage1" Skin="Glow">
                <Tabs>
                    <telerik:RadTab Text="Corporate">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Products">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Services">
                    </telerik:RadTab>
                </Tabs>
            </telerik:RadTabStrip>
            <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0"
                Width="150px"  >
                <telerik:RadPageView runat="server" ID="RadPageView1" >
                    <asp:Panel runat="server" ID="pnl1">
                        hii
                    </asp:Panel>
                </telerik:RadPageView>
                <telerik:RadPageView runat="server" ID="RadPageView2" >
                   <asp:Panel runat="server" ID="Panel1">
                        hiiefef
                    </asp:Panel>
                </telerik:RadPageView>
                <telerik:RadPageView runat="server" ID="RadPageView3" >
                   <asp:Panel runat="server" ID="Panel2">
                        hiigvrg
                    </asp:Panel>
                </telerik:RadPageView>
            </telerik:RadMultiPage>
Nencho
Telerik team
 answered on 11 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?