Please forgive me if this question is elemental - I am new to ASP.NET, Telerik, and C#, so I'm struggling a bit. Still, I have managed to create a project that uses Forms Authentication and take me to the page containing my first grid, among other things. I just need another light bulb to go off, then I'll be on my way :)
My RadGrid is named RadGrid1. It contains the following GridHyperLInkColumn.
<telerik:GridHyperLinkColumn
HeaderText="eMail"
Text="email"
UniqueName="email_link"
SortExpression="email"
HeaderStyle-Width="25px"
DataNavigateUrlFields="email"
DataNavigateUrlFormatString="mailto:{0}"
HeaderStyle-HorizontalAlign="Center"
ItemStyle-HorizontalAlign="Center">
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</telerik:GridHyperLinkColumn>
As the grid is being prepared, I want to read the value of the email column in my data source, and if is is null I want to modify the hyperlink column so that the text '(none)' is displayed and the 'mailto:{0}' in the DataNavigateUrlFormatString = ''. In other words, I only want to display a valid hyperlink if there's an email for this row.
If someone could show me exactly what to do - every loop and line - it would help immensely.
Thanks in advance!
S--
| MyRadGrid.HeaderStyle.CssClass="MyHeaderStyle" |
| <telerik:RadAjaxPanel ID="RadAjaxPanelDownload" runat="server" Visible="true" defaultButton="ButtonDownload" Height="50px" Width="164px"> |
| <telerik:RadTextBox ID="RadTextBoxEmailDownload" runat="server" |
| Width="154px" MaxLength="50" style="font-size:10px !important; padding:2px !important;"> |
| </telerik:RadTextBox><br /> |
| <asp:Button ID="ButtonDownload" runat="server" Text="GO" CausesValidation="False" |
| UseSubmitBehavior="False"/> |
| </telerik:RadAjaxPanel> |
| Protected Sub ButtonDownload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonDownload.Click |
| ' read the email and save, email to customer requesting conf, alert |
| RadAjaxPanelDownload.Visible = False |
| End Sub |
When I click the button nothing happens. Click it again and the code runs, the panel goes invisible.
It's as if the first click is need to get focus.
Am I missing something?
Thanks
Clive