Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
324 views

Q1 2012 (Version 2012.1.215)

Breaking change:
  Since the Beta release of Q1 2012 the nodes of the treeview have their text html encoded.

Reason:
There were problems when using LoadOnDemand through WebService and ServerSideCallBack. When a node with html in the text was added a server error occurred upon postback.

Solution:
From the upcoming Latest internal build the encoding will be optional through the property EnableNodeTextHtmlEncoding and it will be disabled by default. 

Telerik Admin
Top achievements
Rank 1
Iron
 asked on 17 Feb 2012
2 answers
110 views
I have this function on my aspx page.
function openWindow() {
          
            //get a reference to the window
            var oWnd = $find("<%= RadWindow2.ClientID %>");
            //set its NavigateUrl
            oWnd.setUrl("http://xyz.com/abc.zip");
            //add the name of the function to be executed when RadWindow is closed
            
            //show the window
            oWnd.show();
        }

I want to call this function in Button click event through RegisterStartupScript. It gets called but window doesn't open. Also I want to open a url which has a zip file for download. So as soon as user is prompted about Save dialog box, I want to close radwindow.

HELP!!!!!
Svetlina Anati
Telerik team
 answered on 17 Feb 2012
1 answer
75 views
SelectedNode property not working for the new version of Telerik (2011.2.712.35)
Please do help me out
This is the code


        RadComboBox rcmbTeamForCompany = (RadComboBox)sender;
        RadTreeView treeinCmb;
        treeinCmb = (RadTreeView)rcmbTeamForCompany.Items[0].FindControl("rtKeywordType");

      selectedKeywordType = treeinCmb.SelectedNode.Text.ToString();

        int selectedKeywordTypeID = int.Parse(treeinCmb.SelectedNode.Value.ToString());



        if (ViewState["selectedKeywordTypeID"].ToString() == selectedKeywordTypeID.ToString())
        {
            return;
        }

value is cming null.
lines which are in red colour
Neha
Top achievements
Rank 1
 answered on 17 Feb 2012
5 answers
162 views
Hi,
I am using 2 Stored Procedures to populate 2 different RadGrids. For RadGrid1, OnNeedDataSource event calls a handler function inside which a SP is executed and the data table is equated to RadGrid1.DataSource. Now, I want to populate RadGrid2 when a row is selected in RadGrid1. For this, OnRowSelected event of RadGrid1 is handled by a Javascript function that is extracting some specific cell values of the selected row and initiates an ajaxRequest() with argument string passed. I am using a RadAjaxManager which looks like :

<

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_OnAjaxRequest">

 <AjaxSettings>

 <telerik:AjaxSetting AjaxControlID="RadGrid1">

 <UpdatedControls>

 <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />

 

<telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel1" />

 </UpdatedControls>

 </telerik:AjaxSetting>

 </AjaxSettings>

 </telerik:RadAjaxManager>

 
In Code-Behind, I have a handler function RadAjaxManager1_OnAjaxRequest() for handling the ajax request. Inside RadAjaxManager1_OnAjaxRequest, I am passing on the arguments to execute an SP and equating the data table returned to RadGrid2.DataSource, as below :

protected

 

void RadAjaxManager1_OnAjaxRequest(object sender, AjaxRequestEventArgs e)

{

String argument = e.Argument;

String[] args = argument.Split("^".ToCharArray());

NameValueCollection parameters = new NameValueCollection();

parameters.Add("@par1", args[0]);

 parameters.Add("@par2", args[1]);

 parameters.Add("@par3", args[2]);

 RadGrid2.DataSource = obj.ExecuteSP("MySP", parameters);

 RadGrid2.Rebind();
}

The problem arises now, when I select a row in RadGrid1, I do not see any RadAjaxLoadingPanel being loaded. Moreover, the RadGrid2 does not populate. However, While debugging I am able to see that the rows are being returned(RadGrid2.DataSource.Rows.Count is greater than 0).

Thanks,
Anup

Tsvetoslav
Telerik team
 answered on 17 Feb 2012
2 answers
547 views

Hello,

I have radgrid control in my page. I want hide the some rows in grid depending on the data in it. And I want to show these rows when clicking on the button which is inside the grid. I have attached the sample screenshot here.
Tsvetoslav
Telerik team
 answered on 17 Feb 2012
2 answers
60 views
I've inherited a project that is using RadGrid for data display that uses Filtering.  If I click the Filter Icon to select an option from the list, prior to entering any filter criteria, all filter options are displayed at the very top of the page in very cheesy, style-less text.  Once I add a criteria into the filter box and click the icon, the filter options display inline as desired.

The requirement is for the user to be able to change the default Filter Menu prior to entering criteria.

Anyone have an idea why that happens?


Tsvetoslav
Telerik team
 answered on 17 Feb 2012
1 answer
89 views
I have a radgrid and one of the columns is a GridButtonColumn with a ButtonType="PushButton" with the default text set to "Add". On the ItemDataBound routine I update the text value with the number of items that were added. So when the grid rebinds it now displays the number of added items. Works fine up to now.

