Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
274 views
hi telerik team,
I have got an issue regarding radcombobox.The scenario is as follow.
I have a radcombobox in the middle of the form .
On the selected changed indexed of this radcombobox i have to fill some textboxes that are on  the form.This radcombobox and the text boxes are using ajax to avoid postback.But when i do click on this radcombobox ,the screens scrolls down to the top .Can you please tell why is it happening?
Shinu
Top achievements
Rank 2
 answered on 10 Feb 2011
4 answers
459 views
After going through the documentation and looking a several forum posts, I am still having trouble getting a reference to a textbox inside a FormTemplate:

<FormTemplate>
   <asp:TextBox ID="MyTextbox" runat="server" Text='<%# Bind( "some_value_from_database") %>' Columns="80" />
                                
    <asp:Button ID="SendTestEmail" Text='Send Test Email' runat="server" CommandName='some_command' CommandArgument='<%# Eval("some_database_ID") %>' />
</FormTemplate>

and in code behind:

 protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
        if (e.CommandName == "some_command")
        {
             //what goes here to read the value of the TextBox?
        }
    }

Thanks for the fantastic product. I've been using Telerik controls for 3 years now.
Princy
Top achievements
Rank 2
 answered on 10 Feb 2011
3 answers
185 views
How do I create and trigger an Event Handler for a programatically created RadDock when I change it's position inside of a RadDockZone?
Brian Lanham
Top achievements
Rank 1
 answered on 10 Feb 2011
2 answers
471 views
Hi,

When i am exporting a grid to pdf/word/excel the exported document looks very plain.
 Is it possible to set the footer and header when we exporting a grid to pdf/excel/word. so its static and always appears at the header and footer of a pdf/excel/word. 

Is this possible?

Thanks
Daniel
Telerik team
 answered on 09 Feb 2011
1 answer
57 views

Hello

I seem to have a weird problem... Viewstate is enabled page-wide. All Default Asp.net settings are loaded.
I have a Rad-Grid , its Late bound Via Linq To SQL on NeedDataSouerce. I have a submit button in the CommandItemTemplate..

I have no other code, just prototyping this. When I press submit, the page reloads, Press submit again. I get the page can not be displayed internet explorer message. Seems like the 2 request to the Asp.net development server doesnt even hit. the URL seems fine, javascript looks good. I dont see why I get that.

Here is the Grid:

<P><telerik:RadGrid ID="LetterEditQueueGrid" runat="server" 
enableAjax="false" 
ShowStatusBar="True"<BR>        
AllowPaging="True" AutoGenerateColumns="False" Width="950px" 
EnableViewState="true"<BR>        
GridLines="None" OnNeedDataSource="LetterEditQueueGrid_NeedDataSource" 
<BR>        
onitemcommand="LetterEditQueueGrid_ItemCommand" 
<BR>        
ondetailtabledatabind="LetterEditQueueGrid_DetailTableDataBind" 
<BR>        
onitemdatabound="LetterEditQueueGrid_ItemDataBound"><BR>        
<MasterTableView  CommandItemDisplay="Top" Name="Main" DataKeyNames="Id" 
AllowFilteringByColumn="True"><BR>            
<Columns><BR>                
<telerik:GridTemplateColumn HeaderText="Run Date" AllowFiltering="true" 
<BR>                    
DataField="RunDate"><BR>                    
<ItemTemplate><BR>                        
<%#Convert.ToDateTime(Eval("RunDate")).ToShortDateString()%><BR>                    
</ItemTemplate><BR>                
</telerik:GridTemplateColumn></P>
<P>                
<telerik:GridTemplateColumn HeaderText="Run Time ID" AllowFiltering="true" 
<BR>                    
DataField="RunTime_ID"><BR>                    
<ItemTemplate><BR>                        
<%#Eval("RunTime_ID")%><BR>                    
</ItemTemplate><BR>                
</telerik:GridTemplateColumn></P>
<P>                
<telerik:GridTemplateColumn HeaderText="Quality Auditor" 
AllowFiltering="true"><BR>                    
<ItemTemplate><BR>                        
<%#Eval("Approver") 
%><BR>                    
</ItemTemplate><BR>                
</telerik:GridTemplateColumn></P>
<P>                
<telerik:GridTemplateColumn HeaderText="Reason for Letter Edit" 
<BR>                    
AllowFiltering="False"><BR>                    
<ItemTemplate><BR>                        
<%#Eval("ReasonForLetterEdit")%><BR>                        
&nbsp;<BR>                    
</ItemTemplate><BR>                
</telerik:GridTemplateColumn></P>
<P>                
<telerik:GridTemplateColumn HeaderText="Letter Edit Date" 
<BR>                    
AllowFiltering="False"><BR>                    
<ItemTemplate><BR>                        
<%#Convert.ToDateTime(Eval("RunDate")).ToShortDateString() 
%><BR>                    
</ItemTemplate><BR>                
</telerik:GridTemplateColumn></P>
<P>                
<telerik:GridTemplateColumn HeaderText="Letter ID" 
AllowFiltering="False"><BR>                    
<ItemTemplate><BR>                        
<%#Eval("LetterID") 
%><BR>                    
</ItemTemplate><BR>                
</telerik:GridTemplateColumn></P>
<P>                
<telerik:GridTemplateColumn HeaderText="Subscriber ID" 
AllowFiltering="False"><BR>                    
<ItemTemplate><BR>                        
<%#Eval("SubscriberId") 
%><BR>                    
</ItemTemplate><BR>                
</telerik:GridTemplateColumn></P>
<P>                
<telerik:GridTemplateColumn HeaderText="Review Original Document" 
<BR>                    
AllowFiltering="False" 
><BR>                    
<ItemTemplate><BR>               
<%--     <asp:LinkButton ID="ViewOriginal" 
CommandArgument='<%# Eval("editid") %>' runat="server" 
<BR>                            
Text='Review Original Document' CommandName="ViewOriginalLetter">View 
original | </asp:LinkButton>--%>   
<BR>                            
<a href="#" 
onclick="javascript:ViewPDFImageOriginal('<%#Eval("EditId")%>')">Review 
Original 
Document</a><BR>                    
</ItemTemplate><BR>                
</telerik:GridTemplateColumn></P>
<P>                
<telerik:GridTemplateColumn HeaderText="Review Edit Document" 
<BR>                    
AllowFiltering="False"><BR>                    
<ItemTemplate><BR>                      
<%--      <asp:LinkButton ID="ViewEdit" 
CommandArgument='<%# Eval("id") %>' runat="server" 
<BR>                            
Text='Review Edit Document' CommandName="ViewEditLetter">View Edit | 
</asp:LinkButton>--%><BR>                        
<a href="#" 
onclick="javascript:ViewPDFImageEdit('<%#Eval("ID")%>')">Review Edit 
Document</a><BR>                    
</ItemTemplate><BR>                
</telerik:GridTemplateColumn></P>
<P>                
<telerik:GridTemplateColumn HeaderText="Suppress" UniqueName="mtSuppress" 
<BR>                    
AllowFiltering="False"><BR>                    
<ItemTemplate><BR>                        
<asp:CheckBox ID="cbSuppress" runat="server" 
></asp:CheckBox><BR>                    
</ItemTemplate><BR>                
</telerik:GridTemplateColumn></P>
<P>                
<telerik:GridTemplateColumn HeaderText="Approve" UniqueName="rApprove" 
<BR>                    
AllowFiltering="False"><BR>                    
<ItemTemplate><BR>                         
<asp:CheckBox ID="cbApprove" runat="server" 
></asp:CheckBox><BR>                    
</ItemTemplate><BR>                
</telerik:GridTemplateColumn><BR>            
</Columns>            
<BR>            
<BR>            
<CommandItemTemplate><BR>                
<table 
width="100%"><BR>                    
<tr><BR>                        
<td style="width: 
400px;"><BR>                            
&nbsp;<BR>                        
</td><BR>                        
<td 
align="right"><BR>                            
<asp:Button ID="btnSubmit" CausesValidation="true" runat="server" 
Text="Submit" CommandName="Save" 
/><BR>                          
</td><BR>                    
</tr><BR>                
</table><BR>            
</CommandItemTemplate></P>
<P>        
</MasterTableView><BR>    
</telerik:RadGrid><BR>    </P>
sasho
Top achievements
Rank 1
 answered on 09 Feb 2011
