Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
139 views
I am trying to export a grid with a parent and 2 children to excel.  This is inside a SharePoint web part.  I have used your examples as a starting place.  Here is the relavent code, I think.

 

protected override void OnInit(EventArgs e)

 

{

 

base.OnInit(e);

 

Page.ClientScript.RegisterStartupScript(

typeof(ParentChildGrid), this.ID, "_spOriginalFormAction = document.forms[0].action;_spSuppressFormOnSubmitWrapper=true;", true);

 

 

if (this.Page.Form != null)

 

{

 

string formOnSubmitAtt = this.Page.Form.Attributes["onsubmit"];

 

 

if (!string.IsNullOrEmpty(formOnSubmitAtt) && formOnSubmitAtt == "return _spFormOnSubmitWrapper();")

 

{

 

this.Page.Form.Attributes["onsubmit"] = "_spFormOnSubmitWrapper();";

 

}

}

 

ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);

 

 

if (scriptManager == null)

 

{

scriptManager =

new RadScriptManager();

 

 

this.Page.Form.Controls.AddAt(0, scriptManager);

 

}

}

 

 

protected override void OnLoad(EventArgs e)

 

{

 

if (!_error)

 

{

 

try

 

{

 

base.OnLoad(e);

 

 

this.EnsureChildControls();

 

 

base.OnLoad(e);

 

 

if (_ParentList != null)

 

{

 

if (_ParentList != "")

 

{

 

RadAjaxPanel panel = new RadAjaxPanel();

 

panel.ID =

"Panel1";

 

 

this.Controls.Add(panel);

 

oGrid =

new RadGrid();

 

DefineComplexGrid();

 

//DefineSimpleMasterDetail();

 

cmdExport.Click +=

new EventHandler(cmdExport_Click);

 

cmdExport.Text =

"Export";

 

 

panel.Controls.Add(oGrid);

 

RadAjaxManager ajaxManager = RadAjaxManager.GetCurrent(this.Page);

 

 

if (ajaxManager == null)

 

{

ajaxManager =

new RadAjaxManager();

 

ajaxManager.ID =

"RadAjaxManager1";

 

Controls.Add(ajaxManager);

 

this.Page.Items.Add(typeof(RadAjaxManager), ajaxManager);

 

}

ajaxManager.AjaxSettings.AddAjaxSetting(oGrid, panel);

 

this.Controls.Add(cmdExport);

 

}

}

}

 

catch (Exception ex)

 

{

HandleException(ex);

}

}

}

 

 

void cmdExport_Click(object sender, EventArgs e)

 

{

oGrid.ExportSettings.ExportOnlyData =

true;

 

oGrid.ExportSettings.IgnorePaging =

true;

 

 

foreach (GridItem item in oGrid.MasterTableView.Items)

 

item.Expanded =

true;

 

oGrid.MasterTableView.ExportToExcel();

}

 



Any help you can give would be a big help, I am behind on a deadline.

Thanks,

John

Sebastian
Telerik team
 answered on 24 Jul 2009
2 answers
179 views
Hi,

I'm using RAD Grid Controls for Ajax Q1 2009 version. I need to get the column values of the currently expanding row in the "DetailTableDataBind" event of RAD Grid.

something like: SelectedRow.Column[5].Text

protected void grd_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e)
{
????????
}

Please help me out to make the things easier.

Thanks in advance
Viswa
Viswanathan
Top achievements
Rank 1
 answered on 24 Jul 2009
1 answer
145 views
Hi,

I'm new in Telerik Radcontrols.
Currently i'm using the Telerik Rad Calendar for ASP.NET AJAX in version 2009.1 311.
So far the control met my expectations but now I' faced with a new issue.
I want to change the view to always display one week only. Changing the SingleViewRows property doesn't work, because clicking on the navigation icons always navigates in month steps and not as desired to the previous or following week.

I also found an expample in code library but this is implemented for the old version. (Link)
Using the new version of the calendar control i currently have no real idea how to get this done.

