Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
148 views
I have couple days now a problem with the radgrid trying to make a custom visual appearance while editing and inserting using the FormTemplate making EditFormType="Template" but while inserting it keeps giving me databinding eeror that the property does not exist. While editing its ok...i think this is a bug of the control. This is my code:

                    <telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" 
                        AllowAutomaticUpdates="True" AllowFilteringByColumn="True" AllowPaging="True" 
                        AllowSorting="True" DataSourceID="edsElegxosBrefos" GridLines="None" Skin="Office2007"
                        <MasterTableView AutoGenerateColumns="False" DataKeyNames="Id" NoMasterRecordsText="Δεν υπάρχουν εξετάσεις..." 
                            DataSourceID="edsElegxosBrefos" PagerStyle-FirstPageToolTip="Πρώτη Σελίδα" PagerStyle-LastPageToolTip="Τελευταία Σελίδα" 
                            PagerStyle-NextPageToolTip="Επόμενη Σελίδα" PagerStyle-NextPagesToolTip="Επόμενες Σελίδες" 
                            PagerStyle-PrevPagesToolTip="Προηγούμενες Σελίδες" PagerStyle-PrevPageToolTip="Προηγούμενη Σελίδα" 
                            PagerStyle-PagerTextFormat="Αλλαγή Σελίδας: {4} &nbsp;Σελίδα <strong>{0}</strong> από <strong>{1}</strong>, Εγγραφές <strong>{2}</strong> εώς <strong>{3}</strong> από <strong>{5}</strong>." 
                            CommandItemSettings-AddNewRecordText="Εισαγωγή Εξέτασης" CommandItemSettings-RefreshText="Ανανέωση" 
                            EditFormSettings-EditFormType="Template" CommandItemDisplay="Bottom"
                            <RowIndicatorColumn> 
                                <HeaderStyle Width="20px" /> 
                            </RowIndicatorColumn> 
                            <ExpandCollapseColumn> 
                                <HeaderStyle Width="20px" /> 
                            </ExpandCollapseColumn> 
                            <CommandItemSettings AddNewRecordText="Εισαγωγή Εξέτασης" RefreshText="Ανανέωση"
                            </CommandItemSettings> 
                            <Columns> 
                                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Edit" ImageUrl="~/Images/edit.png" 
                                    Text="Επεξεργασία" UniqueName="column"
                                </telerik:GridButtonColumn> 
                                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ImageUrl="~/Images/delete.png" 
                                    Text="Διαγραφή εξέτασης" UniqueName="column1"
                                </telerik:GridButtonColumn> 
                                <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" HeaderText="Id" ReadOnly="True" 
                                    SortExpression="Id" UniqueName="Id" Visible="False"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="CheckupDate" DataType="System.DateTime" HeaderText="Ημ. Εξέτασης" 
                                    SortExpression="CheckupDate" UniqueName="CheckupDate"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Ilikia" DataType="System.Byte" HeaderText="Ηλικία" 
                                    SortExpression="Ilikia" UniqueName="Ilikia"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Baros" DataType="System.Decimal" HeaderText="Βάρος" 
                                    SortExpression="Baros" UniqueName="Baros"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Ypsos" DataType="System.Byte" HeaderText="Ύψος" 
                                    SortExpression="Ypsos" UniqueName="Ypsos"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="PerimetrosKefalis" DataType="System.Byte" HeaderText="Περίμετρος Κεφαλής" 
                                    SortExpression="PerimetrosKefalis" UniqueName="PerimetrosKefalis"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="StomatikiKoilotita" HeaderText="Στοματική Κοιλότητα" 
                                    SortExpression="StomatikiKoilotita" UniqueName="StomatikiKoilotita"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Sxolia" HeaderText="Σχόλια" SortExpression="Sxolia" 
                                    UniqueName="Sxolia"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Patient.Id" DataType="System.Int32" HeaderText="Patient.Id" 
                                    SortExpression="Patient.Id" UniqueName="Patient.Id" Visible="False"
                                </telerik:GridBoundColumn> 
                            </Columns> 
                            <EditFormSettings EditFormType="Template"
                                <FormTemplate> 
                                    <div align="left"
                                        <table style="width: 100%"
                                            <tr> 
                                                <td style="width: 109px"
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td align="justify" style="width: 109px"
                                                    Ημ.Εξέτασης: 
                                                </td> 
                                                <td> 
                                                    <telerik:RadDatePicker ID="RadDatePickerCheckupDate" runat="server" Culture="Greek (Greece)" 
                                                        DbSelectedDate='<%# Bind("CheckupDate") %>' Skin="Office2007"
                                                        <Calendar Skin="Office2007" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" 
                                                            ViewSelectorText="x"
                                                        </Calendar> 
                                                        <DatePopupButton HoverImageUrl="" ImageUrl="" /> 
                                                    </telerik:RadDatePicker> 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    Ηλικία 
                                                </td> 
                                                <td> 
                                                    <telerik:RadTextBox ID="radTxtBoxIlikia" runat="server" Skin="Office2007" Text='<%# Bind("Ilikia") %>' 
                                                        Width="125px"
                                                    </telerik:RadTextBox> 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td style="width: 109px"
                                                    Βάρος: 
                                                </td> 
                                                <td> 
                                                    <telerik:RadTextBox ID="radTxtBoxBaros" runat="server" Skin="Office2007" Text='<%# Bind("Baros") %>' 
                                                        Width="125px"
                                                    </telerik:RadTextBox> 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    Ύψος: 
                                                </td> 
                                                <td> 
                                                    <telerik:RadTextBox ID="radTxtBoxYpsos" runat="server" Skin="Office2007" Text='<%# Bind("Ypsos") %>' 
                                                        Width="125px"
                                                    </telerik:RadTextBox> 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td style="width: 109px"
                                                    Περίμετρος Κεφαλής: 
                                                </td> 
                                                <td> 
                                                    <telerik:RadTextBox ID="radTxtBoxPerimetrosKefalis" runat="server" Skin="Office2007" 
                                                        Text='<%# Bind("PerimetrosKefalis") %>' Width="125px"
                                                    </telerik:RadTextBox> 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    Στοματική Κοιλότητα: 
                                                </td> 
                                                <td> 
                                                    <telerik:RadTextBox ID="radTxtBoxStomatikiKoilotita" runat="server" Skin="Office2007" 
                                                        Text='<%# Bind("StomatikiKoilotita") %>' Width="125px"
                                                    </telerik:RadTextBox> 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td style="width: 109px"
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td style="width: 109px"
                                                    Σχόλια: 
                                                </td> 
                                                <td> 
                                                    <telerik:RadTextBox ID="radTxtBoxSxolia" runat="server" Skin="Office2007" Text='<%# Bind("Sxolia") %>' 
                                                        Width="250px" Height="150px" TextMode="MultiLine"
                                                    </telerik:RadTextBox> 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    <telerik:RadTextBox ID="radTxtBoxPatientId" runat="server" Skin="Office2007" Text='<%# Bind("Patient.Id") %>' 
                                                        Width="125px" Visible="false"
                                                    </telerik:RadTextBox> 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td style="width: 109px"
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td style="width: 109px"
                                                    <asp:Button ID="btnUpdate" runat="server" Text='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "Εισαγωγή" : "Αποθήκευση" %>' 
                                                        CommandName='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "PerformInsert" : "Update" %>' /> 
                                                    <asp:Button ID="btnCancel" runat="server" CausesValidation="false" Text="Ακύρωση" 
                                                        CommandName="Cancel" /> 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                            </tr> 
                                        </table> 
                                    </div> 
                                </FormTemplate> 
                            </EditFormSettings> 
                            <PagerStyle FirstPageToolTip="Πρώτη Σελίδα" LastPageToolTip="Τελευταία Σελίδα" NextPagesToolTip="Επόμενες Σελίδες" 
                                NextPageToolTip="Επόμενη Σελίδα" PagerTextFormat="Αλλαγή Σελίδας: {4} &nbsp;Σελίδα &lt;strong&gt;{0}&lt;/strong&gt; από &lt;strong&gt;{1}&lt;/strong&gt;, Εγγραφές &lt;strong&gt;{2}&lt;/strong&gt; εώς &lt;strong&gt;{3}&lt;/strong&gt; από &lt;strong&gt;{5}&lt;/strong&gt;." 
                                PrevPagesToolTip="Προηγούμενες Σελίδες" PrevPageToolTip="Προηγούμενη Σελίδα" /> 
                        </MasterTableView> 
                        <ClientSettings> 
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                        </ClientSettings> 
                    </telerik:RadGrid> 
        <asp:EntityDataSource ID="edsElegxosBrefos" runat="server" ConnectionString="name=ePediaDBEntities" 
            DefaultContainerName="ePediaDBEntities" EnableDelete="True" EnableInsert="True" 
            AutoGenerateWhereClause="true" Include="Patient" EnableUpdate="True" EntitySetName="CheckupBrefos"
            <WhereParameters> 
                <asp:SessionParameter Name="Patient.Id" SessionField="PatientId" Type="Int32" /> 
            </WhereParameters> 
        </asp:EntityDataSource> 
 