3 answers
309 views
Hi,
I have a grid with 4 visible columns. The problem I'm having is that the header for the last column ignores the font-size property that I've set (12px). All the other headers displayed correctly.

Any reason why?

Thanks.


<rad:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" 
        DataSourceID="dsSearch" ShowGroupPanel="True"  
        AllowCustomPaging="True" AutoGenerateColumns="False"  
        AllowMultiRowSelection="True"
        <HeaderStyle Font-Names="Verdana,Tahoma,Arial" Font-Size="12px" /> 
        <ClientSettings AllowDragToGroup="True"
            <Selecting AllowRowSelect="True" /> 
        </ClientSettings> 
        <MasterTableView DataSourceID="dsSearch"
            <RowIndicatorColumn Visible="False"
                <HeaderStyle Width="20px" /> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn Resizable="False" Visible="False"
                <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn> 
            <Columns> 
                <rad:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="colID"  
                    Visible="False"
                </rad:GridBoundColumn> 
                <rad:GridTemplateColumn UniqueName="colSelect"
                    <ItemTemplate> 
                        <asp:CheckBox ID="chkSelect" runat="server" /> 
                    </ItemTemplate> 
                </rad:GridTemplateColumn> 
                <rad:GridTemplateColumn HeaderText="Keywords" UniqueName="colKeywords"
                    <ItemTemplate> 
                        <asp:Label ID="Label12" runat="server" Text="Label"></asp:Label> 
                    </ItemTemplate> 
                    <ItemStyle Font-Names="Verdana,Tahoma,Arial" Font-Size="12px" /> 
                </rad:GridTemplateColumn> 
                <rad:GridHyperLinkColumn DataNavigateUrlField="ID"  
                    DataNavigateUrlFormatString="~/bookinfo.aspx?BookID={0}"  
                    DataTextField="Title" UniqueName="colTitle" HeaderText="Title"
                    <ItemStyle Font-Names="Verdana,Tahoma,Arial" Font-Size="12px" /> 
                </rad:GridHyperLinkColumn> 
                <rad:GridBoundColumn DataField="CategoryTitle" HeaderText="Dewey Category"  
                    UniqueName="colCategoryTitle"
                    <HeaderStyle Font-Names="Verdana,Tahoma,Arial" Font-Size="12px" /> 
                    <ItemStyle Font-Names="Verdana,Tahoma,Arial" Font-Size="12px" /> 
                </rad:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
    </rad:RadGrid> 

Travis Johnson
Top achievements
Rank 1
 answered on 09 Feb 2011
8 answers
153 views
I have created a web page in which I have placed a rad editor and in that I created a template for the editor. Now I insert that template in editor and save it when I opened the rad editor in edit mode then in firefox template is not allowing to edit but in IE browser it is allowing. Kindly reply me as soon as possible.
Rumen Jekov
Top achievements
Rank 1
 answered on 09 Feb 2011
4 answers
145 views

I would appreciate it if someone could point me in the right direction to solve my issue.

I have a radgrid that has returns all the media such as audio, video and other media etc associated with it that particular message. Then on edit I have a dropdown whose data source populates the dropdown with all the possible audio files. Now on edit if there was a audio file chosen, it will be displayed in the dropdown and the selected value is a guid.

My issue is that IF the audiofile gets deleted before it is removed from the message, it breaks. I want to verify that the audio file still exists. Hope it all makes sense.

 

<

 

telerik:RadGrid AutoGenerateColumns="False" ID="RadGrid1" DataSourceID="SqlDataSource1"

 

 

 

 

 

AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" runat="server"

 

 

 

 

 

Skin="Telerik" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" PageSize="10"

 

 

 

 

 

AllowAutomaticUpdates="True" OnItemUpdated="RadGrid1_ItemUpdated" OnItemDeleted="RadGrid1_ItemDeleted"

 

 

 

 

 