I really appreciate any hints you could give me to get this done.

kind regards!

Iana Tsolova
Telerik team
 answered on 24 Jul 2009
2 answers
264 views
Hi,

I have to wrap the text in my radgrid. i have tried out all types of wrap and setting width i.e in footer, header and itemstyle. Why Itemstyle-wrap is not working/

Regards,
Medac
Princy
Top achievements
Rank 2
 answered on 24 Jul 2009
1 answer
103 views
I'm utilizing the RadTreeView control to display hierarchical data and one of my requirements is that a node can be a child of more than one parent.

Sample data from the dB would be something like:

ID    ParentID    Description
1      NULL          Parent
2      1                 ChildA
3      1                 ChildB
3      2                 ChildB

So ChildB is both child of ChildA and Parent.  When I attempt to bind the TreeView to my dataSource, I get the following error:  "These columns don't currently have unique values."

Is there a way I can utilize the TreeView w/ the set of data above?


Yana
Telerik team
 answered on 24 Jul 2009
5 answers
158 views
Hello there,

i've got a question about the tag generator functionality in the rad editor.
If I edit one Wiki-Page with the standard editor from Microsoft, the standard editor creates a Div-Container surrounding the Wiki-content.

Example:
<Div class=ExternalClassXYZ....>
  Content….
</Div>




If I edit one Wiki-Page with the Rad-Editor, the editor creates after every edit one additional Div-Container

Example:

<Div class=ExternalClass4thEdit....>
 <Div class=ExternalClass3rdEdit....>
  <Div class=ExternalClass2ndEdit....>
   <Div class=ExternalClass1stEdit....>
        Content….
   </Div>
  </Div>
 </Div>
</Div>

Why creates the Rad-Editor after every edit these DIV-Containers?
What are the DIV-Containers for?

Stanimir
Telerik team
 answered on 24 Jul 2009
1 answer
154 views
Hello,

I have a problem with the radgrid selection option. I can't find anything related to what i want or better said i dont know on what i have to search for. I want to fill a radgrid with a list of items from the database. One of the columns says if the row is obligated or not.

What i want to build in my RadGrid, is the possibility to select the rows, but when the row is obligated it is already selected and it cannot be undone by the user. This to make sure i get the full list of items back into another table in the database.

Anyone knows what i have to search for?

Thanks a lot in advance.
Shinu
Top achievements
Rank 2
 answered on 24 Jul 2009
1 answer
180 views
Hi,

I would like to have a conditional hyperlink, so that a hyperlink only shows if the value of CntNonMailable is not equal to 'N/A'. Is this possible?

I have a radgrid with the following Hyperlink column:

                <telerik:GridHyperLinkColumn DataTextFormatString="{0}"
                        DataNavigateUrlFields="ListID" UniqueName="CntNonMailable"
                         DataNavigateUrlFormatString="GetRejectedReport.aspx?ListID={0}"
                        HeaderText="Non Mailable" DataTextField="CntNonMailable">
                         <HeaderStyle Width="63px"></HeaderStyle>
                    </telerik:GridHyperLinkColumn>

Any help would be much appreciated.

thanks
David


Shinu
Top achievements
Rank 2
 answered on 24 Jul 2009
1 answer
108 views
Hey all,

I have created a new rad menu skin based on the default skin as per the examples.  Everything is looking the way i want it except for child background.

If you look very carefullly you can see it goes from a very light grey to white, I have specifed it to be white in all styles and i cannot work out where this greyish background colour is coming from.

http://development.lateralline.co.uk/cbfootball2009/news.aspx

Can anyone spot the problem?

Regards,

SMD
Yana
Telerik team
 answered on 24 Jul 2009
1 answer
51 views
hi all,

how can i show same date in dayview when clicking the day in monthview.

thanks
Shinu
Top achievements
Rank 2
 answered on 24 Jul 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?