Doublechecked everything tried with new webform from the beginning....nothing...first i thought there is an error with foreign key and the entity data model but when i try to remove one property fails on another....

I think you should check this...thanx
Tsvetoslav
Telerik team
 answered on 01 Jul 2011
1 answer
243 views
Hi,

I have a RadGrid with RowHoverStyle enabled. This works until I add an event handler to the OnMouseOver Event of the columns.

A first question:

Is there a way how I can combine both? Enabling the RowHoverStyle and adding the OnMouseOver attribute to the columns on ItemDataBound? At the moment the HoverStyle isn't applied anymore when hovering over the row.

Another question:
What is the most correct way to add a custom tooltip to the first column and another custom tooltip to the other columns?

This is how I'm doing it today:
Dim item As GridDataItem = e.Item
'apply tooltip on whole row
For i As Integer = 0 To item.Cells.Count - 1
    Dim onMouseOverStr As String = item.Cells(i).Attributes.Item("onmouseover")
    item.Cells(i).Attributes.Add("onmouseover", onMouseOverStr & "fixedtooltip('" & tooltipMessage & "', this, event, '350px');")
    Dim onMouseOutStr As String = item.Cells(i).Attributes.Item("onmouseout")
    item.Cells(i).Attributes.Add("onmouseout", onMouseOutStr & "delayhidetip();")
