The following event is fired, i have a selected row.
Protected Sub WebDataGrid1_RowSelectionChanged(ByVal sender As Object, ByVal e As Infragistics.Web.UI.GridControls.SelectedRowEventArgs) Handles
WebDataGrid1.RowSelectionChanged
If e.CurrentSelectedRows.Count > 0 And Not IsNothing(e.CurrentSelectedRows(0))
Then
Dim selectedRows As
Infragistics.Web.UI.GridControls.SelectedRowCollection = e.CurrentSelectedRows
Dim dataItem As Object = e.CurrentSelectedRows(0).DataItem
when i click on a row of a webdatagrid i want get the current id of the dataset's current idfor example the customerid of the dataset.i bind my webdatagrid to a dataset (everything i do in vb.net ! )how can i ge the data throughe.CurrentSelectedRows ????
Martin,
You can handle ItemCommand Event handler to get a reference to the control that raises the event of the grid. How to implement ItemCommand event please see this link:http://community.infragistics.com/forums/p/41382/230553.aspx#230553
Hope this helps.
Hi, since a long wasted time, i came to the resume that is not possible. infragistics give me no help to this issue.i have done it not like this.
<ig:TemplateDataField Key="Titel"> <ItemTemplate> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%#GetLinkID(DataBinder.Eval(DirectCast(Container, Infragistics.Web.UI.TemplateContainer).DataItem, "ID"))%>'> <asp:Label ID="TitelNameLabel" runat="server"><%#DataBinder.Eval(DirectCast(Container, Infragistics.Web.UI.TemplateContainer).DataItem, "Title")%></asp:Label> </asp:HyperLink> </ItemTemplate> <Header Text="Titel" /> </ig:TemplateDataField>i put a direct link in the row , so when i choose something i redirect to a new page.sad,but only thing that works for me.i have tryed it codebehind with several methods and casts, but i does'nt found my selected row.
greetings
Hallo Martin!
I am new in web programming and do have the question: How did you integrate your example into the web page? The solutions I found are only ba a RowSelectionChanged-Function in Javascript but not - as your example shows - in VB.
If I enter e.g.
WebDataGrid1.Behaviors.Selection.SelectionClientEvents.RowSelectionChanged = "WebDataGrid1_RowSelectionChanged"
then I get the error message
The "WebDataGrid1_RowSelectionChanged" for "RowSelectionChanged" should be a function, function name, or function text