Click here to Skip to main content
15,914,452 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: RowCommand event issue in GridView Pin
Blue_Boy4-Sep-08 22:44
Blue_Boy4-Sep-08 22:44 
QuestionRowEditing in gridview Pin
trilokharry4-Sep-08 21:58
trilokharry4-Sep-08 21:58 
AnswerRe: RowEditing in gridview Pin
Blue_Boy4-Sep-08 22:48
Blue_Boy4-Sep-08 22:48 
GeneralRe: RowEditing in gridview Pin
trilokharry4-Sep-08 23:04
trilokharry4-Sep-08 23:04 
GeneralRe: RowEditing in gridview Pin
K V Sekhar4-Sep-08 23:07
K V Sekhar4-Sep-08 23:07 
GeneralRe: RowEditing in gridview Pin
trilokharry4-Sep-08 23:16
trilokharry4-Sep-08 23:16 
QuestionHandling browser Close (X) button Pin
K V Sekhar4-Sep-08 21:01
K V Sekhar4-Sep-08 21:01 
AnswerRe: Handling browser Close (X) button Pin
Abhijit Jana4-Sep-08 21:37
professionalAbhijit Jana4-Sep-08 21:37 
GeneralRe: Handling browser Close (X) button Pin
K V Sekhar4-Sep-08 22:37
K V Sekhar4-Sep-08 22:37 
GeneralRe: Handling browser Close (X) button Pin
K V Sekhar4-Sep-08 23:13
K V Sekhar4-Sep-08 23:13 
GeneralRe: Handling browser Close (X) button Pin
Abhijit Jana4-Sep-08 23:30
professionalAbhijit Jana4-Sep-08 23:30 
GeneralRe: Handling browser Close (X) button Pin
K V Sekhar4-Sep-08 23:44
K V Sekhar4-Sep-08 23:44 
GeneralRe: Handling browser Close (X) button Pin
K V Sekhar5-Sep-08 1:01
K V Sekhar5-Sep-08 1:01 
GeneralRe: Handling browser Close (X) button Pin
Abhijit Jana5-Sep-08 1:21
professionalAbhijit Jana5-Sep-08 1:21 
GeneralRe: Handling browser Close (X) button Pin
K V Sekhar5-Sep-08 2:34
K V Sekhar5-Sep-08 2:34 
GeneralRe: Handling browser Close (X) button Pin
Abhijit Jana5-Sep-08 3:46
professionalAbhijit Jana5-Sep-08 3:46 
GeneralRe: Handling browser Close (X) button Pin
K V Sekhar5-Sep-08 18:43
K V Sekhar5-Sep-08 18:43 
GeneralRe: Handling browser Close (X) button Pin
K V Sekhar5-Sep-08 20:03
K V Sekhar5-Sep-08 20:03 
QuestionHandling browser <- button Pin
K V Sekhar4-Sep-08 20:51
K V Sekhar4-Sep-08 20:51 
AnswerRe: Handling browser <- button Pin
Blue_Boy4-Sep-08 21:00
Blue_Boy4-Sep-08 21:00 
GeneralRe: Handling browser <- button [modified] Pin
K V Sekhar4-Sep-08 21:11
K V Sekhar4-Sep-08 21:11 
QuestionException Pin
trilokharry4-Sep-08 20:31
trilokharry4-Sep-08 20:31 
AnswerRe: Exception Pin
Blue_Boy4-Sep-08 20:41
Blue_Boy4-Sep-08 20:41 
QuestionHttp Response and Javascript Problem Pin
goradaranaresh4-Sep-08 20:30
goradaranaresh4-Sep-08 20:30 
QuestionException issue in grid view Pin
trilokharry4-Sep-08 19:43
trilokharry4-Sep-08 19:43 
Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.

