Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8240191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:24:14+00:00 2026-06-07T20:24:14+00:00

It is a Windows Form Application in C#. I am using DataRepeater Control in

  • 0

It is a Windows Form Application in C#.
I am using DataRepeater Control in which I am displaying three columns:
Text Label,Link Label,Link Label
Following is the screenshot:
enter image description here

Following is the code which populates DataRepeater:

private void Get_StaffLogins_RequestList()
    {
        mySqlConnection = DBAccess.getConnection();
        mySqlConnection.Open();
        DataTable dt = sysadmin.getStaffLoginsRequests(mySqlConnection);
        BindingSource bSource = new BindingSource();

        staff_id.DataBindings.Add("Text", bSource, "staff_id");
        //accessLink.DataBindings.Add("Value", bSource, "staff_id");
        //denyLink.DataBindings.Add("Value", bSource, "staff_id");

        if (dt.Rows.Count > 0)
        {
            bSource.DataSource = dt;
            r_msgs.DataSource = bSource;
        }
        else
        {
            r_msgs.DataSource = String.Empty;
            notify.Text = "There are no Pending requests for staff logins!";
        }
        mySqlConnection.Close();
    }

    private void accessLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
    {
        //Access Link Clicked
    }

    private void denyLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
    {
        //Deny Link Clicked
    }

Now what I need is that when User clicks on Access or Deny Link I somehow get corresponding StaffID so that I can mark that particular staffID Access/Denied in Database.

How can I attribute each Row Link Labels with unique staff ids?
thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T20:24:15+00:00Added an answer on June 7, 2026 at 8:24 pm

    I resolved this issue by getting Current Item Index of DataRepeater:

    private void accessLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            //Access Link Clicked
            int RequestNumber = r_msgs.CurrentItemIndex;
            MessageBox.Show(RequestNumber.toString()+1);
            //Remaining Code
        }
    

    This code Prints the Row number of the Access Link Label, and that’s what I wanted!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using c# .net , windows form application. I have a XML file which
Im using c# .net windows form application. I have created a database which has
I'm using a RichTextBox control in a .NET Windows Form application. I allow users
I have a windows form application which has a text box and 3 buttons.
i am using windows applications. in that form i am using DataRepeater control. i
All I have built a windows form application using VS 2005 Standard edition which
I have a windows form control inside wpf application using a windows forms host.
I have a windows form application in which i am using a background worker
I have Windows Form application and a label which is databound based on a
Im using c# .net windows form application. i have a SQL database with 5

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.