OnItemInserted="RadGrid1_ItemInserted" ShowStatusBar="true" Width="600px" OnItemCommand="RadGrid1_ItemCommand">

 

 

 

 

 

<PagerStyle Mode="NextPrevAndNumeric" />

 

 

 

 

 

<GroupingSettings CaseSensitive="false" />

 

 

 

 

 

<MasterTableView TableLayout="Fixed" DataKeyNames="episodeGuid" CommandItemDisplay="TopAndBottom">

 

 

 

 

 

<Columns>

 

 

 

 

 

<telerik:GridEditCommandColumn HeaderStyle-Width="40px" FilterControlWidth="30px"

 

 

 

 

 

ButtonType="ImageButton" UniqueName="EditCommandColumn">

 

 

 

 

 

<ItemStyle CssClass="MyImageButton" />

 

 

 

 

 

</telerik:GridEditCommandColumn>

 

 

 

 

 

<telerik:GridBoundColumn SortExpression="messageGuid" HeaderText="messageGuid" DataField="messageGuid"

 

 

 

 

 

UniqueName="messageGuid" Visible="false" ReadOnly="true">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn SortExpression="episodeTitle" HeaderText="title" DataField="episodeTitle">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn SortExpression="date" HeaderText="date" DataField="date">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridButtonColumn ConfirmText="Delete this record?" ConfirmDialogType="RadWindow"

 

 

 

 

 

ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"

 

 

 

 

 

UniqueName="DeleteColumn">

 

 

 

 

 

<ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />

 

 

 

 

 

</telerik:GridButtonColumn>

 

 

 

 

 

</Columns>

 

 

 

 

 

<EditFormSettings ColumnNumber="1" CaptionDataField="Epsiode" CaptionFormatString="Edit properties ministry {0}"EditFormType="Template">

 

 

 

 

 

<FormTemplate><table cellpadding="5" cellspacing="0" border="0"><

 

tr><td class="formFieldNameGeneric">Episode Video File</td><td class="formField"><asp:DropDownList ID="dlVideos" runat="server" DataTextField="videoTitle" DataValueField="videoGuid"SelectedValue='<%# Bind( "videoGuid") %>' AppendDataBoundItems="true" CssClass="DropDown"DataSourceID="SqlDataSource2"><asp:ListItem Text="None" Value=""></asp:ListItem></asp:DropDownList></td></tr>

I was thinking something along these lines but I could never get it to work

 

protected

 

void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)

 

{


GridEditCommandColumn

 

editColumn = (GridEditCommandColumn)RadGrid1.MasterTableView.GetColumn("EditCommandColumn");

 


try

{

//If the file exists then bind it to the dropdown

}

 

 

catch

 

{

//The file was deleted. Selected value is now NULL.

}


}

Thanks for the help!!!

sasho
Top achievements
Rank 1
 answered on 09 Feb 2011
0 answers
50 views
Hi there,
I am using RadTreeView Control  and have come across this issue when validating CSS and Markup in validate.w3.org.
I get : id and name attributes must begin with a letter, not a digit. error
Here are the some of the errors:
# Error Line 820, Column 179: there is no attribute "runat"
 
…lutions/Solutions-By-Need.aspx' runat='server' id='8c1836f8-fc8d-4842-817b-18b…
 
?
 
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).
 
This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
 
How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
# Error Line 820, Column 192: value of attribute "id" invalid: "8" cannot start a name
 
…ions-By-Need.aspx' runat='server' id='8c1836f8-fc8d-4842-817b-18b17d76c9b4'>So…
 
?
 
It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit.
# Error Line 820, Column 350: value of attribute "id" invalid: "8" cannot start a name
 
…ions-By-Need.aspx' runat='server' id='8c1836f8-fc8d-4842-817b-18b17d76c9b4'>By…
 
?
 
It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit.
# Error Line 820, Column 350: ID "8c1836f8-fc8d-4842-817b-18b17d76c9b4" already defined
 
…ions-By-Need.aspx' runat='server' id='8c1836f8-fc8d-4842-817b-18b17d76c9b4'>By…
 
?
 
An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).
# Info Line 820, Column 192: ID "8c1836f8-fc8d-4842-817b-18b17d76c9b4" first defined here
 
