BrainTeaser - c'mon, feel the pain

csharp United States
  • 17 years ago

    hey all, im trying to build a database driven bulletin board in c#, and i really need some help here. I am using access and visual studio.NET. all i want to do is copy the primary key value from the dbase to another column. the primary key is an int, but i need to convert to a string so i can rowfilter it into a dataview and display it in a datatable. so far i have 4 pages, 1- topics, 2-posts, 3-Newtopics and 4-replies.
    in the dbase i have two tables in the dbase, topics and replies. on page 1 i have 1 datagrid showing all of the topics and i am using the edit function as a view button to get the primary key and pass to page 2 with a session variable. page 2 has 2 datagrids, where the replies are rowfiltered in a dataview on a datagrid. i am trying to get the second datagrid to show  only the topic that was selected from page 1. here is the problem, also on page 1 there is a button to add a new topic, which takes you to page 3, now, on page 3 when i add a topic and post it i need to copy the primary key to another column called TopicID (STRING)to enable me to filter for the view in page 2.
    maybe this is the completely wrong way to go about it, but i have discovered that th rowfilter will only accept a string to sort by, this is why TopicID is a string.


    can anyone untangle this mess?


    regards,
    das

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are only two kinds of languages: the ones people complain about and the ones nobody uses” - Bjarne Stroustrup