Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
186 views
Hi,
I am have a column that is bound to a string in the form comma separated list.

I want to display the list items on separate lines in the cell so I use the following

    protected void grvReport_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridDataItem) 
        { 
            GridDataItem item = ((GridDataItem)e.Item); 
            item["coltrainerList"].Text = item["coltrainerList"].Text.Replace(",""<br/>"); 
        } 
 
        // More unrelated stuff 
    } 

This works as expected. But I also want to use the ExportToCSV() feature using a linkbutton to trigger the export. I don't want <br/>s OR commas to appear in my exported CSV file so I attempt to change the data again prior to calling export as follows...
foreach (GridDataItem item in grvReport.MasterTableView.Items) 
   item["coltrainerList"]. Text = item["coltrainerList"].Text.Replace("<br/>"" - "); 
 
grvReport.MasterTableView.ExportToCSV(); 
 

This does the expected change, but unfortunately the data gets bound again before it is actually exported so I get the initial comma separated data which in turn gets changed to include the <br/>s. Therefore I still get the <br/>s in my CSV file.

Is there any way to stop the grid from rebinding when the export function is called? Or can you suggest some other way of achieving the desired effect?

Cheers


Daniel
Telerik team
 answered on 27 Apr 2010
2 answers
160 views
Does anyone know if it is possible to build a combobox by using LoadOnDemand where I use a HeaderTemplate and ItemTemplate similar to this example

My goal is  to allow the user autocomplete the text for the current combobox value but have it display choices that are a combination of multiple combobox combinations.

Richard
Top achievements
Rank 2
 answered on 27 Apr 2010
2 answers
124 views
I'm investigating using your Sliding Pane feature to allow the user to hide a navigation tree that's only periodically used.  From your examples, the closest to my application would be this: http://demos.telerik.com/aspnet-ajax/splitter/examples/sp_tabview/defaultcs.aspx   Just imagine it with only "Pane 1".

My question has to do with how to change the grey background of the top header.  I've looked at the examples on the website.  It appears they have something to do with registering tags and ascx files.  Huh?  Whatever happened to either setting properties or at least referring to a CSS element?

I would appreciate learning of an industry standard way to change such style info.

Sincerely,

Robert W.

Robert
Top achievements
Rank 1
 answered on 27 Apr 2010
1 answer
221 views

I have a User Control with a ListView that is using the RadDataPager. I wanted to do something fairly simple and that was to have a PageSize property on my user control that could be used to set the RadDataPager.PageSize property.

Now, I did get this to working using the following code:

<telerik:RadDataPager ID="DataPager" runat="server" PagedControlID="myListView" 
                       PageSize="<%#this.PageSize%>"

The only issue I have with this is this that if the page size is different from whatever the default value is, the parent listview DataBound event is fired two times, once for the original page size, and a second time if a new value is specified.

Although this is not a big issue, it would be cool if there were a way to set the RadDataPager.PageSize property before its gets databaound; however, I was not able to find the "DataPager" using the listviews.FindControl method any earlier in the page life cycle.
I did try Page_Load, ListView.NeedDataSouce, ListView.DataBinding, ListView.Init.



BaiH
Top achievements
Rank 1
 answered on 27 Apr 2010
0 answers
86 views
please delete me.. 
Brian Garson
Top achievements
Rank 2
 asked on 27 Apr 2010
1 answer
170 views
Hi,
I m using radchart in my application and I m having the following code in user control

Userconttrol

<telerik:RadSplitter id="RadSplitter4" runat="server" Orientation="Horizontal">
    <telerik:RadPane id="LeftPane1" runat="server" Scrolling="None">       
       <telerik:RadAjaxPanel ID="fsdg" runat="server">
        <telerik:RadChart ID="RadChart1" runat="server" DefaultType="Bar" OnClick="DetailedGraph_Click">
                <ClientSettings ScrollMode="None" />
        </telerik:RadChart>
       </telerik:RadAjaxPanel>
    </telerik:RadPane>
        <telerik:RadPane id="RadPane1" runat="server" Scrolling="None" Height="8%">
        <telerik:RadComboBox ID="ChartType1" runat="server" Visible="true" AutoPostBack="true" OnSelectedIndexChanged="ChartType1_SelectedIndexChanged">
              <Items>
              <telerik:RadComboBoxItem  Text="Bar" Value="2"/>
              <telerik:RadComboBoxItem  Text="Area" Value="3"/>
              </Items>
        </telerik:RadComboBox>
    </telerik:RadPane>
