Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
121 views
Dear Telerik Team, 

I have created a template column in RadGrid (code attached) . Now I want to insert constant data in this template column from server side.  Also I want to reuse this column multiple times... Please answer if it is possible ? Following are description of the problems

Like in this grid I have created table, now I want to insert data in the column of that table. I have no SQL data base to bind with... is there a way to insert data in this table from server side. How I can access the columns and rows of that inner table. 

2nd thing is I want to use this entire structure (template column) in each column of the grid. and number of columns of grid are unknown say I need to repeat this structure to unknown number of times.

Abdul Ahad 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="extrapage.aspx.cs" Inherits="ERM.Sales_Mix.extrapage" %>
 
<%@ 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">
 
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
        <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None">
<MasterTableView>
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
 
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridTemplateColumn UniqueName="TemplateColumn">
            <ItemTemplate>
                <table ID="Table_01" border="0" cellpadding="0" cellspacing="0" width="400">
                    <tr>
                        <td align="center" background="images/TABLE_01.gif" colspan="5" height="29">
                            <font color="#FFFFFF" face="Arial" size="+1">Month Title</font></td>
                    </tr>
                    <tr>
                        <td background="images/TABLE_02.gif" height="27" width="156">
                        </td>
                        <td background="images/TABLE_03.gif" height="27" width="62">
                        </td>
                        <td background="images/TABLE_04.gif" height="27" width="60">
                        </td>
                        <td background="images/TABLE_05.gif" height="27" width="62">
                        </td>
                        <td background="images/TABLE_06.gif" height="27" width="60">
                        </td>
                    </tr>
                    <tr>
                        <td height="19" width="156">
                        </td>
                        <td height="19" width="62">
                        </td>
                        <td height="19" width="60">
                        </td>
                        <td height="19" width="62">
                        </td>
                        <td height="19" width="60">
                        </td>
                    </tr>
                    <tr>
                        <td colspan="5" height="19" width="60">
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
    </Columns>
</MasterTableView>
        </telerik:RadGrid>
    </div>
    </form>
 
</body>
</html>
 
Johny
Top achievements
Rank 1
 answered on 23 Feb 2011
1 answer
511 views
I'd like to make the background fill color of RadButtons different colors from the color set by the style.  Can that be done through code at runtime?
Bozhidar
Telerik team
 answered on 23 Feb 2011
9 answers
235 views
Hi,

Am trying to call a popup page of my own when appointment on radschduler is clicked.
I cannot give ReadOnly=false as I need to use <AdvancedInsertTemplate> too.
I am calling my popup in this manner:

 

 

protected void rsPeopleScheduler_OnAppointmentClick(object sender, Telerik.Web.UI.SchedulerEventArgs e){

 

 

try

 

 

 

 

{

 

//Response.Redirect("default.aspx?apptid=" + e.Appointment.ID);

 

 

 

 

 

string popupfrm = @"window.showModalDialog('PeopleJobDetails.aspx'

 

,''

,'dialogWidth:1500px; dialogHeight:700px; center:yes');"

 

;

 

 

RadScriptManager.RegisterClientScriptBlock(this,

 

 

this.GetType(),

 

 

"OpenPopupPeopleJobDetails",

 

popupfrm,

 

true);

 

}

 

catch (Exception ex)

 

{ }

 

finally { }

 

}

Its coming out fine but when I try to close the popup window:

 

 

RadScriptManager.RegisterClientScriptBlock(this,

 

 

this.GetType(),

 

 

"Close_Window",

 

 

"window.close();",

 

 

true);

 

It goes back radScheduler but with a appointment edit window open on the scheduler.

May I know how I can avoid that window?

Suja
Top achievements
Rank 1
 answered on 23 Feb 2011
7 answers
127 views
I am currently using a trial version of the Telerik RadControls for ASP.NET AJAX.

I have created a grid and I am using a usercontrol to display my edit form for the grid.

Editing records in the grid works fine, using the following code...

protected void SectionGrid_UpdateCommand(object source, GridCommandEventArgs e)
{
   UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);
   ...
   ...

However, I am getting problems when I try to create a new record in the database, using the following code:

protected void SectionGrid_InsertCommand(object source, GridCommandEventArgs e)
{
    UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);
    ...
    ...

In this second case, userControl always evaluates as NULL.

Can anyone see what I'm doing wrong?

Matt.
Matt
Top achievements
Rank 1
 answered on 23 Feb 2011
1 answer
88 views

Hello.
I need to use a popup window. In the popup window will have two buttons.
After pressing need to hide the popup window using C # and store the value.

Shinu
Top achievements
Rank 2
 answered on 23 Feb 2011
3 answers
173 views
Hi

I need to use file explorer just to display all the folders and subfolders(view all the pdf's in the folders or files). How can i do that . Can you please guide me. I went through the demos but those are not working for me.


Thanks,
Deepika
Dobromir
Telerik team
 answered on 23 Feb 2011
3 answers
649 views
This is the first I have run into this.  Is there a way to turn the behavior off?  Grid is populated with needdatasource event.

If a column name in my datatable is "SuperMan", the column header in the grid is displayed as "Super Man" (note the space in front of "M").  If the column name in my database is  "superman" then the column header in the grid is "superman".  Is there some option where I can turn off renaming my column headers?  We capitalize for readability, but need the names to stay in tact so users can do excel lookups.

This particular page returns a variety of different datatables with different formats, most approx 50 columns wide so my preference is to not build lots of pages with predefined column headers to work around this.

Thanks!

-Joel
<telerik:RadGrid ID="rgExport" runat="server" Skin="WebBlue" AllowPaging="true" PageSize="20">
</telerik:RadGrid>
Marin
Telerik team
 answered on 23 Feb 2011
1 answer
245 views
Hi,
how to make a column value/item clickable and when column value/item clicked open up a new ajax panel in same web page?

Scanario:
  1. A radgrid will be loaded with data and visualized in AjaxPanel1¨
  2. Then user clicks a column value/item (ID) for having more information about this row item/value
  3. Then more detailed information about clicked row item/value should be loaded and visualized in AjaxPanel2

All tips/advices for a solution (code) are highly appreciated. I will load data in step 2 and 3 with sql queries. Links to demos and examples are also highly appreciated.

I would prefer to trigger an event when click the column value/item and have the instructions (=code) for action in code behind file. I will also have the column value/item as a link button because in some cases I want two different columns in radgrid that trigger different actions.

Thx in advance! 

Princy
Top achievements
Rank 2
 answered on 23 Feb 2011
3 answers
70 views
Hi,

In Telerik Rad Scheduler, when a users wants to schedule an appointment, he is allowed to do only once. He has to be disabled from entering again. He can re-schedule again after deleting the first one.
I used the code :
function OnClientAppointmentInserting(sender, agrs) {
               if (sender.get_appointments().get_count() >= 1) 
             {
           agrs.set_cancel(true);
           alert("Sorry..!Only One appointment is allowed. To Re-Schedule, delete ur first appointment and Schedule again");
       }
   }
But, if another user logs into the scheduler, he too is unable to add if there is one schedule already present and his clicks are disabled.
I want this method to be applied separately for each user. It means one user one click on scheduler. Another user one clcik on scheduler irrespective of other schedules present.


Veronica
Telerik team
 answered on 23 Feb 2011
3 answers
121 views
hello everybody

i read this advanced topic of making Multiple Chart Types in a Single Chart

and in my situation i combine pie chart and line chart and i need to position pie chart on a specific location on the chart

how can i do that ??
Evgenia
Telerik team
 answered on 23 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?