Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
106 views
I have the following radGrid on a form.  I need to fire the selectedIndexchanged event in codebehind to open a window, what am I missing?
<telerik:RadGrid runat="server" AllowPaging="True" PageSize="3" ShowFooter="True" DataSourceID="SqlDataSource1" Skin="Office2007" CellSpacing="0" GridLines="None" Height="350px" Width="260px" ID="RadGrid1" ViewStateMode="Enabled">
            <ClientSettings AllowColumnsReorder="True" EnablePostBackOnRowClick="True" ReorderColumnsOnClient="True">
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
            <MasterTableView DataKeyNames="ID" DataSourceID="SqlDataSource1" AutoGenerateColumns="False" ShowHeader="False">
                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
                <RowIndicatorColumn Visible="False" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
 
                <ExpandCollapseColumn Visible="False" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="url" HeaderText="url" SortExpression="url" Visible="False" UniqueName="url" FilterControlAltText="Filter url column"></telerik:GridBoundColumn>
                    <telerik:GridImageColumn DataImageUrlFields="urlImage" ImageWidth="" ImageHeight="" HeaderText="urlImage" SortExpression="urlImage" UniqueName="urlImage" FilterControlAltText="Filter urlImage column"></telerik:GridImageColumn>
                    <telerik:GridBoundColumn DataField="description" HeaderText="description" SortExpression="description" UniqueName="description" FilterControlAltText="Filter description column">
                        <ItemStyle Font-Size="11pt"></ItemStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ID" ReadOnly="True" HeaderText="ID" SortExpression="ID" Visible="False" UniqueName="ID" DataType="System.Int32" FilterControlAltText="Filter ID column"></telerik:GridBoundColumn>
                </Columns>
 
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                </EditFormSettings>
 
                <PagerStyle Mode="NumericPages" AlwaysVisible="True"></PagerStyle>
            </MasterTableView>
 
            <FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>

CodeBehind
Private Sub RadGrid1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RadGrid1.SelectedIndexChanged
    Dim newwindow As New Telerik.Web.UI.RadWindow()
    newwindow.ID = "RadWindow1"
    newwindow.NavigateUrl = "http://www.google.com"
    newwindow.VisibleOnPageLoad = True
    RadWindowManager1.Windows.Add(newwindow)
End Sub
Eyup
Telerik team
 answered on 25 Sep 2012
8 answers
315 views
Good afternoon guys,

Before I export my grid to excel I have following logic:

Telerik.Web.UI.GridExcelBuilder.

 

RowElement row = new Telerik.Web.UI.GridExcelBuilder.RowElement();

 

Telerik.Web.UI.GridExcelBuilder.

 

CellElement cell = new Telerik.Web.UI.GridExcelBuilder.CellElement();

 

cell.Data.DataItem =

 

"NYC";

 

cell.StyleValue =

 

"MyHeaderStyle";

 

cell.MergeAcross = e.Row.Cells.Count - 1;

row.Cells.Add(cell);

e.Worksheet.Table.Rows.Insert(0, row);

And then I style this header:

 

Telerik.Web.UI.GridExcelBuilder.

 

StyleElement myStyleH = new Telerik.Web.UI.GridExcelBuilder.StyleElement("MyHeaderStyle");

 

myStyleH.FontStyle.Size = 25;

myStyleH.FontStyle.Bold =

 

true;

 

System.Drawing.

 

Color col = System.Drawing.ColorTranslator.FromHtml("#2C78FF");

 

myStyleH.FontStyle.Color = col;

 

 

 

 

myStyleH.AlignmentElement.HorizontalAlignment = Telerik.Web.UI.GridExcelBuilder.

 

HorizontalAlignmentType.Center;

 

e.Styles.Add(myStyleH);


My question is:I need colored "NYC" header like this:
"N" - with the green color
"Y" - with the orange color
"C" - with the blue color.
How can I do that?

Thanks so much for your help.
 

Vitaly
Top achievements
Rank 1
Iron
Iron
 answered on 25 Sep 2012
10 answers
284 views
Hello,

Since update 2012.2.607 we have a problem with our RadScheduler (before we had 2012.1.411).

We have 3 slots for appointments (ex: 08:00, 08:30, 09:00), since the update our appointments all show up in the first column, before they would show up in the correct time slot.

Thank you.

Tommy
Plamen
Telerik team
 answered on 25 Sep 2012
5 answers
262 views
Hi,
I am trying to use RadGrid as ListView layout and was able to follow the demo below to achieve the results.

Grid / ListView/DataList View:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/listview/defaultcs.aspx 

Now, I need to be able to use "Grouping" [using ContactTitle:] so that all the ListView items are shown under corresponding Grouping.
Is it possible and if so how?

Thanks for your help.
http://www.megasearches.com/ 
Tsvetina
Telerik team
 answered on 25 Sep 2012
2 answers
89 views
Hi,

I would like the RadDateTimePicker located in LayoutTemplate to fire InitInsert command.
The problem is, RadDateTimePicker does not have CommandName property (and CommandArguments), so the only way to do that would be to fire command from SelectedDateChanged.

