Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
758 views
Hi,
     I am using Response.BinaryWrite() to export a excel file. By default the whole numbers are display the same but
i have to format cells by default of 2 decimalspoints. 

I need a help to over come this issue and suggest me is there any telerik controls can be used.
 





Thanks
Dhamodharan
Dhamodharan
Top achievements
Rank 1
 answered on 24 Jan 2014
2 answers
146 views
I have created a RadTreeview and made sure that the word-spacing CSS of it has a normal value.
How would i align the Labels vertically?

Please refer to the attached image
_je_
Top achievements
Rank 1
 answered on 24 Jan 2014
1 answer
68 views
Hi. first i am sorry because of the this long message.
there is a treeview,  button and listview. when i hit button listview's datasource should be filtered with treeview checked values.

 treeviewKat
(
CheckBoxes=true,
CheckChildNodes=true,
TriStateCheckBoxes=true
)
and  I am filtering an OpenAccessLinqDataSource with this treeviewKat's checked values.

How can i filter to OpenAccessLinqDataSource with treeviewKat's CheckedValues (multiple values).
 
I tried to add every node.value in the nodecollections of checked nodes to linqdatasource. but i cant get result.

Taking node.value of treeview is correct. i can see true added OADLSSoruTV.whereparameters, but i cant see listview update (lvSoruTV).

code-behind below:
protected void RadButton2_Click(object sender, EventArgs e)
        {
            OADLSSoruTV.WhereParameters.Clear();
  
            IList<RadTreeNode> nodeCollection =
                  treeviewKat.CheckedNodes;

            foreach (RadTreeNode node in nodeCollection)
            {
               
                OADLSSoruTV.Where =
                        "KategoriId ==Int32?(@KategoriId)";

                OADLSSoruTV.WhereParameters.Add
                        (
                          "KategoriId",

TypeCode.Int32,
node.Value.ToString()
                        );
     }
                OADLSSoruTV.DataBind();
}

Adding parameter OADSSoruTV is correct because i tried same thing with dropdownlist instead of treeview and it is working good.


Cuneyt
Top achievements
Rank 1
 answered on 24 Jan 2014
1 answer
71 views
A page requires that the value of RowIndex continue to increase when I go to the next page, yet it resets to 0 in the first column of each page.

I want the index to be 0, 1 , 2 , 3 on the first page, then 4, 5, 6, 7 on the next page; however, on the next page it would go to 0, 1, 2, 3 instead of continually increasing. Does anyone have any idea why this would be happening?

Here are the attributes of the grid:
<telerik:RadGrid ID="_EmpGrid" Skin="Web20" GridLines="None" runat="server" PageSize="10"
        AllowPaging="True" OnItemCreated="_EmpGrid_ItemCreated">

This is the Javascript behind the grid
            function ShowEditPanel(id, title_id, rowIndex)
{
                var grid = $find("<%= _EmpGrid.ClientID %>");

                var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
                grid.get_masterTableView().selectItem(rowControl, true);

                window.radopen("EmpPanel.aspx?EmpId=" + id + "&TitleId=" + title_id + "&Key=" + rowIndex, "EmpDialog");
                return false;
        }

and this is the function the grid calls upon

 protected void _EmpGrid_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                HyperLink editLink = (HyperLink)e.Item.FindControl("_EditLink");
                editLink.Attributes["href"] = "#";
                editLink.Attributes["onclick"] = String.Format("return ShowEditPanel('{0}', '{1}', '{2}');", e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Employee_ID"], e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Employee_title_Id"], e.Item.ItemIndex);
            }
        }

Jayesh Goyani
Top achievements
Rank 2
 answered on 24 Jan 2014
2 answers
410 views
Hi,
I have one grid with dynamic text boxes are coming from DB. The issue is that If user go to Edit mode in the Grid and then user puts some values in text boxes at the time user clicks the Enter button in Chrome browser, the application will take the another button control and make the changes as per the button event, So i need to disable the Enter Key in chrome browser, But its working fine in firefox browser.
The issues in in chrome browser only, I have attached my grid and script code snippet below.

Can anyone help me regarding this issue..

