Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
174 views
Hello Friends 

I want to set height of Grid HeaderStyle  and ItemStyle(row)

.aspx code

/* CSS */
 <style type="text/css">
        div.RadToolBar .rtbUL
        {
            width: 100%;
            height: 20px;
        }

        div.RadToolBar_Default .rtbTemplate
        {
            margin-left: 450px;
            margin-top: 0px;
        }

        div.RadFileExplorer .RadGrid .rgRow TD
        {
            height: 10px;
            margin-bottom: 0px;
            margin-top: 0px;
        }

        .RadGrid_Web20 .rgRow TD
        {
            font-size: 10px;  /*  You can set size of font  */
            height: 5px;
        }

        .RadGrid_Web20 .rgRow TR
        {
            height: 8px;
        }

        .RadGrid_Web20 .rgRow
        {
            height: 8px;
        }

        .RadGrid_Web20 .rgHeader
        {
            height: 12px;
        }
    </style>

/* Telerik control */

  <telerik:RadFileExplorer runat="server" ID="FileExpDocument" TreePaneWidth="0px" Height="180px" Width="98%"
                                                                OnExplorerPopulated="FileExpDocument_ExplorerPopulated" EnableCreateNewFolder="true" EnableOpenFile="true" DisplayUpFolderItem="true"
                                                                EnableCopy="true"
                                                                ViewStateMode="Enabled" OnClientLoad="ClientLoad">
                                                                <Configuration ViewPaths="~/TempImage" UploadPaths="~/TempImage"
                                                                    DeletePaths="~/TempImage" EnableAsyncUpload="true" MaxUploadFileSize="1024000" SearchPatterns="*.*"></Configuration>
                                                                <KeyboardShortcuts NewFolder="CTRL + 5" Open="CTRL + 3" Refresh="CTRL + 4" UploadFile="CTRL + U" Back="CTRL + 1" Forward="CTRL + 2" />
                                                            </telerik:RadFileExplorer>


.CS code

//Set Grid properties

 FileExpDocument.Grid.Skin = "Web20";
        FileExpDocument.ListView.Skin = "Web20";

        //FileExpDocument.
        //FileExpDocument.Grid.CssClass="

        //GridHeaderItem header = FileExpDocument.Grid.he.FindByUniqueNameSafe("DocumentCategory");

        FileExpDocument.Grid.HeaderStyle.Height = 15; //it take minimum 15 but when i set to 10 height remain same
        //FileExpDocument.Grid.HeaderStyle.Font.Bold;
        FileExpDocument.Grid.ItemStyle.Height = 5;  // it  not take 5

        FileExpDocument.Grid.CellPadding = 0;
        FileExpDocument.Grid.CellSpacing = 0;


/////////////////*********/////////////////////

I have upload two image so you can get more idea what i exactly want


Thanks in advance 






Ianko
Telerik team
 answered on 27 Dec 2013
3 answers
80 views
Sorry tried finding this code suppose it out these but but my google foo is not finding.  Neeed to be able to return the radgrid to a a sub row from where I pressed the update button.  Right now it closes the grid on rebind, but then i need it to expand back to the row that was updated or on delete to the place the record was deleted from.  Hope I am explaining good enough, thanks for the help.
Princy
Top achievements
Rank 2
 answered on 27 Dec 2013
0 answers
51 views
Hi,Telerik Team

After I have opened the web page for 2 hours, the AutoCompleteBox control doesn't work. I have also attached the pic of an error with this. I have tried 2 ways to do data binding, using asp:SqlDataSource and Server site "atpMember.Datasource = DataTable;"

The following is an example of  "asp:SqlDataSource" code

Do you have any suggestion for fixing this problem?  Thank you in advance.

<telerik:RadAutoCompleteBox runat="server" ID="atpMember" InputType="Token"  Filter="Contains" Width="500px"
DropDownWidth="298px" DropDownHeight="300px" DataSourceID="SqlDataSource1" DataTextField="USER_NAME"
DataValueField="USER_ID" Skin="Windows7">
    <DropDownItemTemplate>
         <table cellpadding="0" cellspacing="0">
               <tr>
                    <td>
                           <table cellpadding="0" cellspacing="0">
                                 <tr>
                                       <td style="width: 60px">
                                              <%# DataBinder.Eval(Container.DataItem, "USER_ID")%>
                                       </td>
                                       <td style="width: 220px">
                                               <%# DataBinder.Eval(Container.DataItem, "USER_NAME")%>
                                       </td>
                                  </tr>
                              </table>
                          </td>
                     </tr>
               </table>
       </DropDownItemTemplate>
 </telerik:RadAutoCompleteBox>
 
 
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:OracleConnectionString %>"
            ProviderName="System.Data.OracleClient" SelectCommand="SELECT USER_ID,USER_NAME FROM KPDBA.USERS
     WHERE DEL_STAT = 'N' ">
</asp:SqlDataSource>
Nitisak
Top achievements
Rank 1
 asked on 27 Dec 2013
5 answers
182 views
<telerik:RadNumericTextBox ID="txtStuAdds" Width="70px" Value="0" DbValue='<%# Bind("StudentAdds") %>'
                                                      runat="server" Type="Number" NumberFormat-DecimalDigits="0" Onkeyup="txtStudAddValueChanged()" >
                                                  </telerik:RadNumericTextBox>
                                                                                             <asp:DropDownList runat="server" ID="ddlStuAddStatus" />
