Telerik Forums
UI for ASP.NET AJAX Forum
18 answers
1.0K+ views
Hi,  I have a dataset that has a column called bold that's a bit.   When it's true I want that row to be bold, otherwise not.  How can I do this in radgrid?  Thanks in advance
Casey
Top achievements
Rank 1
 answered on 25 Sep 2012
4 answers
134 views
I have a grid that I've added a custom CommandItemTemplate to.  The template contains (among other things) a link button with the CommandName of 'InitInsert'.  This button is working great for the purposes of adding new records to the grid.

My problem is that when my Add LinkButton is clicked the client side OnCommand event is not being fired.

Ideas on howto fix this?
Tracy Dryden
Top achievements
Rank 1
 answered on 25 Sep 2012
1 answer
132 views
Dear Friend I will add two Scanerio that will explain you the clear bugs that we have with rad Chart XAxis!
<telerik:RadChart ID="RadChart1" runat="server" DataSourceID="edsTotalStakesForEachShop"
    IntelligentLabelsEnabled="true">
    <Series>
        <telerik:ChartSeries Name="Series 2" DataXColumn="ShopId" DataYColumn="TotalStakes">
        </telerik:ChartSeries>
    </Series>
    <PlotArea>
        <XAxis AutoScale="False" DataLabelsColumn="Name" MaxValue="7" MinValue="1" Step="1"
          >
            <AxisLabel>
                <Appearance>
                </Appearance>
            </AxisLabel>
            <Appearance>
                <LabelAppearance RotationAngle="90">
                </LabelAppearance>
            </Appearance>
        </XAxis>
    </PlotArea>
</telerik:RadChart>

I am using above code and in this I add XAxis DataLabel Column when we use this it will show me result mention in screen shots A.

Now when we comment this XAxis check below code
<telerik:RadChart ID="RadChart1" runat="server" DataSourceID="edsTotalStakesForEachShop"
    IntelligentLabelsEnabled="true">
    <Series>
        <telerik:ChartSeries Name="Series 2" DataXColumn="ShopId" DataYColumn="TotalStakes">
        </telerik:ChartSeries>
    </Series>
    <PlotArea>
        <%--<XAxis AutoScale="False" DataLabelsColumn="Name" MaxValue="7" MinValue="1" Step="1"
          >
            <AxisLabel>
                <Appearance>
                </Appearance>
            </AxisLabel>
            <Appearance>
                <LabelAppearance RotationAngle="90">
                </LabelAppearance>
            </Appearance>
        </XAxis>--%>
    </PlotArea>
</telerik:RadChart>

It will show the result mention in Image B!

SO the problem is When we will use X Axis DataLable Column
1) It will hide the last series 
2) The Label got messup

Plesase suggest good ways to fix it!

Thanks
Petar Kirov
Telerik team
 answered on 25 Sep 2012
1 answer
221 views
Hi, I'm currently populating a list of bookings by expanding the taking all the appointments in my scheduler and putting it into a datatable.  However my issue is that I'm unable to retrieve the room_Id or in most causes we refer to it as resource_ID for my bookings.

Is there a way to call my Appointment object to retrieve the resource_Id assigned to the specific booking.

 DataTable tanning_Availiability = new DataTable();

            tanning_Availiability.Columns.Add("Subject");
            tanning_Availiability.Columns.Add("Start");
            tanning_Availiability.Columns.Add("End");
            tanning_Availiability.Columns.Add("room_Id");

            foreach (Appointment a in scTanning_Availiability.Appointments)
            {
                //Occurrences of a recurrence master are not generated untill they      
                //are within RadScheduler's visible range. This mandates the occurrences     
                //information to be extracted from the Master's recurrence rule as follows:     
                if (a.RecurrenceState == RecurrenceState.Master)
                {
                    RecurrenceRule parsedRule;
                    RecurrenceRule.TryParse(a.RecurrenceRule.ToString(), out parsedRule);

                    //If a recurring appointment does not have specified end time it will have     
                    //endless occurrences. In this case you can explicitly put a restriction:  
                    string Date = Request.QueryString["Date"];
                    DateTime ConvDate = Convert.ToDateTime(Date);

                    parsedRule.SetEffectiveRange(ConvDate, ConvDate.AddDays(1));

                    foreach (DateTime occurrence in parsedRule.Occurrences)
                    {
                        tanning_Availiability.Rows.Add(new string[] { a.Subject.ToString(), occurrence.AddHours(-6).ToString(), occurrence.Add(a.Duration).AddHours(-6).ToString(), a.Attributes.Keys.ToString() });
                    }
                }
                else //Get the rest of the appointments     

                    //If the SelectedDate of RadScheduler is set so that the visible range encompasses occurences of      
                    //a recurring appointement, these occurences will be generated now so they will be added once again     
                    //to the DataTable. To prevent this, we use the following check:     
                    if (a.RecurrenceState != RecurrenceState.Occurrence)
                    {
                        tanning_Availiability.Rows.Add(new string[] { a.Subject.ToString(), a.Start.AddHours(-6).ToString(), a.End.AddHours(-6).ToString(), a.Attributes.Keys.ToString() });
                    }
            }
Cat Cheshire
Top achievements
Rank 1
 answered on 25 Sep 2012
2 answers
182 views
I need to enter elasped time in the format hh:mm:ss

The RadTimePicker is almost perfect except it is designed for time of day, not elapsed time, its not correct how it looks and  behaves for elapsed time.

Using the Masked Text box as shown below is less than ideal, since unless the user completey enters the data correctly(never happens), it will generate an error on the server side.

Any Ideas?
<telerik:RadMaskedTextBox ID="sesTotalTime" Label="Total Time:" runat="server" Text="<%# Bind('sesTotalTimeFormatted') %>"
    ToolTip="Total Session Time (hh:mm:ss)" Mask="##:##:##">
</telerik:RadMaskedTextBox>



Bryan Kowalchuk
Top achievements
Rank 1
 answered on 25 Sep 2012
2 answers
140 views
Hi Team,
we have Telerick Q2 2010 license in our project. can we use the same license for chart control's. or do we require any other license.
Advance Thanking you.

Regards,
Mr.Perfect.
Vladi
Telerik team
 answered on 25 Sep 2012
2 answers
223 views
Hello, I am hoping that someone can come to my rescue with this issue.  I have been tearing my hair out and just cannot figure out a solution....  I want a ListView that displays images stored in SQL.  I have a Stored Procedure that returns the data, including a Thumbnail Image that should be displayed.  The data type of the Thumbnail Image is varbinary(MAX).  Locally, it works perfectly.  However, once I publish to the server, it doesn't.  I have three items to display, each with a picture.  The first time, the page loads, it will display image 1, but not image 2 and 3.  If I click Refresh, it will display Image 2 and 3, but not Image 1.  If I click Refresh again, it will display Image 2, but not Image 1 and 3, etc, etc, etc.  I used the code found here:  http://demos.telerik.com/aspnet-ajax/binaryimage/examples/default/defaultvb.aspx?product=listview to create my page.  I even created a blank page, no master page, no tables, no style, etc and literally just copied in the code, changed the DataSource, and the Field Names.  Locally = Perfect.  Server=Same issue.  I'm really at a loss here and would love any insight....  please, please, please, save my forehead from further bruising!
TPerry
Top achievements
Rank 1
 answered on 25 Sep 2012
1 answer
118 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
342 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
308 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
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?