Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
134 views
I am exporting RadGrid using the exportToCSV() functionality. I have command fields whose headers I don't want to be exported.

At present the export is like this:
"Notes","View/Edit","First Name","Last Name","Organization","Job Title","Email","Business Phone","Delete"
"","","Abhishek","Parakh","State","Web Dev","yadayada@yahoo.com","405-xxx-xxxx",""

I want it to be like this:
"First Name","Last Name","Organization","Job Title","Email","Business Phone"
"Abhishek","Parakh","State","Web Dev","yadayada@yahoo.com","405-xxx-xxxx"

I dont want to do things manually. For example, do replace or remove characters, I just dont want the command fields to be exported from the radgrid.

Someone has posted examples such as
e.ExportOutput = e.ExportOutput.Replace("<head>", head);                      
e
.ExportOutput = e.ExportOutput.Replace("<td>", "<td class='cell'>")

However, again this is only manual replacements. In future names of my command fields may change as well as their position.

All I want is that radgrid should not export command fields but only the fields corresponding to my database table and data.
Abhishek Parakh
Top achievements
Rank 1
 answered on 22 Jun 2009
7 answers
187 views
Hi All,
             Iam using two levels of hireachy in the Grid. The main Grid is RadGrid and SubGrid is RadGrid. Inside this SubGrid I have one more RadGrid. On the ItemCommand event how to identify the Grid

Can any one pls let me know.

Its very Urgent.

Regards
asra
Daniel
Telerik team
 answered on 22 Jun 2009
2 answers
103 views
Hi

I have run into a mysterious problem - when I edit an exisiting combo box by clicking the smart tag
and using the 'Build RadComboBox' link , the edits are not saved.

eg I have a page with a combobox that has been working for some time. I wanted to add some items
to the drop down list.
When I add a new item to the RadComboBox list, use the up/down arrow etc to position it,
click OK, close the smart tag and save the page, the changes are not retained. If I switch to code
view, I can see nothing has changed. 

It happens with other pages too.

I can edit in code view and the changes are saved OK, and show up in the smart tag builder,
but this negates some of the productivity features..

How can I fix this? I am not even sure where to start looking!

Thanks for your help

Clive
.

Clive Hoggar
Top achievements
Rank 1
 answered on 22 Jun 2009
1 answer
115 views
Hi All,

I am facing problems when i used Radgrid Insert/Update/Delete
funcution with Filtering column. It does not work properly.

Please Suggest me...


Thank You,
Kailash Bokade


Pavlina
Telerik team
 answered on 22 Jun 2009
3 answers
86 views
I am using the RadPanelBar to replace the left side quick launch navigation in SharePoint. I am using the default left navigation datasource "QuickLaunchSiteMap". So when I create the links in SharePoint and select open in new window. The rad panel bar does not open in a new window. All link open in the same window regardless. Any help would be appreciated. 

below is what I have in my master page to replace the left navigation elements.

     <telerik:RadScriptManager ID="ScriptManager1" runat="server" />
     
     <telerik:RadPanelBar runat="server" ID="RadPanelBar1" DataSourceID="QuickLaunchSiteMap" Skin="Default" EnableEmbeddedSkins="false" ExpandMode="MultipleExpandedItems">
     </telerik:RadPanelBar>

thanks
-tom
Paul
Telerik team
 answered on 22 Jun 2009
2 answers
700 views
I have a RadGrid which I am binding it to a DataSet in the C# code. I am also adding a column which is a RadButtonColumn dynamically on the Page Load event. My problem is that I cannot able to set the CommandArgument on that column from the values from one of the Columns in the DataSet.
Also using the GoogleLikeFiltering on it which is working fine.

Any help would be appreciated.

Here is my code:
ASCX:

<

radG:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AllowPaging="True"  

 

AllowSorting="True" AllowFilteringByColumn="True" EnableAJAX="True" EnableAJAXLoadingTemplate="True"  

 

OnNeedDataSource="RadGrid1_NeedDataSource" OnColumnCreating="RadGrid1_ColumnCreating" OnItemCommand="RadGrid1_ItemCommand">  

 