Here is where it gets messed up. If I select a row in the grid, all the values in the column reset back to "Add". It seems that the re-rendering of the grid resets all the column values back to the defaults. If the grid is re-bound the values are back again. So it's not a data issue, it's a rendering issue on row selection.

I completely removed any code in the OnSelectedIndexChanged event, so it's nothing to do with any code in that event. It has something to do with the AllowRowSelect directive with EnablePostBackOnRowClick="true". The ItemDataBound routine is not called on row selection, is there another event I can re-set my values to? Would I have to write a routine that loops through each row and sets the proper values after the selection has been made?

I would think the the databindings should persist after a row selection.

<telerik:RadGrid ID="rg_ExportDetail" runat="server" ShowStatusBar="true" OnItemDataBound="rg_ExportDetail_ItemDataBound" OnSelectedIndexChanged="rg_ExportDetail_SelectedIndexChanged"

 

OnNeedDataSource="rg_ExportDetail_NeedDataSource" OnItemCommand="rg_ExportDetail_ItemCommand" Skin="Vista"

 

<MasterTableView TableLayout="Auto" EditMode="InPlace" AutoGenerateColumns="false" ClientDataKeyNames="ExportItemID">

 

<NoRecordsTemplate>

<div>There are no records to display</div>

</NoRecordsTemplate>

<Columns>

<telerik:GridBoundColumn DataField="ExportItemID" UniqueName="ExportItemID" Visible="false" />

<telerik:GridBoundColumn DataField="ExportDate" UniqueName="ExportDate" Visible="true" HeaderText="ExportDate" />

<telerik:GridBoundColumn DataField="Description" UniqueName="Description" Visible="true" HeaderText="Description" HeaderStyle-Width="300px" />

<telerik:GridBoundColumn DataField="ECL" UniqueName="ECL" Visible="false" HeaderText="ECL#" />

<telerik:GridBoundColumn DataField="Quantity" UniqueName="Quantity" Visible="false" HeaderText="Quantity" />

<telerik:GridBoundColumn DataField="UnitValue" UniqueName="UnitValue" Visible="false" HeaderText="Unit Value" DataType="System.Double" DataFormatString="{0:C}"/>

<telerik:GridBoundColumn DataField="TotalValue" UniqueName="TotalValue" Visible="true" HeaderText="Total Value" />

<telerik:GridButtonColumn ButtonType="PushButton" UniqueName="Consignees" text="Add" HeaderText="Consignee(s)" CommandName="AddConsignees" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="120px" />

<telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ItemStyle-HorizontalAlign="Center" ConfirmText="Removing Item"></telerik:GridButtonColumn>

</Columns>

<ItemStyle HorizontalAlign="Left" CssClass="disabledFontColorEmphasis" Wrap="false" />

<AlternatingItemStyle HorizontalAlign="Left" CssClass="disabledFontColorEmphasis"

Wrap="false" />

<HeaderStyle HorizontalAlign="Left" Wrap="false" Width="100px" />

<FilterItemStyle HorizontalAlign="Left" />

</MasterTableView>

<ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true" >

<Selecting AllowRowSelect="True" />

</ClientSettings>

</telerik:RadGrid>

Tsvetoslav
Telerik team
 answered on 17 Feb 2012
1 answer
100 views
Hi,
In my parent page I have a grid with edit button in each row. 
I am opening edit form in RadWindow using following code. 
<script type="text/javascript">
            function OnClientClicked_PayInvoice(button, args) {
                var argument = button.get_commandArgument();
                var arguments = argument.split("#");
                var url = 'MakeOrderPayment.aspx?';
                url = url + "ID=" + arguments[0];
                radopen(url, "radWinInvoiceDetails");
                button.set_autoPostBack(false);
            }
        </script>

After clicked on save button I want to display saved message and when user close the RadWindow , the grid/page in main window should get display with updated value.

I am looking for example, If you have any code please share with me.
Thanks,
Abhi
Princy
Top achievements
Rank 2
 answered on 17 Feb 2012
1 answer
152 views
Hi,

how can i fire Javascript function when "Check All" in RadCombobox is checked.

Thanks
Princy
Top achievements
Rank 2
 answered on 17 Feb 2012
1 answer
95 views
Hi,
I have a grid, in that I have 3 GridBound Columns and 2 Grid Template columns (Dropdowns) and one other GridTemplateColumn (radButton).

On Click on this button, I want to collect the data from the Gridbound column, Grid Template column and then do some operation.
How can I do this?

<

telerik:GridTemplateColumn HeaderText="Action" ColumnEditorID="clmEd150px"> 
<HeaderStyle Width="20%" />  
<ItemStyle HorizontalAlign="Left"></ItemStyle>  
<ItemTemplate>
<telerik:RadButton ID="rdBtnDoSomeOp" runat="server" ButtonType="StandardButton" Text="Do Some Operation" Skin="Office2010Black" OnClick="rdBtnDoSomeOp_Click">

</telerik:RadButton

</ItemTemplate>

</telerik:GridTemplateColumn>  

protected

void rdBtnDoSomeOp_Click(object sender, EventArgs e)  

{

}

Thanks and Regards,
Deepika Karanth
Shinu
Top achievements
Rank 2
 answered on 17 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?