I have a webform in asp.net 3.5 and VB and uses RadAjaxManager for updating the
datatable/grid. Also uses impersonate in web.config.
I have a routine that loads a flat file into a datatable and checks
for the existance of a notes file on our fileserver and then updates
a datatable and grid if that file exists. Everything works fine when
the page first loads and my routine (shown below) checks and finds
the existance of the files and updates the datatable/grid correctly.
I also have a timer on the webform that checks the flat file for any
changes. If the flat file is changed then it updates the datatable and
checks for the existance of the notes files again by running the same
routine that it runs when the page first loads. However, this time it
does not find any files. The files are still there and the datatable/grid
gets updated correctly with any changes from the flat file. It is just
that System.IO.FileInfo and Exists always returns false every time
after the first time the routine is run during the page load event.
The note files are still available when the timer executes the routine
using AJAX but returns false. I can do a full refresh of the page and
the note files show up again.
...
Dim notesfile as String
notesfile = "\\hs_file\ROOT\SYS\HOME\" & username & "\NOTES\" & MeasureYears & "\" & sMeasureValue & ".doc"
Dim filenotes As New System.IO.FileInfo(notesfile)
If filenotes.Exists() Then
row("NotesFileName") = notesfile
row("Notes") = "Your Notes"
Else
row("Notes") = Nothing
row("NotesFileName") = Nothing
End If
...
Any help will be greatly appreciated. Thanks.
Jerry
<
asp:TemplateField ConvertEmptyStringToNull="true" HeaderText="Currency"
SortExpression="currencyID">
<EditItemTemplate>
<asp:DropDownList ID="DdlCurrencyEdit" runat="server"
AppendDataBoundItems="true" DataSourceID="SqlDSCurrencies"
DataTextField="currencyName" DataValueField="currencyID"
SelectedValue='<%# Bind("currencyID") %>'>
<asp:ListItem Value="">(none)</asp:ListItem>
</asp:DropDownList>
</EditItemTemplate>
editLink.Attributes[
"onclick"] = "return ShowAttachForm();";
This calls a Javascript function to open a RadWindow. I now need to pass parameters to the javascript function but I am having problems accessing the value of the other DataBoundGrid columns...it seems like the columns do not yet have a value. How can I access the value of a column on the ItemCreated event of a RadGrid so I can do something like
editLink.Attributes[
"onclick"] = String.Format("return ShowAttachForm('{0}','{1}');", dataItem["JobNo"].Text, dataItem["ClientNo"].Text);