I have RadNumericTextBox how can I disable/enable dropdown based on a value entered? if textbox is empty or 0 enable drop down else disable.
<script type="text/javascript">
    function txtStudAddValueChanged(sender, eArgs) {
        var numericTextBox = $find(sender.id);
        var value = numericTextBox.get_value();
        alert(value);
    }
I have the following script but it failed on var numericTextBox = $find(sender.id);
Shinu
Top achievements
Rank 2
 answered on 27 Dec 2013
4 answers
119 views
I have a combobox on a form that is loaded server side. When I type the name of a person in the combobox, it highlights the name in the dropdown and also completes the name in the text area. But, when I hit the enter key it isn't selecting the item. I have an OnClientKeyPressing event set to handle the keystrokes and check for the enter key. But, the get_value() is blank. But, If I actually click on the item in the dropdown, then the get_value() returns a value.

If the items is found in the dropdown, and is highlighted in the dropdown list and autocompletes the text field, why isn't it selecting that item and allowing me to get the value for it with the get_value() method?

<telerik:RadComboBox ID="CustomerSearch" runat="server" Width="180" Height="160"
        MarkFirstMatch="true" AllowCustomText="true" CssClass="CustomerSearch" AutoPostBack="true"
       
EnableVirtualScrolling="true" ShowMoreResultsBox="true" OnTextChanged="CustomerSearch_TextChanged"
        OnSelectedIndexChanged="CustomerSearch_SelectedIndexChanged" OnClientKeyPressing="HandleKeyPress"
        EmptyMessage="Enter last, first to search..." BackColor="White" Skin="Forest" />
 
 
<script type="text/javascript">
      function HandleKeyPress(sender, args) {
              if (args.get_domEvent().keyCode == 13) {
                        //this alert message is not null. it is an empty string.
                        alert(sender.get_value());
              }
      }
</script>
Steve
Top achievements
Rank 1
 answered on 26 Dec 2013
2 answers
114 views
In my RadTreeList I have two data columns displayed. The first column is a number and the second column is a percent. On the client side I wish to update the percent value when the number changes; and when the percent changes I wish to update the number. Both columns are defined as TreeListNumericColumns and are configured to use a RadNumericTextBox. I have attached OnValueChanged events to both columns.

Using JavaScript if the number changes I can determine the new number, but I do not know how to get a reference to the percent column so I can update the percent. I know how to get a reference to the item containing the numeric column updated and I can get a reference to the table cell containing the percent RadNumericTextBox but I need a reference to the RadNumericTextBox which is in the innerHTML so that I can update the Percent..

Here is my Javascript code for the OnValueChangedEvent when the number changes. This all works but I cannot figure out how to get a reference to the RadNumericTextBox containing the percent so I can update the value displayed on the client.
function NumberValueChanged(sender, eventArgs) {
    var treelist = $find('<%=rtvProducts.ClientID %>');
    var numericTextBox = sender.get_element();                    
    var item = treelist.getContainerItem(numericTextBox);   
    var index = item.get_displayIndex();                                     
    var column = treelist.getColumnByUniqueName('Percent');
    var colname = column.get_uniqueName();
    var cell = treelist.getCellByColumnUniqueName(item, colname); 
    alert(cell.innerHTML);
    return;
    }
I am using Telerik version 2013.1.417.40

Any help would be appreciated. 

Thanks,
Chris J.


.
Christopher
Top achievements
Rank 1
 answered on 26 Dec 2013
5 answers
533 views
Hi,

 am using old Rad control. "RadAjax.Net2" of "Telerik.WebControls"

i have a button inside RadAjaxPanel to download a text file from server.

ASPX Code :
<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="radA" %>
<radA:RadAjaxPanel ID="RadAjaxPanel2" runat="server" Width="100%" >
         <table>
              <tr>
                   <td>
                        <asp:Button ID="btnBillingFile" runat="server"  Text="Generate billing file"   OnClick="btnBillingFile_Click" />
                   </td>
              </tr>
         </table>
</radA:RadAjaxPanel>

C# Code :
protected void btnBillingFile_Click(object sender, EventArgs e)
{
                    string fileTabDelimited = ConfigurationManager.AppSettings["KEY_DOCUMENT_FOLDER"] + @"\Billing Files\BillFile.txt";
                    FileInfo fileInfo = new FileInfo(fileTabDelimited);
                    if (fileInfo.Exists)
                    {
                        Response.Clear();
                        Response.AddHeader("Content-Disposition", "attachment; filename=" + fileTabDelimited);
                        Response.AddHeader("Content-Length", fInfo.Length.ToString());
                        Response.ContentType = "application/octet-stream";

                        Response.WriteFile(fileTabDelimited);
                        //Response.End();
                    }
}

but not working. This code can not prompt to Open/Save dialog.

please help.
Chandan
Rakesh
Top achievements
Rank 1
 answered on 26 Dec 2013
1 answer
63 views
Hi all, 
How to change the color,  I mean background color ok the row,  after accessing the row. 

Please provide a solution... 
Princy
Top achievements
Rank 2
 answered on 26 Dec 2013
1 answer
78 views
Hi ,
i have two columns, based on first column values i want second column some rows to be a radcombobox or textbox etc. How to do this?
Shinu
Top achievements
Rank 2
 answered on 26 Dec 2013
0 answers
46 views
fixed issue...
Rayne
Top achievements
Rank 1
 asked on 26 Dec 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?