</telerik:RadSplitter>

and i m trying to resize the chart by using the following code in a webpage,

but it doesn't work at first time when button click.

Code in .aspx page

function reload()
    {
    alert("Resizing");
 
        var manager = $find("RadAjaxManager1");
        manager.ajaxRequest();
    }

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest" >
           <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="Cha1" LoadingPanelID="LoadingPanel1"/>                    
                    </UpdatedControls>
            </telerik:AjaxSetting>
              
            <telerik:AjaxSetting AjaxControlID="BindChart">
                   <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="Cha1" LoadingPanelID="LoadingPanel1"/>                    
                     </UpdatedControls>
            </telerik:AjaxSetting>
          </AjaxSettings>
</telerik:RadAjaxManager>
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
        <ucl:ChartCtrl ID="Cha1" runat="server" />
        <asp:Button ID="BindChart" runat="server" Text="BindChart" OnClick="BindChart_Click" />
        <asp:Button ID="ResizeChart" runat="server" Text="ResizeChart" OnClientClick="reload(); return false;" />       
    </div>

Codebehind

Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As AjaxRequestEventArgs)
        radchart1 = DirectCast(Cha1.FindControl("RadChart1"), RadChart)
        radchart1.Height = System.Web.UI.WebControls.Unit.Pixel(Integer.Parse(radchart1.Height.Value.ToString()) + 80)
        radchart1.Width = System.Web.UI.WebControls.Unit.Pixel(Integer.Parse(radchart1.Width.Value.ToString()) + 100)
End Sub

 
Chart not change it size i m clicking the button first time. I think the problem might be in usercontrol.

Please give any suggestions to solve it.

Regards,
Maha

Ves
Telerik team
 answered on 27 Apr 2010
3 answers
116 views
Hi,

I am using a active social module(forums) which has a editor. I am using telerik  to modify the editor.

I need to add another button to the telerik tool bar. But the problem i am facing is that all the examples and demo's out there to add a button is when we know the ID of the editor. Telerik is dynamically changing the ID. How do i add a button?

Thanks,
Amith
Dobromir
Telerik team
 answered on 27 Apr 2010
9 answers
533 views
Is it possible to automatically resize the vertical height of the RadEditor to fit the content? (similar to the attachResize event of the classic RadEditor)
Rumen
Telerik team
 answered on 27 Apr 2010
2 answers
82 views
I'm using RadEditor for creating Newsletter layouts in the Browser. But since Outlook 2007 doesn't support CSS I want RadEditor to use HTML attributes in favor of CSS whenever possible. e.g. when I align an IMG I want it to create

<img src="..." align="left" />

instead of

<img src="..." style="float: left" />

Disabling ConvertToXhtml doesn't seem to work since it only prevents RadEditor to convert HTML to XHTML, but doesn't force it to create HTML (without CSS) in the first place.
Martin Ennemoser
Top achievements
Rank 1
 answered on 27 Apr 2010
3 answers
149 views
In my application am using Telerik Radgrid & RadTabStrip

In RadTabStrip1 I've to show Column1, Column2, Column3, Column4, Column5 in the RadGrid

In RadTabStrip2 I've to show Column1 & Column2 in the RadGrid

In RadTabStrip3 I've to show Column1, Column2, Column4, Column5 in the RadGrid

Each columns are of different width.

I just want to find out what are the columns loaded in each RadTabStrips with Column width.

Is it possible? Pls let me know with sample code.



Dimo
Telerik team
 answered on 27 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?