<MasterTableView EditMode="InPlace" DataKeyNames="SubmitId" AllowFilteringByColumn="True" AllowMultiColumnSorting="true" />  

 

<PagerStyle Mode="NextPrevAndNumeric" />  

 

</radG:RadGrid>

C# code:

 

protected

void RadGrid1_NeedDataSource(object source, Telerik.WebControls.GridNeedDataSourceEventArgs e)  

{

ds = GetDataSet();  

 

this.RadGrid1.DataSource = ds;

}

 

 

protected void Page_Load(object sender, System.EventArgs e)

{ 

 

try  

 

{ 

 

if (!IsPostBack)

{

ds = GetDataSet(); 

 

this.RadGrid1.MasterTableView.Columns.Clear(); 

 

 

//Add Submit Id button to the Grid  

 

 

GridButtonColumn gridButtonColumn = new GridButtonColumn();  

RadGrid1.MasterTableView.Columns.Add(gridButtonColumn);

RadGrid1.MasterTableView.Columns.Add(

 

new GridButtonColumn());

 

gridButtonColumn.UniqueName =

"SubmitId";  

 

 

gridButtonColumn.DataTextField =

"SubmitId";  

 

 

gridButtonColumn.HeaderText =

"SubmitId";  

 

 

gridButtonColumn.DataType =

typeof(int);  

 

 

gridButtonColumn.SortExpression =

"SubmitId";  

 

 

gridButtonColumn.ShowSortIcon =

true;  

 

 

gridButtonColumn.CommandArgument = ds.Tables[0].Columns[

"SubmitId"].ToString();

 

 

 

gridButtonColumn.CommandName =

"processForm";  

 

 

 

 

foreach (DataColumn dataColumn in ds.Tables[0].Columns)

{

 

RadGrid.

MyCustomFilteringColumnCS gridColumn = new RadGrid.MyCustomFilteringColumnCS();  

 

 

 

 

this.RadGrid1.MasterTableView.Columns.Add(gridColumn);

 

gridColumn.DataField = dataColumn.ColumnName;

gridColumn.HeaderText = dataColumn.ColumnName;

}

}

}

 

 

catch (Exception ex)

{

lblMessage.Text =

"PageLoad() " + ex.Message;  

 

 

}

}

 

protected

void RadGrid1_ItemCommand(object source, Telerik.WebControls.GridCommandEventArgs e)  

 

 

{ 

 

try  

 

{ 

 

switch (e.CommandName)

{ 

 

case "Filter":

{ 

 

foreach (GridColumn column in e.Item.OwnerTableView.Columns)

{

column.CurrentFilterValue =

string.Empty;  

 

 

column.CurrentFilterFunction =

GridKnownFunction.NoFilter;  

 

 

} 

 

break;  

}

 

 

case "processForm":

{

// e.CommandArgument returns "SubmitId"
// But does not get the value for SubmitId from the DataSet

 

 

break;

}

 

 

default:  

 

break;  

}

}

 

 

catch (Exception ex)  

{

lblMessage.Text =

"RadGrid1_ItemCommand() " + ex.Message;  

 

 

}

}

 

 

 

Saqib
Top achievements
Rank 1
 answered on 22 Jun 2009
1 answer
102 views
I am trying to write an application which dynamically adds a tab to a tab strip and a pageview to the multipage and at the same time adds a control to the multi page (my current example uses a button).

I am sucessfully doing all this apart from I have an issue with my code whic is as follows:

when i create the tab and add the button it adds fine but when i press the button the control dissapears from the multipage 