Next
 
'overwrite first column cell's tooltip
item("First").Attributes.Add("onmouseover", "fixedtooltip('" & global_portal.TooltipReplace(FirstTooltipMessage) & "', this, event, '260px');")
item("First").Attributes.Add("onmouseout", "delayhidetip();")
It works but doesn't seem to be the most correct way.

The last question:
As I have set up the grid to indicate the row on hovering over it (RowHoverStyle = True) and I'm catching the rowclick on itemCommand, I would like the cursor to change to the pointer.

This is how I did it in a normal asp.net grid:
e.Item.Attributes.Add("onMouseOver", "this.style.cursor='pointer'")

But it doesn't seem to work for a Radgrid...

Hope you can help me out with this one.

Thanks,

Wim
Tsvetina
Telerik team
 answered on 01 Jul 2011
3 answers
109 views
Is this possible?
Veronica
Telerik team
 answered on 01 Jul 2011
1 answer
44 views
Hello,

We're evaluating the ASP.NET AJAX suite as a potential replacement for current instances of Infragistics controls, and have been in most cases easily able to duplicate required functionality with Telerik controls. However, there's one rather critical issue we've not been able to duplicate.

By default, when there are more than two appointments on the same day, RadScheduler's MonthView appears to render two of them and then a hyperlink to it's DayView labeled "More". Is it possible to override this behavior and force MonthView to render all appointments (even if the day's cell has to expand vertically)?

The users of the application we'd like to replace schedule controls in require the ability to see everything in a single view.

Thank you!

Sean
Veronica
Telerik team
 answered on 01 Jul 2011
1 answer
84 views
I was wondering though if for release you could hack in another position into it...InPlace I want the notification to show up where I place it Let me give an example... In sitefinity 4 when you click save in the config backend a notification div shows up at the top of the div container with a status message. So it's more part of the Dom container and less like a tooltip.....or does this exist and I just don't see it othe demo page...or am I just missing it? Up until now I always used to do this with the radxmlhttppanel but this control seems to help wrap a lot of the wiring up of hiding and showing the message :). THANKS SO MUCH
Marin Bratanov
Telerik team
 answered on 01 Jul 2011
1 answer
222 views
Hi Team,
We are using Rad Context Menu control on our application to populate values. I do have the arrow position to go down in RadContextMenu Control. But I would like to know whether Vertical scrolling is possible or not here like what we have for ListBox. 


In Listbox control, the vertical scroll automatically comes when the items count exceeds the size of the control.

In RadContextMenu, these ^  v icons will use for go down or go up. here i would like to have a vertical scroll bar. 



Please reply back on this ASAP.


thanks
Alexis
Kate
Telerik team
 answered on 01 Jul 2011
1 answer
388 views
Hi all,

I am using a webusercontrol for my insert / edit of my radgrid. The insert seems to work fine, except the window doesn't close. After the save, if I click the close X then everything is fine - but it should do that automatically. The other problem is that my edit doesn't work - doesn't pull information in. I'm sure that's because I'm not doing anything to bind it.

So - first question - my .ascx file is using a FormView control and does all of the binding like a normal page would. Is that correct? I really couldn't find a simple example of how to do this.

If 'yes' and I have done that part right - then how do I get my edit to tie to my grid?

Thanks so much. I've included code here:

1. Grid:
<telerik:RadGrid runat="server" ID="gvPatientSearch" DataSourceID="dsPatients" AllowAutomaticInserts="true">
    <ClientSettings>  
        <ClientEvents OnPopUpShowing="PopUpShowing" /> 
    </ClientSettings
    <MasterTableView DataKeyNames="patientID" CommandItemDisplay="Top" Width="100%" EditMode="PopUp">
        <EditFormSettings 
            UserControlName="~/App_Assets/Controls/patientControl.ascx"
            EditFormType="WebUserControl"  
            CaptionDataField="lastName" 
            CaptionFormatString="Edit Patient Record for {0}"
            InsertCaption="New Patient"
            FormStyle-Width="600px"
            
        </EditFormSettings>
        <CommandItemSettings ShowAddNewRecordButton="true" AddNewRecordText="Add New Patient" />
        <Columns>
            ...
            <telerik:GridEditCommandColumn />
        </Columns>
    </MasterTableView>    
</telerik:RadGrid>

2. My user control looks like this:

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="patientControl.ascx.vb" Inherits="App_Assets_Controls_patientControl" %>
    <div align="center">
        <asp:FormView runat="server" ID="fvPatients" DataKeyNames="patientID" DataSourceID="dsPatients" DefaultMode="Insert">
            <EditItemTemplate>
                <table class="searchTable" style="border: 1px solid #2a5690; background-color: #f7f5f0;" cellpadding="3" cellspacing="1" width="99%">
                <tr>
                    <td align="right">Last Name:</td>
                    <td>
                        <telerik:RadTextBox runat="server" ID="txtLastName" Text='<%# Bind("lastName") %>' MaxLength="50" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtLastName" CssClass="errorMessage">«</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">First Name:</td>
                    <td>
                        <telerik:RadTextBox runat="server" ID="txtFirstName" Text='<%# Bind("firstName") %>' MaxLength="50" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtFirstName" CssClass="errorMessage">«</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">Middle Name:</td>
                    <td>
                        <telerik:RadTextBox runat="server" ID="txtMiddleName" Text='<%# Bind("middleName") %>' MaxLength="50" />
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="top">Sex:</td>
                    <td valign="top">
                        <asp:RadioButtonList runat="server" RepeatDirection="Horizontal" ID="cboSex" SelectedValue='<%# Bind("sex") %>'>
                            <asp:ListItem Text="Male" Value="M" />
                            <asp:ListItem Text="Female" Value="F" />
                        </asp:RadioButtonList>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="cboSex" CssClass="errorMessage">please choose sex</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">Date of Birth:</td>
                    <td>
                        <telerik:RadDateInput MinDate="01/01/1900" runat="server" ID="dteDateOfBirth" SelectedDate='<%# Bind("dateOfBirth") %>' />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="dteDateOfBirth" CssClass="errorMessage">«</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">SSN:</td>
                    <td>
                        <telerik:RadMaskedTextBox ID="txtSSN" runat="server" Mask="###-##-####" TextWithLiterals="-" Width="75px" Text='<%# Bind("ssn") %>' />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtSSN" CssClass="errorMessage">«</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">Phone Number:</td>
                    <td>
                        <telerik:RadMaskedTextBox runat="server" ID="txtPhoneNumber" Mask="###-###-####" TextWithLiterals="-" MaxLength="15" Text='<%# Bind("phoneNumber") %>' />
                    </td>
                </tr>
                <tr>
                    <td align="right">Alternate (Cell) Phone Number:</td>
                    <td><telerik:RadMaskedTextBox runat="server" ID="txtPhoneNumber2" Mask="###-###-####" TextWithLiterals="-" MaxLength="15" Text='<%# Bind("phoneNumber2") %>' /></td>
                </tr>
                <tr>
                    <td align="right">Address Line 1:</td>
                    <td><telerik:RadTextBox runat="server" ID="txtAddressLine1" MaxLength="150" Text='<%# Bind("addressLine1") %>' /></td>
                </tr>
                <tr>
                    <td align="right">Address Line 2:</td>
                    <td><telerik:RadTextBox runat="server" ID="txtAddressLine2" MaxLength="150" Text='<%# Bind("addressLine2") %>' /></td>
                </tr>
                <tr>
                    <td align="right">City:</td>
                    <td><telerik:RadTextBox runat="server" ID="txtCity" EmptyMessage="enter city" MaxLength="50" Text='<%# Bind("city") %>' /></td>
                </tr>
                <tr>
                    <td align="right">State:</td>
                    <td><telerik:RadTextBox runat="server" ID="txtState" EmptyMessage="enter state" MaxLength="2" Text='<%# Bind("state") %>' /></td>
                </tr>
                <tr>
                    <td align="right">Zip Code:</td>
                    <td><telerik:RadTextBox runat="server" ID="txtZipCode" EmptyMessage="enter zip code" MaxLength="10" Text='<%# Bind("zipCode") %>' /></td>
                </tr>
                <tr>
                    <td align="right">Email Address:</td>
                    <td><telerik:RadTextBox runat="server" ID="txtEmailAddress" Text='<%# Bind("emailAddress") %>' /></td>
                </tr>
                <tr>
                    <td align="right">Hospital Patient ID:</td>
                    <td><telerik:RadTextBox runat="server" ID="txtHospitalPatientID" Text='<%# Bind("hospitalPatientID") %>' /></td>
                </tr>
                <tr>
                    <td></td>
                    <td><telerik:RadButton CommandName="Insert" runat="server" ID="btnSave" Text="Add Patient" /></td>
                </tr>
                </table>
            </EditItemTemplate>
        </asp:FormView>
    </div>
  
    <asp:SqlDataSource runat="server" ID="dsPatients" 
        SelectCommandType="StoredProcedure" SelectCommand="sp_Patients"
        InsertCommandType="StoredProcedure" InsertCommand="sp_Patients"
        UpdateCommandType="StoredProcedure" UpdateCommand="sp_Patients"
        >
        <SelectParameters>
            <asp:Parameter Name="Action" DefaultValue="SELECT" />
            <asp:QueryStringParameter Name="patientID" QueryStringField="patientID" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="Action" DefaultValue="INSERT" />
            <asp:CookieParameter Name="lastUpdatedBy" CookieName="userName" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="Action" DefaultValue="UPDATE" />
            <asp:CookieParameter Name="lastUpdatedBy" CookieName="userName" />
        </UpdateParameters>
    </asp:SqlDataSource>

Thanks for your help!
Marin
Telerik team
 answered on 01 Jul 2011
3 answers
75 views
I have put some additional logic into the ItemDataBound event to handle the conditional colour formatting which works perfectly on the initial screen display.  However when i click on one of my column headers to sort my data by the column the formatting is lost on the sorted column. 

Can anyone shed any light on why this is happening.

Here is my code from my ItemDataBound Event

protected void gridTxnEnquiry_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {           
        GridDataItem dataItem = (GridDataItem)e.Item;
         DataRow dr = ((DataRowView)e.Item.DataItem).Row;
 
        // Set the Back Colour depending on the Record Type
        int rectype = int.Parse(dr["RecordType"].ToString());
         switch (rectype)
        {
            case 0:
            dataItem.BackColor = Color.Blue
            break;           
            case 1:
            dataItem.BackColor = Color.Red
            break;
        }
    }
}

Stuart Ferguson
Top achievements
Rank 1
 answered on 01 Jul 2011
4 answers
145 views
I am guessing this has been talked about before and there is probably a very easy solution, but I can't seem to find it.

I have a form which a whole bunch of other radcontrols that do an autopostback, I am finding that if a user selects the icon to open the calendar on the RadDatePicker quickly after moving off another field that the dates are unselectable on the calendar.  It seems like it is opening in the middle of the postback or something and disables it.  The only way to get out of this state is to go to another field, make a change, and then back to the calendar. 

Has anyone seen this?  Is there a way to disable that icon while in the middle of postback or something along those lines?

Thanks so much
Andy
Top achievements
Rank 1
 answered on 01 Jul 2011
2 answers
117 views
Hi All,

Is there a way to get a title on a pane to include an image?  As per the attached.  The left part shows what it is now and the right is roughly how I'd like it to look.

Obviously not a critical requirement but enhances the appearance of the page.

Regards,

Jon
Jon
Top achievements
Rank 1
 answered on 01 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?