view code:
<asp:GridView ID="grdBusScheduling" runat="server" ForeColor="#333333" DataKeyNames="DetailID" OnRowCommand="grdBusScheduling_RowCommand" OnRowEditing="grdBusScheduling_RowEditing" OnRowDataBound="grdBusScheduling_RowDataBound"
AutoGenerateColumns="False" CellPadding="5" Visible="False" DataSourceID="SqlDataSource1">
<EmptyDataTemplate>
<b>There is no Bus Schedule</b>
</EmptyDataTemplate>
<Columns>
<asp:TemplateField HeaderText="Date">
<ItemTemplate>
<%#Eval("ForDate", "{0:dd-MMM-yyyy}")%>
<%--<%#DataBinder.Eval(Container.DataItem,"ForDate", "{0:dd-MMM-yyyy}")%>--%>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FareForAdult" HeaderText="Fare For Adult" />
<asp:BoundField DataField="FareForChild" HeaderText="Fare For Child" />
<asp:BoundField DataField="FareForSr" HeaderText="Fare For Senior" />
<%--<asp:BoundField DataField="OpenStatus" HeaderText="Open" />--%>
<asp:TemplateField HeaderText="Open">
<ItemTemplate>
<%#Eval("OpenStatus")%>
</ItemTemplate>
</asp:TemplateField>
<%--Testing--%>
<asp:TemplateField Visible="false" HeaderText="Pick-up Point"><%-- SortExpression="Position" >--%>
<EditItemTemplate>
<asp:ListBox ID="lstCityArea" Width="200" Height="100" runat="server" SelectionMode="multiple" >
<asp:ListItem Value="0" Text="ChandPole"/>
<asp:ListItem Value="1" Text="ChandPole1"/>
<asp:ListItem Value="2" Text="ChandPole2"/>
<asp:ListItem Value="3" Text="ChandPole3"/>
<asp:ListItem Value="0" Text="ChandPole"/>
<asp:ListItem Value="1" Text="ChandPole1"/>
<asp:ListItem Value="2" Text="ChandPole2"/>
<asp:ListItem Value="3" Text="ChandPole3"/>
</asp:ListBox>
</EditItemTemplate>

</asp:TemplateField>
<%--*********--%>
<asp:CommandField ShowEditButton="True" HeaderText="Edit" />
</Columns>
<FooterStyle BackColor="#003366" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#EFF3FB" />
<EditRowStyle BackColor="#2461BF" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#003366" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#003366" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringTravel %>"
SelectCommand="BusDetailSelectByFields" SelectCommandType="StoredProcedure"
UpdateCommand="BusDetailEditByDetailID" UpdateCommandType="StoredProcedure">
<SelectParameters>
<asp:ControlParameter ControlID="ddlCityFrom" Name="CityFromID" PropertyName="SelectedValue"
Type="Int64" />
<asp:ControlParameter ControlID="ddlCityTo" Name="CityToID" PropertyName="SelectedValue"
Type="Int64" />
<asp:ControlParameter ControlID="ddlBusType" Name="BusTypeID" PropertyName="SelectedValue"
Type="Int64" />
<asp:ControlParameter ControlID="ddlVendor" Name="VendorID" PropertyName="SelectedValue"
Type="Int64" />
<asp:ControlParameter ControlID="ddlBus" Name="BusID" PropertyName="SelectedValue"
Type="Int64" />
<asp:ControlParameter ControlID="Date1" Name="FromDate" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="Date2" Name="ToDate" PropertyName="Text" Type="DateTime" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="DetailID" Type="Int64" />
<asp:Parameter Name="FareForAdult" Type="Int64" />
</UpdateParameters>
<UpdateParameters>
<asp:Parameter Name="DetailID" Type="Int64" />
<asp:Parameter Name="FareForChild" Type="Int64" />
</UpdateParameters>
<UpdateParameters>
<asp:Parameter Name="DetailID" Type="Int64" />
<asp:Parameter Name="FareForSr" Type="Int64" />
</UpdateParameters>
<%--<UpdateParameters>
<asp:Parameter Name="DetailID" Type="Int64" />
<asp:Parameter Name="OpenStatus" Type="Double" />
</UpdateParameters>--%>
</asp:SqlDataSource>

You get the best out of others when you give the best of yourself.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.