I understand that RadListViewDataItem can use FireCommandEvent method, but how to get RadListViewDataItem when the RadListVIew is empty?

In other words, how to make the following to start working as intended above

protected void myDatePicker_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
        {
            RadListViewDataItem r = new RadListViewDataItem(myRadListView, 0);
            r.FireCommandEvent("InitInsert", String.Empty);
        }

Thanks,
Jacek

Jacek
Top achievements
Rank 1
 answered on 25 Sep 2012
1 answer
78 views
Hello,

1) Has there been any change in the autocorrect DatePicker?  Is there anyway to disable this functionnality?  If my client types in 2012-13-02 I don't want the date to become 2012-02-13 cause maybe he mistakenly wanted to type 2012-12-02.

2)When I type an invalid date like "qwerty", how can I keep the value in the datePicker after a postback.  The field does show an exclamation mark but I would like to handle the error myself.

Thank you!
Kostadin
Telerik team
 answered on 25 Sep 2012
1 answer
140 views
Hi,

I was able to create a custom theme using the visual style builder and save it as a  zip file into my asp.net project. How would I be able to use it in the project?

Could you provide the steps to follow?

Thanks.

G
Tsvetina
Telerik team
 answered on 25 Sep 2012
1 answer
109 views
Hello everyone,
I need some help.

I'm using the RadGrid Control like this demo with this googlelikefilter.  Now I want to be able to edit/insert/delete rows in the RadGrid.
If the EditMode is set to "EditForms" it's working perfect. But when I set the EditMode to "InPlace" the EditCommandColumn is not showing.
So I created an EditCommandColumn on  PageLoad. The problem is now that the events are not firing correctly; I always get an exception:

"Sys.WebForms.PageRequestManagerServerErrorException: An error occurred because a control with the ID ctl00 $ ContentPlaceHolder1 $ StundenRadGrid $ ctl00 $ ctl02 $ ctl04 $ Perform Insert Button could not be found, or because the same is assigned ID after postback another control. If the ID is not assigned, you should avoid this error, set the ID property of controls that cause postback events explicitly."


Can somebody help me please?
Thanks in advance,
Esmi
Eyup
Telerik team
 answered on 25 Sep 2012
3 answers
122 views
Hi there,
is there a server side event for these two arrow button, shown below in image.
If not, could you please provide an example of client side event in this case.

Thanks,

Slav
Telerik team
 answered on 25 Sep 2012
3 answers
926 views
Hello,

    I have recently been having some trouble with the the radControls for ASP.NET.
They were working fine and everything was ok until I randomly started getting this error on every page in my webapp.

The base class includes the field 'RadScriptManager1', but its type (Telerik.Web.UI.RadScriptManager) is not compatible with the type of control (Telerik.Web.UI.RadScriptManager).

i've gone as far as removing rad controls from the GAC, uninstalling and reinstalling them to no avail.


In the code view, there is no error for the scriptmanager, however the RadDatePicker shows an error that is the following

"Warning 1 C:\Projects\ProjectName\Secure\OrderHistory.aspx: ASP.NET runtime error: The base class includes the field 'BeginDate', but its type (Telerik.Web.UI.RadDatePicker) is not compatible with the type of control (Telerik.Web.UI.RadDatePicker). C:\Projects\ProjectNameSecure\OrderHistory.aspx 35 1 ProjectName


 

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">   
</telerik:RadScriptManager>   
<table cellpadding="5" cellspacing="0" border="0" align="center">   
<tr>   
<td>   
Begin Date  
</td>   
<td>   
End Date  
</td>   
<td colspan="2">  
&nbsp;  
</td>   
</tr>   
<tr>   
<td>   
<telerik:RadDatePicker ID="BeginDate" Runat="server"   
 Culture="English (United States)" Skin="Office2007">   
<Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" skin="Office2007"></Calendar>   
 <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>   
 <DateInput DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy"></DateInput>   
</telerik:RadDatePicker>   
</td>   
<td>   
<telerik:RadDatePicker ID="EndDate" Runat="server" Skin="Office2007">   
<Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" skin="Office2007"></Calendar>   
<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>   
<DateInput DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy"></DateInput>   
</telerik:RadDatePicker>   
</td>   
<td>   
<asp:Button ID="btnGo" runat="server" Text="Go!" onclick="btnGo_Click" />   
</td>   
<td>   
<asp:LinkButton ID="lnkShowAll" runat="server" onclick="lnkShowAll_Click">Show All</asp:LinkButton>   
</td>   
</tr>   
</table> 
 
 

Whats even more interesting is the fact that the production test of this website (which is online on our server) works with no problems.
I haven't changed anything with the references or done anything to the controls on the page. This project is under source control and even after I had gotten the restore for it, the problem persists.

Any insight would be greatly appreciated, thanks!

Joshua Smith

 

 

 

 

Maria Ilieva
Telerik team
 answered on 25 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?