This is my script..
function OnEnterKeyPress(sender, args) {
                var keypressed = args._keyCode;
                if (keypressed == "13") {
                     document.getElementById('<%=lblMsg.ClientID %>').innerHTML = "Please use the Update Button";
                     args.set_cancel(true);
}

This is my Grid..
// This is my grid //
<telerik:RadGrid ID="RGRateCorrection" runat="server" AutoGenerateColumns="false"
                    Skin="Vista" OnNeedDataSource="RGRateCorrection_NeedDataSource" OnUpdateCommand="RGRateCorrection_UpdateCommand"
                    Width="1000px" Height="300px" HeaderStyle-Width="500px" ItemStyle-Width="500px"
                    OnItemDataBound="RGRateCorrection_ItemDataBound">
                    <MasterTableView EditMode="InPlace" EnableColumnsViewState="false" Width="1000px">
                        <Columns>
                            <telerik:GridEditCommandColumn ButtonType="LinkButton" UniqueName="EditCommandColumn">
                            </telerik:GridEditCommandColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings ClientEvents-OnKeyPress="OnEnterKeyPress">
                        <%-- AllowKeyboardNavigation="true"--%>
                        <Scrolling AllowScroll="true" />
                    </ClientSettings>
                </telerik:RadGrid>


-Thanks
Rk.MooRthy
 answered on 24 Jan 2014
1 answer
100 views
I have a grid that's using the following settings:

<telerik:RadGrid ID="RadGridTest"
            runat="server"
            AllowPaging="True"
            AllowCustomPaging="True"
            GridLines="None"
            OnNeedDataSource="RadGridTest_NeedDataSource"
            PageSize="25"
            OnItemDataBound="RadGridTest_ItemDataBound"
            AutoGenerateColumns="false"
            EnableHeaderContextMenu="true"
            EnableLinqExpressions="false"
            EnableHeaderContextFilterMenu="true"
            AllowSorting="True"
            MasterTableView-AllowCustomSorting="true"
            OnSortCommand="RadGridTest_SortCommand"
            MasterTableView-AllowMultiColumnSorting="true"
            AllowFilteringByColumn="true">
    <PagerStyle Mode="NextPrevAndNumeric/>
    <HeaderContextMenu OnItemClick="HeaderContextMenu_ItemClick">
    </HeaderContextMenu>
    <ClientSettings AllowColumnHide="True">
        <ClientEvents OnGridCreated="GetGridObject"></ClientEvents>
    </ClientSettings>
</telerik:RadGrid>

When sorting using the header context menu, unlike just clicking on the header, no SortCommand event is fired. I found a thread where you recommended using the ItemClick event on the header.

The problem is that this event is called after the grid rebinds once you click it, and even if you explicitely call RadGridTest.Rebind() in the event it doesn't take it. The only solution I've found so far is to set the datasource to null and then call rebind.

// Doesn't change the grid at all
protected void HeaderContextMenu_ItemClick(object sender, RadMenuEventArgs e)
{
    if (e.Item.Text == "Clear Sorting")
    {
        string columnName = e.Item.Attributes["ColumnName"]; // ["columnUniqueName"] Returns Null!?
        // Prepare conditions for sorted data
        RadGridTest.Rebind(); // Never actually raises NeedDataSource
    }
}
 
// Updates the grid with the correct changes.
protected void HeaderContextMenu_ItemClick(object sender, RadMenuEventArgs e)
{
    if (e.Item.Text == "Clear Sorting")
    {
        string columnName = e.Item.Attributes["ColumnName"]; // ["columnUniqueName"] Returns Null!?
        // Prepare conditions for sorted data
        RadGridTest.DataSource = null;
        RadGridTest.Rebind();
    }
}

Is setting the datasource to null the correct approach, or is there something I am missing.
Princy
Top achievements
Rank 2
 answered on 24 Jan 2014
3 answers
219 views
I have a LinkButton control that I am adding to a GridTableCell, but when I assign it an ID, the Item Command Event does not fire.

	    ///WORKS
	    LinkButton linkButton = new LinkButton();
            linkButton.Text = name;
            linkButton.CommandArgument = locationString;
            //linkButton.ClientIDMode = System.Web.UI.ClientIDMode.Static;
            //linkButton.ID = string.Concat("LinkButton_", Guid.NewGuid().ToString("N"));
            //linkButton.CommandName = string.Concat("LocationNameLink_", linkButton.ID);            
            linkButton.CommandName = "LocationNameLink";   
               return linkButton; ///DOES NOT WORK
	    LinkButton linkButton = new LinkButton();
            linkButton.Text = name;
            linkButton.CommandArgument = locationString;
            linkButton.ClientIDMode = System.Web.UI.ClientIDMode.Static;
            linkButton.ID = string.Concat("LinkButton_"Guid.NewGuid().ToString("N"));
            linkButton.CommandName = string.Concat("LocationNameLink_", linkButton.ID);
	   return linkButton;

Thoughts?

Shinu
Top achievements
Rank 2
 answered on 24 Jan 2014
4 answers
216 views

I have a grid with a DetailItemTemplate defined.  

On the PreRender method of the grid, I get all the GridGroupHeaderItems and I set the Expanded property to false.  

The grid displays correctly except the DetailItemTemplate rows are visible.

When I open it using the control, it shows the rows and associated detail rows, and when I collapse it on the page it works correctly -- just not from the PreRender method.

Is there something else that I need to set or a workaround?

Thanks,
Todd.


Princy
Top achievements
Rank 2
 answered on 24 Jan 2014
1 answer
384 views
How to change  RadTextBox TextMode  is password change to normal text in server side code in asp.net
Shinu
Top achievements
Rank 2
 answered on 24 Jan 2014
6 answers
224 views
Hi, I set up the vb.net demo as per below
http://demos.telerik.com/aspnet-ajax/imageeditor/examples/imageupload/defaultvb.aspx?product=asyncupload#qsf-demo-source

When I add a "TargetFolder" the temp file creates itself in RadUploadTemp,  but immediately disappears.

It only works if I remove the target folder. i.e the temporary file remains in RadUploadTemp and I can manipulate the image.

Why is it failing if I set a TargetFolder?

<telerik:RadAsyncUpload ID="AsyncUpload1" runat="server" OnClientFilesUploaded="OnClientFilesUploaded"

OnFileUploaded="AsyncUpload1_FileUploaded" MaxFileSize="2097152" AllowedFileExtensions="jpg,png,gif,bmp"

AutoAddFileInputs="false" Localization-Select="Select" TargetFolder="~/images">

 

Troy
Top achievements
Rank 1
 answered on 24 Jan 2014
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?