Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
91 views
Hi,

I need help...

this is my code in aspx:

        <telerik:RadMenu ID="RadMenu1" runat="server">
            <Items>
                <telerik:RadMenuItem>
                    <ItemTemplate>
                        <b>Skin:</b>
                        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Hay" ShowChooser="True">
                        </telerik:RadSkinManager>
                    </ItemTemplate>
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>

i need take the value into in RadSkinManager1.Skin...

I try this code into CS;
        Session["skinid"] = ((RadSkinManager)RadMenu1.FindControl("RadSkinManager1")).Skin;

Object reference not set to an instance of an object.


But dont't work, if i run CTRL+F5 in my screen show...

Line 13: 		{
Line 14: 			RadSkinManager skin = (RadSkinManager)RadMenu1.Controls[0].FindControl("RadSkinManager1"); 		    
Line 15: 			Session["skinid"] = skin.Skin;
Line 16: 		}
Line 17: 		void Page_PreRender(object sender, EventArgs e)



My question is ?

How get de value (Skin) the component RadSkinManager, but this component into in ITEMTAMPLATE for radmenu...


tanks and best regards







Paul
Telerik team
 answered on 13 Aug 2009
1 answer
133 views
Hi,

I am creating demo page with RadGrid in comparison with Intersoft WebGrid and i am trying to find best approach to bind grid with best performance. I have following requirements:

1. Need to create column dynamically.
2. Paging, Sorting, filtering (Optional  as can't compomise with performance), cell editing.
3. drowpdown column in edit mode.(How to achieve this in dynamic binding plz provide any link).
4. Excel/Pdf/cvs download
5. Culture support.

please suggest me whether to use NeedDataSource to bind grid on each post back with disabled viewstate or create grid on page_Init or any other approach?

Also this line is not working when using NeedDataSource for creating/binding dynamic column. 

RadGrid1.MasterTableView.EditMode =

GridEditMode.InPlace;

Regards
Devanand Jha

 

Mira
Telerik team
 answered on 13 Aug 2009
1 answer
218 views
Hi All

We are using the below dll in our .Net 2.0 application .
> RadComboBox.dll
> RadTreeView.DLL

The application is running properly on 32 bit server but while we migrate on 64 bit server we are getting the below error

"is not a valid Win32 application. (Exception from HRESULT: 0x800700C1) "

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.BadImageFormatException: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)


when we remove the above dlls from the bin folder of the application the application works fine , but we are using rad tree on few aspx pages and require RadTreeView.DLL . Can we have the 64 bit version of the dll ?

Kindly provide us suggestion for the same.

Thanks
Prakash Ghatage
Veselin Vasilev
Telerik team
 answered on 13 Aug 2009
2 answers
369 views
Hello,

I have a RAD Grid within an asp panel and I am setting the panel's visibility to false. I binding data to this grid and then doing an export to excel on button click event. Since the panel's visibility is set to false the data for the column is exported and the column name does not appear. If I set the panel's visibility to true I can both data and the column name in the excel. This is my code hope somebody can help me on this:
ASPX code:
<asp:Panel ID="pnlGridDisplay" runat="server" Visible="false">           
            <telerik:RadGrid runat="server" ID="rgGrid" GridLines="None" AllowSorting="true" AllowPaging="false"
                AllowFilteringByColumn="false" PageSize="30" AutoGenerateColumns="false" ShowGroupPanel="true" ShowFooter="false"
                Width="200">
                <MasterTableView DataKeyNames="GradID">
                    <Columns>
                        <telerik:GridBoundColumn HeaderText="ID" DataField="ID" UniqueName="ID" Visible="false"/>
                        <telerik:GridBoundColumn HeaderText="Email" DataField="Email" SortExpression="Email" UniqueName="Email"/>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
        </asp:Panel>       

C# code:
 protected void btnExportRegistered_Click(object sender, EventArgs e)
        {
            rgGrid.DataSource = ds;
            rgGrid.DataBind();
            rgGrid.GridLines = GridLines.Both;
            rgGrid.ExportSettings.IgnorePaging = true;
            rgGrid.ExportSettings.ExportOnlyData = true;
            rgGrid.ExportSettings.OpenInNewWindow = true;
            rgGrid.MasterTableView.ExportToExcel();
        }   

So I get the excel file with bunch of email address's but no column name.
thecruciable
Top achievements
Rank 1
 answered on 13 Aug 2009
1 answer
94 views
I'm trying to hook up an ObjectDataSource to a RadGrid, and I get the following error msg:

ObjectDataSource 'ObjKenneler' could not find a non-generic method 'UpdateKennel' that has parameters: KennelID, Telefon, Hjemmeside, Bynavn, Email, Vejnavn, Region, EjerFornavn, EjerEfternavn, Postnummer, Beskrivelse, Kennelnavn.


In my Application, I have a Business Layer (BLL) and a Data Layer (DAL), and my Update method takes a fully populated object as a parameter, and not, as the error suggests, all the properties in a parameter list.

How can I configure the grid/ODS to pass an object to my BLL/DAL methods, instead of the properties one by one?


Nikolay Rusev
Telerik team
 answered on 13 Aug 2009
4 answers
150 views
How can I reference to a TextBox inside an EditFormTemplate in Page_Load (if IsPostBack = true) after editing an item in the EditFormTemplate?
Roy Halvorsen
Top achievements
Rank 1
 answered on 13 Aug 2009
4 answers
330 views
Greetings,

