Accessing datagrid _RowID
-
Can anyone tell me how to access the Datagrid _RowID? I'm using vb.net 2003(yes I know this is older technology. X| When I get this project done we are upgrading to 2008. :-D ) This is on an asp.net datagrid on an aspx form - not a windows form. Is there a way to get this information? I can see the _RowID in the watch window but I don't know how to access it from code. I have tried searching on Google and I have found nothing that explains how to do it in 2003. I don't want to limit the datagrid. I just want to jump to the page the record is on and highlight it. Thanks in advance for any help, it is greatly appreciated. :) Carolyn
If you can’t have fun at work, then why go to work?
-
Can anyone tell me how to access the Datagrid _RowID? I'm using vb.net 2003(yes I know this is older technology. X| When I get this project done we are upgrading to 2008. :-D ) This is on an asp.net datagrid on an aspx form - not a windows form. Is there a way to get this information? I can see the _RowID in the watch window but I don't know how to access it from code. I have tried searching on Google and I have found nothing that explains how to do it in 2003. I don't want to limit the datagrid. I just want to jump to the page the record is on and highlight it. Thanks in advance for any help, it is greatly appreciated. :) Carolyn
If you can’t have fun at work, then why go to work?
Did you see this ? http://blog.krisvandermast.com/AutonumberingASPNETGridControls.aspx[^] I think you might also use
asp:TemplateField
<ItemTemplate>
<%# Container.DataItemIndex + 1 %>
</ItemTemplate>
</asp:TemplateField>to get the Item index.... :-D
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript -
Did you see this ? http://blog.krisvandermast.com/AutonumberingASPNETGridControls.aspx[^] I think you might also use
asp:TemplateField
<ItemTemplate>
<%# Container.DataItemIndex + 1 %>
</ItemTemplate>
</asp:TemplateField>to get the Item index.... :-D
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using JavascriptI'll take a look at that. I ended up looping through the dataset and counting the number of records until I matched by record id and then sent that information to the function needing it. It seems to work but I thought there would be an easier way to access the datagrid _rowid. Thank you for the information. :) Carolyn
If you can’t have fun at work, then why go to work?
-
I'll take a look at that. I ended up looping through the dataset and counting the number of records until I matched by record id and then sent that information to the function needing it. It seems to work but I thought there would be an easier way to access the datagrid _rowid. Thank you for the information. :) Carolyn
If you can’t have fun at work, then why go to work?
But why? I am unsure about .NET 1.1 as it is very old tech.... But doesnt
Container.DataItemIndex
work ? :)Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript