Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
39 views
Hello,


Dynamically I have added radscheduler in the sharepoint 2010 application page. I have set  "Telerik" theme for radscheduler it's working fine but in the browser 12 CSS files are loading for this particular control. It affects the page response as well as in Internet Explorer(7,8,9) upto  31 individual stylesheets are supported. 


Refer the below link
http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/ad1b6e88-bbfa-4cc4-9e95-3889b82a7c1d/ 


It affect the  page size and design.I have added the control in the page layout which resides inside master page. The CSS file count in the application page.


1. Master Page - 2 stylesheet 
2.
Sharepoint  - 4 stylesheet 
3.
Three RadTab and Radgrid controls - 15 stylesheet
4
. RadScheduler - 12 stylesheet


If I have added Radscheduler,RadTab,Radgrid controls in the page totally 27 stylesheets are loaded in the page.So how to reduce the css file of the scheduler control and telerik RadTab,RadScheduler controls ? 
We are in a highly critical situation where our product release is held up because of the issues. Please respond at your as soon as possible. 


Regards
Ramalingam S
Jayesh Goyani
Top achievements
Rank 2
 answered on 03 Mar 2012
3 answers
374 views
I have a page with a RadGrid on it that I've been testing with.  I do not have any kind of DataSource control on it, so I am manually wiring up a datasource to it on the NeedDataEvent and then, of course, wiring up the various command item events.  I had my test page all working with insert, update, and delete events until... I changed several columns from simple GridBoundColumn columns to GridTemplateColumn columns.

Using the GridBoundColumn type, the following code worked just fine:

    protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e)  
    {  
        DataTable dt = GridSource;  
        GridEditableItem eeditItem = e.Item as GridEditableItem;  
 
        int rowkey = (int?)editItem.GetDataKeyValue(IDColumnName) ?? 0;  
 
        DataRow row = dt.Rows.Find(rowkey);  
        if (row != null)  
        {  
            row.BeginEdit();  
            try  
            {  
                editItem.UpdateValues(row);  
                row["EditAction"] = "update";  
                row.EndEdit();  
 
                TrackChange(rowkey, "update");  
            }  
            catch (Exception ex)  
            {  
                row.CancelEdit();  
                RadGrid1.Controls.Add(new LiteralControl("Unable to update record: " + ex.Message));  
                e.Canceled = true;  
            }  
        }  
        txtCommandInfo.Text = String.Format("ItemIndex {0} rowkey {1}", e.Item.ItemIndex.ToString(), rowkey);  
    }  
 

The code line of interest is inside the try block where it calls the editItem.UpdateValues method.  And it is this line that no longer seems to work if my columns are of the GridTemplateColumn type.  There is is no error that is thrown, it's just the row (a DataRow object) is not updated with new values from any template columns, only bound columns.

In both cases, I have the MasterTableView setup with "EditMode="EditForms", the only change is in the markup. 

for the bound column, I had this:

                    <telerik:GridBoundColumn HeaderText="FirstName" DataField="FirstName" UniqueName="FirstName" 
                        MaxLength="20" /> 
 

for the template column, I had this:
                    <telerik:GridTemplateColumn HeaderText="FirstName" UniqueName="FirstNameTemplate">  
                        <ItemTemplate> 
                            <%# Eval("FirstName") %> 
                        </ItemTemplate> 
                        <EditItemTemplate> 
                            <asp:TextBox ID="FirstName" runat="server" Text='<%# Eval("FirstName") %>' /> 
                            <asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ErrorMessage="First name is required." 
                                ControlToValidate="FirstName"></asp:RequiredFieldValidator> 
                        </EditItemTemplate> 
                    </telerik:GridTemplateColumn> 
 

So when changing to the template column, I find that I can code something like
        
 
        string txt;  
        TextBox ctrl = (TextBox)editItem.FindControl("FirstName");  
        if (ctrl != null)  
            txt = ctrl.Text;  
 

and of course work on manually updating my DataRow object accordingly.  But... I'm trying to *understand* this, and quite frankly I'm not finding much documentation on it. 

So... could someone provide me pointers to documentation on the differences between Template and Bound columns?  Or even some more reference material on the ExtractValues, UpdateValues methods?

I realize I can work on coding up a scenario where I use the .FindControl method for every column I'm interested in, but I guess I'm after a little more education...

Any help would be greatly appreciated.  Thanks in advance.

Jayesh Goyani
Top achievements
Rank 2
 answered on 03 Mar 2012
3 answers
104 views
The original design called for a filter (Telerik’s filter control) inside a pane to slide in and out the results grid.
I have a filter that would need to be slightly more advanced given the number of fields and objects that could be available.
I am not sure if this is possible, but have another drop down before the field to choose the object. So first you choose the object, and then the fields available within that object appear in the next drop down. Example Control (Object) and ControlEffectiveness (Control field):
******************************************************
AND + + x
|_Organization Location EqualTo [ North America ] x
|_ AND + + x
|_ Control v ControlEffectiveness EqualTo [Ineffective ]x
|Control|
|Organization|
|Process|
*******************************************************

In the above diagram, Control v is a field with drop down Control, Organization, Process etc... therefore here Control is an object and
ControlEffectiveness is the control field.
Is there a way we can have another drop down before the field to choose the object.
Please Suggest!! ASAP

Andrey
Telerik team
 answered on 02 Mar 2012
1 answer
181 views
Hi,

I am using Telerik RadControls for ASP.NET Ajax.
DLL : Telerik.Web.UI
Version : 2011.2.915.35 

I have a multiview radcalendar with 6 rows and 2 columns.
I need to highlight or change the background of a month based on the user selection in a separate combobox.

I have two questions now,
1. How to identify a particular month in multiview? For eg., if the user selects April 2012, how can i identify this in the calendar?
2. How to set the background color of a particular month? For eg., if the user selects April 2012, how can i identify this in the calendar and change its background? 

Do we have any server-side APIs to achieve this?

PS: I have this radcalendar in an updatepanel. Triggers are set for buttons outside this updatepanel.

Regards,
Dayantihy
Richard
Top achievements
Rank 1
 answered on 02 Mar 2012
2 answers
82 views
Hi,

I'm trying to use a custom filter template with a RadComboBox, which I have been able to do.  I'm now attempting to extend that with the use of checkboxes for multiple selection, however I'm having trouble with the javascript.  The grid and the combo are both created dynamically in code-behind, and doesn't contain any markup.

I have seen some of the examples here, including the one below to find a control:
var combo = $find("<%= RadComboBox1.ClientID %>");

My question really is how to do exactly as above, but using ClientScript.RegisterClientScriptBlock.  Obviously I can't use the markup evalutate functions (<%=) but whenever I try doing $find("RadComboBox.ClientId") I get a null or undefined error.  Any help?

Thanks,
Mathew
Mathew
Top achievements
Rank 1
 answered on 02 Mar 2012
3 answers
89 views
It appears that the ClientSettings.AllowColumnHide setting is not enforced by the HeaderContextMenu. What I mean by this is that when I set AllowColumnHide to false, the Columns menu option still appears in the HeaderContextMenu and the user is still able to hide the columns.

So I was wondering if setting AllowColumnHide to false could work like the Groupable property does on a column. Where, when you set the property to false, that menu option does not appear in the HeaderContextMenu.

This occurs in IE8 with RadControls version 2011.3.1305.35 of the controls.

Thanks,

Kevin
Andrey
Telerik team
 answered on 02 Mar 2012
2 answers
170 views
I have a RadGrid that uses TemplateFields to add/edit data. I use the ItemCommand event to access the Insert command and insert data. I have no issues finding the control in that event, but none of the controls I access have any data.

For example: if I add a new record to the Grid, fill out the text box and click insert; the control is found in the code behind, but the text field is empty, even though I filled out text box. I'm stumped as to why this happens. Below is my code.

ASPX

<telerik:RadGrid ID="ipAddressGridNewDevice" runat="server" AutoGenerateColumns="false" Width="250"
 OnLoad="ipAddressGridNewDevice_OnLoad" OnItemCommand="ipAddressGridNewDevice_ItemCommand" AutoGenerateDeleteColumn="true"
 AutoGenerateEditColumn="true">
    <MasterTableView CommandItemDisplay="Top">
        <Columns>
            <telerik:GridTemplateColumn HeaderText="IP Address">
                <ItemTemplate>
                    <asp:Label ID="newDeviceIP" runat="server" Text='<%# Bind("IPAddress") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                <p>
                    <telerik:RadTextBox ID="newDeviceIP_edit" runat="server" />
                </p>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Attenuation">
                <ItemTemplate>
                    <asp:Label ID="newDeviceAtten" runat="server" Text='<%# Bind("Attenuation") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <p>
                        <telerik:RadNumericTextBox ID="newDeviceAtten_edit" runat="server" ShowSpinButtons="true" Width="50px" MinValue="0" Value="0">
                            <NumberFormat DecimalDigits="0" />
                        </telerik:RadNumericTextBox>
                    </p>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
        <CommandItemSettings ShowRefreshButton="false" ShowAddNewRecordButton="true" />
    </MasterTableView>
</telerik:RadGrid>


C#


protected void ipAddressGridNewDevice_ItemCommand(object sender, GridCommandEventArgs e)
        {
           if (e.CommandName == "PerformInsert")
           {
                GridEditFormInsertItem editedItem = e.Item as GridEditFormInsertItem;
                RadTextBox newDeviceIP_edit = (RadTextBox)editedItem.FindControl("newDeviceIP_edit");
                RadNumericTextBox newDeviceAtten_edit = (RadNumericTextBox)editedItem.FindControl("newDeviceAtten_edit");
 
                addIPAddressNewDevice(deviceIPTable, newDeviceIP_edit.Text, (Int32)newDeviceAtten_edit.Value);
                
           }
}
 
William
Top achievements
Rank 1
 answered on 02 Mar 2012
