<
script type="text/javascript">
var
Grid
function
RowSelected(rowIndex)
{
alert(
"Click on row with index: " + rowIndex);
var path = Grid.getCellByColumnUniqueName(Grid.Rows[rowIndex], "DT_FilePath").innerHTML;
var Filename = Grid.getCellByColumnUniqueName(Grid.Rows[rowIndex], "DT_FileName").innerHTML;
alert(
"Path=" + path);
alert(
"Filename=" + Filename);
}
function
GridCreated() {
alert(
"Grid with ClientID: " + this.ClientID + " was created");
Grid =
this;
}
</
script>
<
rad:RadGrid ID="DocGrid" runat="server" AutoGenerateColumns="False" DataSourceID="SDS1" GridLines="None" Skin="Green" EnableAJAX="True">
<ClientSettings ApplyStylesOnClient="True">
<Selecting AllowRowSelect="True"></Selecting>
<ClientEvents OnRowClick="RowSelected" OnGridCreated="GridCreated">
</ClientEvents>
</ClientSettings>
<
MasterTableView DataSourceID="SDS1" GridLines="Both">
<
RowIndicatorColumn>
<
HeaderStyle Width="20px"></HeaderStyle>
</
RowIndicatorColumn>
<
ExpandCollapseColumn>
<
HeaderStyle Width="20px"></HeaderStyle>
</
ExpandCollapseColumn>
<Columns>
<rad:GridBoundColumn DataField="DT_FileNum" HeaderText="DT_FileNum" SortExpression="DT_FileNum" UniqueName="DT_FileNum" Display="False">
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="DT_Desc" HeaderText="Document" SortExpression="DT_Desc" UniqueName="DT_Desc">
<ItemStyle Font-Size="Small" />
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="DT_DateTime" DataType="System.DateTime" HeaderText="Create Date" SortExpression="DT_DateTime" UniqueName="DT_DateTime"
DataFormatString="{0:MM/dd/yyyy}">
<HeaderStyle Width="70px" />
<ItemStyle Font-Size="Small" />
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="DT_Clerk" HeaderText="Clerk" SortExpression="DT_Clerk" UniqueName="DT_Clerk">
<HeaderStyle Width="80px" />
<ItemStyle Font-Size="Small" />
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="DT_FilePath" Display="False" HeaderText="DT_FilePath" SortExpression="DT_FilePath" UniqueName="DT_FilePath">
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="DT_FileName" Display="False" HeaderText="DT_FileName" SortExpression="DT_FileName" UniqueName="DT_FileName">
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="DT_DocumentCategory" HeaderText="Category" SortExpression="DT_DocumentCategory" UniqueName="DT_DocumentCategory">
<ItemStyle Font-Size="Small" />
</rad:GridBoundColumn>
</Columns>
</
MasterTableView>
</
rad:RadGrid>
<
asp:SqlDataSource ID="SDS1" runat="server" ConnectionString="<%$ ConnectionStrings:CASConnection %>"
SelectCommand="SELECT [DT_FileNum], [DT_Desc], [DT_DateTime], [DT_Clerk], [DT_FilePath], [DT_FileName], [DT_DocumentCategory] FROM [DocumentTable] WHERE ([DT_FileNum] = @DT_FileNum) ORDER BY [DT_DateTime] DESC, [DT_Desc]">
<SelectParameters>
<asp:SessionParameter DefaultValue="1999001544" Name="DT_FileNum" SessionField="FileNum" Type="String" />
</SelectParameters>
</
asp:SqlDataSource>
In the RowSelected function I get the first alert but not the last two. What am I doing wrong.
Thanks.