I have a checkboxlist on a page to which I am trying to add tooltips to.  I finally managed to find some code that placed them onto it during the load of the page, but whenever I do a postback, they will not return, no matter what I seem to do to them.  Here is the code for what I'm doing.

//I cut out part of the code that does other things, but this is basically the same  
protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!IsPostBack)  
                //CoP is just a Session variable that is pulled into a property  
                LoadValues(CoP);  
 
            LoadTooltips();  
        }  
 
//Called after checkboxlist is built  
private void LoadTooltips()  
        {  
            foreach (ListItem li in cblModules.Items)  
            {  
                var moduleHit = (from a in CoP.Modules where a.ModuleID == Int32.Parse(li.Value) select a.Description).FirstOrDefault();  
 
                if (!string.IsNullOrEmpty(moduleHit))  
                    ToolTipify(li, moduleHit);  
            }  
        } 

When the OnSelectedIndexChanged event is fired, LoadTooltips is called at the end to rebuild the Tooltips for the cblModules.  Unfortunately, nothing happens.  Here is the code I use to build the Tooltips if it helps.

private void ToolTipify(ListItem li, string description)  
        {  
            ContentPlaceHolder con = (ContentPlaceHolder)Master.Master.FindControl("cphContent2");  
            ContentPlaceHolder con1 = (ContentPlaceHolder)con.FindControl("cphCCMContent");  
            RadToolTip tip = new RadToolTip();  
 
            li.Attributes.Add("ID", Guid.NewGuid().ToString());  
              
            tip.RelativeTo = ToolTipRelativeDisplay.Element;  
            tip.Text = description;  
            tip.TargetControlID = li.Attributes["ID"];  
            tip.IsClientID = true;  
            con1.Controls.Add(tip);  
        } 

Again, it works on the first time through, when there is no Postback, but when I cause a Postback (clicking on cblModules), the tooltips vanish.  If anyone has any ideas or a better solution, I'd be very appreciative.

~Chad Johnson
Chad Johnson
Top achievements
Rank 1
 answered on 13 Aug 2009
2 answers
143 views
Hy i have a rad grid, which im using a RadMenu as a context menu with it. All works fine.

The Radmenu Command calls the method "OpenFile(int id)" in the code behind file to as u correctly guess should opens a already on the server stored file in a file stream to the client.

Heres the method:

private void OpenFile(int id) 
        { 
            try 
            { 
                Document doc = BLDocument.GetDocument(id); 
 
                if (File.Exists(doc.Metainformation.filepath)) 
                { 
                    // Create New instance of FileInfo class to get the properties of the file being downloaded 
                    FileInfo file = new FileInfo(doc.Metainformation.filepath); 
  
                    // Clear the content of the response 
                    Response.ClearContent(); 
 
                    // LINE1: Add the file name and attachment, which will force the open/cance/save dialog to show, to the header 
                    Response.AddHeader("Content-Disposition""attachment; filename=" + file.Name); 
 
                    // Add the file size into the response header 
                    Response.AddHeader("Content-Length", file.Length.ToString()); 
 
                    // Set the ContentType 
                    Response.ContentType = ReturnExtension(file.Extension.ToLower()); 
 
                    // Write the file into the response (TransmitFile is for ASP.NET 2.0. In ASP.NET 1.1 you have to use WriteFile instead) 
                    Response.TransmitFile(file.FullName); 
 
                    // End the response 
                    Response.End(); 
                } 
            } 
            catch (Exception ex) 
            { 
 
            } 
        } 

After i reach the Reespnse.End(); line i get following exception:

((System.Threading.ThreadAbortException)(ex)):


{Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.}

Is there any propertie i have to set to be able to give my user the file / filestream ?
Or what can i do to make it work properly?

thx mario
Mario
Top achievements
Rank 2
 answered on 13 Aug 2009
1 answer
170 views
<style type="text/css">
    .FontBlack
    {
        color: black !important;
    }
</style>

<telerik:RadTreeView ID="RadTreeView1" runat="server" Skin="Vista">
<telerik:RadTreeNode Text="a" Enabled="false" DisabledCssClass="FontBlack" >
                                                                    </telerik:RadTreeNode>

I want to display this node with Black font.

Thanks,
Vincent
Shinu
Top achievements
Rank 2
 answered on 13 Aug 2009
6 answers
138 views
Hi
I have a composite control which contains a DateTimePicker control and other child controls.  The composite control is in a visual studio solution which has a class project (for generating the dll of my composit controls) and a web site (for testing the dll).  I can run the composite control in the testing web site.  However, when I include the dll in my other projects, I got the javascript error 

'this.Slots.Month' is null or not an object

when a date or time is selected in the pop up calendar.  In debug mode, it stopped in

parseDate:function(_fe,_ff){
try{
var _100=new Telerik.Web.UI.DateParsing.DateTimeLexer(this.get_dateFormatInfo());
var _101=_100.GetTokens(_fe);
var _102=new Telerik.Web.UI.DateParsing.DateTimeParser(this.get_dateFormatInfo().TimeInputOnly);
var _103=_102.Parse(_101);
_ff=this._getParsingBaseDate(_ff);
var date=_103.Evaluate(_ff,this.get_dateFormatInfo());
return date;
<====== stopped here
catch(parseError){
if(parseError.isDateParseException){
return null;
}else{
throw parseError;
}
}
}

I have no clue about what caused the error.  Your help is much appreciated.

Edwin
Ayaz Anwar
Top achievements
Rank 1
 answered on 13 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?