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
>
<
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
>
<
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
>
<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> |
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.
}
id and name attributes must begin with a letter, not a digit.
error# 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).
<
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
>