6 answers
349 views
I am using the code you guys have posted on this page = http://www.telerik.com/help/aspnet-ajax/grid-getting-cell-values-for-selected-rows-client-side.html . It works great as long as my column is set to visible = true. when I hide the id column the javascript cannot access the value. Is there a solution to this? Basically what I am doing is allowing the user to select the entire row, I then grab the ID column and send them to a reporting page with this ID set as a querystring.

Here is the aspx page code:

<script type="text/javascript" >
 
    function RowSelected(sender, eventArgs) {
        var grid = sender;
        var MasterTable = grid.get_masterTableView(); var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
        var cell = MasterTable.getCellByColumnUniqueName(row, "videoID");
        window.location = "Map.aspx?id=" + cell.innerHTML;
        //here cell.innerHTML holds the value of the cell 
    }
     
</script>
    <style type="text/css" >
       
    .RowMouseOver 
    
      background-color: red !important; 
    
        
    </style>
    <table width="900" align="center">
<tr>
<td>
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
    </telerik:RadScriptManager>
    </td>
</tr>
<tr>
<td align="center">
 
    <telerik:RadGrid ID="RadGrid1"  runat="server"
        AllowPaging="True" DataSourceID="sdsVideoList"
        AllowMultiRowSelection="True" ShowFooter="True" ShowStatusBar="True"
        AllowSorting="True" CellSpacing="0" GridLines="None" Skin="Telerik"
        AutoGenerateColumns="False">
         <ClientSettings EnableRowHoverStyle="true" >
               
              <Selecting AllowRowSelect="true" />
              <ClientEvents OnRowSelected="RowSelected" />
 
            </ClientSettings>
     
<MasterTableView>
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridBoundColumn DataField="videoID" Visible="true"
            FilterControlAltText="Filter column column" HeaderText="videoID"
            UniqueName="videoID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Name"
            FilterControlAltText="Filter column1 column" HeaderText="Name"
            UniqueName="column1">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="CreatedOn"
            FilterControlAltText="Filter column2 column" HeaderText="Date Created"
            UniqueName="column2">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="wisitaID" Visible="false"
            FilterControlAltText="Filter column3 column" HeaderText="Wisita ID"
            UniqueName="column3">
        </telerik:GridBoundColumn>
    </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
 
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>


Thanks!
Sam
Sam
Top achievements
Rank 1
 answered on 02 Mar 2012
2 answers
185 views
I am using the RadWindow as a dialog for updating some user notes on my database.  I have the RadWindow defined on my main page.  When the user clicks a button, I open the RadWindow and set several field values on the window using Javascript.  The user then enters their data and clicks a "Submit" button.

In the code behind, I am getting the data from the fields on the RadWindow and then calling my database update routine.  The issue I am having is this.  When I pop the window up using Javascript, I am modifying some label, RadTextbox, and Radbutton control text values.  In the code behind I need to use the values. The text values are fine but the labels that I change in the Javascript do not have the updated values in the code behind.  Does anybody know why?

I am using the "OnClientShow" event to call the Javascript routine to modify the RadWindow fields.  Here is the routine:

// This function moves the data from various fields in the carrierinformation page to the data
// update request screen being opened. Some of the fields are actual data fields from the screen
// while others are hidden fields.
function SetDataUpdWindowFields() {
    // Get Carrier name and set.
    var CarrName = GetCarrierName();
    var DUCarrName = document.getElementById("<%= lblDataUpdCarrName.ClientID %>");
    DUCarrName.innerText = CarrName;
    // Get Email Address and Set.
    var EmailAddr = document.getElementById("<%= hfEmailAddr.ClientID %>");
    var DUEmailAddr = $find("<%= rtxtDataUpdEmailAdr.ClientID %>");
    DUEmailAddr.set_value(EmailAddr.value);
    // Set the user notify option to yes.
    $find("<%= roptDataUpdNotifyYes.ClientID %>").set_checked(true);
    $find("<%= roptDataUpdNotifyNo.ClientID %>").set_checked(false);
    // Get and set the location name.
    var rpageview = GetCurrPageView();
    if (rpageview) {
        var lblLocName = $telerik.$(".cdhdr-carrlocationheader", rpageview._element).html();
        if (lblLocName) {
            var DULocName = document.getElementById("<%= lblDataUpdLocName.ClientID %>");
            DULocName.innerText = lblLocName;
        }
    }
}

It is specifically the DUCarrName and DULocName values on the RadWindow that show correctly on the actual window, but do not have the new values in the code behind.

Any help would be greatly appreciated.

Blake
Blake
Top achievements
Rank 1
 answered on 02 Mar 2012
1 answer
52 views
Dear Telerik Team,

Let me know if the following approach would work out.

1) Page.aspx displays a RadGrid with a number of customizations user can  do on it to show the data.
2) Page.aspx has a button called 'Generate PDF'. When I click it, is it possible to create a new instance of RadGrid, assign the existing grid value to it (BYVAL and not BYREF). Then export the PDF from the new instance of RadGrid.

Basically I want to do this because I can not call 'Rebind' on the existing grid and/or visually make any changes on the existing grid. The new grid should be invisible totally only for the purpose of PDF.
Casey
Top achievements
Rank 1
 answered on 02 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?