Click here to Skip to main content
15,897,187 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: The old DoEvents and UserControls Pin
treddie2-Jun-13 9:26
treddie2-Jun-13 9:26 
GeneralRe: The old DoEvents and UserControls Pin
Dave Kreskowiak2-Jun-13 14:21
mveDave Kreskowiak2-Jun-13 14:21 
GeneralRe: The old DoEvents and UserControls Pin
treddie2-Jun-13 16:33
treddie2-Jun-13 16:33 
GeneralRe: The old DoEvents and UserControls Pin
Dave Kreskowiak2-Jun-13 19:25
mveDave Kreskowiak2-Jun-13 19:25 
GeneralRe: The old DoEvents and UserControls Pin
treddie2-Jun-13 21:02
treddie2-Jun-13 21:02 
Questionlooping through rows and columns of a datarow Pin
hlsc19831-Jun-13 8:21
hlsc19831-Jun-13 8:21 
Questionhow to loop through items(columns) of a row in a dataset? Pin
hlsc198331-May-13 21:49
hlsc198331-May-13 21:49 
QuestionNot Getting cell value for selected row of GridView Pin
ADSCNET30-May-13 7:36
ADSCNET30-May-13 7:36 
Hi,

I'm not able to get the cell value for the selected row in the gridview, the code in the aspx page:
XML
<asp:GridView runat="server" ID="gvElMaster" PageSize="5" Width="100%" ItemType="EMS.Ems_ElMaster"
        DataKeyNames="ElMasterID" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
        SelectMethod="GetElMaster" HeaderStyle-VerticalAlign="Middle"
        HeaderStyle-HorizontalAlign="Center" CaptionAlign="Top" CellPadding="4" GridLines="None" ForeColor="#333333"
        OnSelectedIndexChanged="gvElMaster_SelectedIndexChanged">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:DynamicField DataField="ElName" />
            <asp:DynamicField DataField="ElStartRegDate" />
            <asp:DynamicField DataField="ElEndRegDate" />
            <asp:DynamicField DataField="ElDate" />
            <asp:CommandField ShowSelectButton="True" SelectText="Select" CausesValidation="False" InsertVisible="False" ShowCancelButton="False"></asp:CommandField>
        </Columns>
    </asp:GridView>

code behind:
SQL
Public Function GetElMaster() As IQueryable(Of Ems_ElMasterClass)
     Return _db.DbSet_ElMasters
End Function

Protected Sub gvElMaster_SelectedIndexChanged(sender As Object, e As EventArgs) Handles gvElMaster.SelectedIndexChanged
        MsgBox(gvElMaster.SelectedIndex)
        MsgBox(gvElMaster.SelectedValue.ToString)
        MsgBox(gvElMaster.SelectedRow.Cells(1).Text)
        MsgBox(gvElMaster.SelectedRow.Cells(2).Text)
        MsgBox(gvElMaster.SelectedRow.Cells(3).Text)
End Sub

I get empty text from all the cells

Development envirunment is:
- VS 2012
- Asp.net 4.5
- CodeFirst aproach

Thanks for the help
QuestionRenci SSH Problem Pin
ToxicF3AR28-May-13 5:50
ToxicF3AR28-May-13 5:50 
AnswerRe: Renci SSH Problem Pin
Dave Kreskowiak28-May-13 5:56
mveDave Kreskowiak28-May-13 5:56 
GeneralRe: Renci SSH Problem Pin
ToxicF3AR28-May-13 6:07
ToxicF3AR28-May-13 6:07 
GeneralRe: Renci SSH Problem Pin
Richard MacCutchan28-May-13 6:31
mveRichard MacCutchan28-May-13 6:31 
GeneralRe: Renci SSH Problem Pin
ToxicF3AR28-May-13 6:41
ToxicF3AR28-May-13 6:41 
QuestionWhere is my program spending the majority of time? Pin
treddie27-May-13 14:52
treddie27-May-13 14:52 
AnswerRe: Where is my program spending the majority of time? Pin
Dave Kreskowiak27-May-13 16:00
mveDave Kreskowiak27-May-13 16:00 
GeneralRe: Where is my program spending the majority of time? Pin
treddie27-May-13 17:26
treddie27-May-13 17:26 
GeneralRe: Where is my program spending the majority of time? Pin
Dave Kreskowiak27-May-13 18:06
mveDave Kreskowiak27-May-13 18:06 
GeneralRe: Where is my program spending the majority of time? Pin
treddie27-May-13 18:16
treddie27-May-13 18:16 
GeneralRe: Where is my program spending the majority of time? Pin
Dave Kreskowiak28-May-13 1:45
mveDave Kreskowiak28-May-13 1:45 
AnswerRe: Where is my program spending the majority of time? Pin
Tim Carmichael28-May-13 5:47
Tim Carmichael28-May-13 5:47 
GeneralRe: Where is my program spending the majority of time? Pin
treddie28-May-13 7:57
treddie28-May-13 7:57 
Questionsubcription out of range? how can i fix this problem Pin
Member 1003837621-May-13 15:02
Member 1003837621-May-13 15:02 
AnswerRe: subcription out of range? how can i fix this problem Pin
Dave Kreskowiak21-May-13 16:30
mveDave Kreskowiak21-May-13 16:30 
Questionvb6 vidoes Pin
gunakag2019-May-13 23:22
gunakag2019-May-13 23:22 
AnswerRe: vb6 vidoes Pin
CHill6020-May-13 0:06
mveCHill6020-May-13 0:06 

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.