Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
301 views
I want to keep max width of Radgrid to 1200px

I am adding cloumns dynamically ,

my requirement is to increase width dynamically as cloumns are added and scrolls when it reach to 1200px


thanks
kishor
Princy
Top achievements
Rank 2
 answered on 11 Aug 2014
3 answers
254 views
Hi

Im using the AutoCompleteBox control to search items via a Web Api and selected value then stored as token. When submitting the form the saving of the tokens work fine but the token no longer appear in the box - its as if its lost from the view state. The functionality to search again is also lost from the box.

Any ideas or advise, see ASPX markup below:

<telerik:RadAutoCompleteBox runat="server" ID="RadAutoCompleteCostCenter" EmptyMessage="Search" Width="100%" ViewStateMode="Enabled" EnableViewState="true"
InputType="Token" DropDownPosition="Automatic" DropDownWidth="550" DropDownHeight="200" OnClientRequesting="autoComplete.Requesting" Skin="MetroTouch" MinFilterLength="3" >
<WebServiceSettings Method="search" Path="~/api/cost/" />
</telerik:RadAutoCompleteBox>

Shinu
Top achievements
Rank 2
 answered on 11 Aug 2014
1 answer
157 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
520 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
104 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
142 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
124 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
188 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
318 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
169 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?