any ideas?

 <asp:Button ID="Button3" runat="server" Text="Button" onclick="Button3_Click" /> 
         
         
         
        <telerik:RadTabStrip ID="ReportTabs" runat="server" SelectedIndex="0" MultiPageID="ReportMultipage">  
            <Tabs> 
                <telerik:RadTab runat="server"  Selected="True" Text="Chart" PageViewID="ReportChartPage">  
                </telerik:RadTab> 
                <telerik:RadTab runat="server" Text="Root RadTab2" PageViewID="RadPageView1">  
                </telerik:RadTab> 
            </Tabs> 
        </telerik:RadTabStrip> 
          
        <telerik:RadMultiPage ID="ReportMultipage" runat="server"  OnPageViewCreated ="RadMultiPage1_PageViewCreated" > 
              
            <telerik:RadPageView ID="ReportChartPage" runat="server" Selected="true" > 
                  
                <asp:Button ID="Button1" runat="server" Text="Button" /> 
                  </telerik:RadPageView> 
                   
                  <telerik:RadPageView ID="RadPageView1" runat="server" > 
                <asp:Button ID="Button2" runat="server" Text="Button2" /> 
                  </telerik:RadPageView> 
                    
        </telerik:RadMultiPage> 


        protected void Button3_Click(object sender, EventArgs e)  
        {  
            Guid gu = new Guid();  
            gu = System.Guid.NewGuid();  
 
            RadPageView page = new RadPageView();  
            page.ID = "Page" + gu.ToString();  
 
 
            Button but = new Button();  
            but.Text = gu.ToString();  
            but.ID = "button" + gu.ToString();  
            page.Controls.Add(but);  
 
            ReportMultipage.PageViews.Add(page);  
 
            RadTab tab = new RadTab();  
            tab.Text = gu.ToString();  
            tab.PageViewID = "Page" + gu.ToString();  
 
 
            ReportTabs.Tabs.Add(tab);  
 
            ReportMultipage.SelectedIndex = 0;  
 
 
 
 
        } 
 
Paul
Telerik team
 answered on 22 Jun 2009
8 answers
217 views
Hi,

I would like to add a custom button to title bar and, associate a RadMenu to this button. I have read some threads about adding custom buttons to title bar, and attaching events but couldn't figured out how to add RadMenu. Is this possible?
Any help will be greatly appreciated.
Georgi Tunev
Telerik team
 answered on 22 Jun 2009
1 answer
89 views
Hi All,

I have two question which may or may not related.

1) how to show loading panel on an image when the page is initially loaded?
2) how to show loading panel on each item( image) in a radcontrol rotator?

TIA

Jerry 
Shinu
Top achievements
Rank 2
 answered on 22 Jun 2009
1 answer
158 views
Hi

I have created a really basic page with a panel that contains some content and a dynamically created link button. When the link button is clicked the panel is updated. The update is supposed to be done by a partial postback using the radajaxmanager but, for reasons I don't understand, every other time the link button is clicked a full postback is performed rather than a partial postback. In other words i get one partial postback then one full postback and so on.

I have reduced the page to its bare bones below. Please can you tell me how I fix this.

<%

@ Register Assembly="AspMapNET" Namespace="AspMap.Web" TagPrefix="cc1" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<!

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

 

html xmlns="http://www.w3.org/1999/xhtml" >

 

<

 

head runat="server">

 

 

<title>Untitled Page</title>

 

 

</

 

head>

 

<

 

body>

 

 

<form id="form1" runat="server">

 

 

 

<asp:ScriptManager ID="ScriptManager1" runat="server">

 

 

</asp:ScriptManager>

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

</telerik:RadAjaxManager>

 

 

&nbsp;

 

 

<asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">

 

 

<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>

 

 

<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

 

 

</asp:Panel>

 

 

 

 

 

</form>

 

</

 

body>

 

</

 

html>


 

Partial

 

Class Default2

 

 

Inherits System.Web.UI.Page

 

 

 

 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

 

 

 

Dim l As New LinkButton

 

l.Text =

"link button"

 

 

 

 

 

AddHandler l.Click, AddressOf LinkButton_Click

 

PlaceHolder1.Controls.Add(l)

RadAjaxManager1.AjaxSettings.AddAjaxSetting(l, Panel1)

 

 

End Sub

 

 

 

 

 

Protected Sub LinkButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)

 

Label1.Text = Now()

 

End Sub

 

End

 

Class

 

Nikolay Rusev
Telerik team
 answered on 22 Jun 2009
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?