…ions-By-Need.aspx' runat='server' id='8c1836f8-fc8d-4842-817b-18b17d76c9b4'>So…
 
# Error Line 820, Column 472: value of attribute "id" invalid: "8" cannot start a name
 
…ons-By-State.aspx' runat='server' id='8c1836f8-fc8d-4842-817b-18b17d76c9b4'>By…
 
?
 
It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit.
# Error Line 820, Column 472: ID "8c1836f8-fc8d-4842-817b-18b17d76c9b4" already defined
 
…ons-By-State.aspx' runat='server' id='8c1836f8-fc8d-4842-817b-18b17d76c9b4'>By…
 
?
 
An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).
# Info Line 820, Column 192: ID "8c1836f8-fc8d-4842-817b-18b17d76c9b4" first defined here
 
…ions-By-Need.aspx' runat='server' id='8c1836f8-fc8d-4842-817b-18b17d76c9b4'>So…
 
# Error Line 820, Column 598: value of attribute "id" invalid: "8" cannot start a name
 
…-By-Industry.aspx' runat='server' id='8c1836f8-fc8d-4842-817b-18b17d76c9b4'>By…
 
?
 
It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit.
# Error Line 820, Column 598: ID "8c1836f8-fc8d-4842-817b-18b17d76c9b4" already defined
 
…-By-Industry.aspx' runat='server' id='8c1836f8-fc8d-4842-817b-18b17d76c9b4'>By…
 
?
 
An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).

Any suggestions please?

Thank you
Bo Sep
Top achievements
Rank 1
 asked on 09 Feb 2011
2 answers
241 views
I have a RadGrid using the standard command, "Add New Record". Clicking on this does post back (InitInsert) and places the first row (I'm using InPlace editing) into edit mode as well as performing the validations for fields in the row (using standrd Required Field Validators), but clicking on the Insert link does nothing, no postback at all!

The Edit/Update/Cancel (through an EditCommand column) works fine for all of these functions and I'm trying to capture the Insert (i.e. PerformInsert or InsertCommand) event as it bubbles to the InsertCommand event handler so I can pull values from the form and update the data repository.

Here's the grid definition (I've omitted the column definitions for brevity):

<telerik:radgrid id="RadGrid_StaffBreakout" runat="server" 
    autogeneratecolumns="False" allowsorting="True" gridlines="None" insertitempageindexaction="ShowItemOnFirstPage"
    width="400px" allowpaging="True" skin="Windows7" horizontalalign="Center">
    <ItemStyle HorizontalAlign="Center" BorderWidth="0px" />
    <MasterTableView HorizontalAlign="Center" GridLines="None" EditMode="InPlace" CommandItemDisplay="TopAndBottom">            
        <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
        <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" 
            Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" 
            Wrap="True" VerticalAlign="Middle" />
        <AlternatingItemStyle Font-Bold="False" Font-Italic="False" 
            Font-Overline="False" Font-Strikeout="False" Font-Underline="False" 
            HorizontalAlign="Center" Wrap="True" VerticalAlign="Middle" />
        <EditItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" 
            Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" 
            Wrap="True" VerticalAlign="Middle" />
        <PagerStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" 
            Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" 
            VerticalAlign="Middle" Wrap="True" />
        <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" 
            Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" 
            Wrap="True" VerticalAlign="Bottom" />
    </MasterTableView>
    <HeaderStyle BorderStyle="None" />
</telerik:RadGrid>

When I hover over the Insert link, the href for it is set to, "javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("StaffBreakout$RadGrid_StaffBreakout$ctl00$ctl02$ctl03$PerformInsertButton", "", true, "", "", false, true))". I tried searching in the source of the page for this ID and didn't find it, but I'm not sure how to get this to be inserted into the page (or how I managed to omitted this).

I tried setting breakpoints in both PageLoad and InsertCommand event handlers, but neither gets called after the form is initially set up (i.e. InitInsert) - no PeformInsert/InsertCommand is ever being called.

All help appreciated!

Jon
Jon
Top achievements
Rank 1
 answered on 09 Feb 2011
Narrow your results
Selected tags
Tags
+124 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?