Click here to Skip to main content
16,007,443 members
Home / Discussions / C#
   

C#

 
GeneralRe: kill proccess with C# Pin
Martin#1-Jun-07 8:21
Martin#1-Jun-07 8:21 
GeneralRe: kill proccess with C# Pin
crash8931-Jun-07 8:25
crash8931-Jun-07 8:25 
QuestionHow to install Microsoft Indexing Services automatically Pin
Muhammad Nauman Yousuf31-May-07 10:05
Muhammad Nauman Yousuf31-May-07 10:05 
QuestionGeneral C# Questions Pin
Revant Jain31-May-07 9:16
Revant Jain31-May-07 9:16 
AnswerRe: General C# Questions Pin
PIEBALDconsult31-May-07 9:19
mvePIEBALDconsult31-May-07 9:19 
GeneralRe: General C# Questions Pin
Revant Jain31-May-07 9:22
Revant Jain31-May-07 9:22 
QuestionDataGrid Object Location Pin
Expert Coming31-May-07 9:02
Expert Coming31-May-07 9:02 
QuestionRe: DataGrid Object Location Pin
punchcardRay31-May-07 10:48
punchcardRay31-May-07 10:48 
If you have used a command field in the gv you should have no problem.
First the gv needs to have the DataKeyNames property set to the Field that has the ID for that table.
Then you should have a method that looks like

protected void gvTrouble_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int QuestionChoiceID = (int)gvTrouble.DataKeys[e.RowIndex].Value;
DeleteRecordByID(QuestionChoiceID);
}
the e.RowIndex tells you what row your in , and that in turn can give you the id
gvTrouble.DataKeys[e.RowIndex].Value
cast or convert that into an int and use it as the id field for a deleteion
private void DeleteRecordByID(int QuestionChoiceID)
{
string quizDelete;
quizDelete = @" Delete Questions where QuestionID = " + QuestionChoiceID + " ";

// be sure to rebind the data after you drop a row.
}



PunchcardRay
QuestionManagementBaseObject.SetPropertyValue not working Pin
Le centriste31-May-07 8:45
Le centriste31-May-07 8:45 
AnswerRe: ManagementBaseObject.SetPropertyValue not working Pin
Dave Kreskowiak31-May-07 8:50
mveDave Kreskowiak31-May-07 8:50 
GeneralRe: ManagementBaseObject.SetPropertyValue not working Pin
Le centriste31-May-07 8:53
Le centriste31-May-07 8:53 
GeneralRe: ManagementBaseObject.SetPropertyValue not working Pin
Dave Kreskowiak31-May-07 9:03
mveDave Kreskowiak31-May-07 9:03 
GeneralRe: ManagementBaseObject.SetPropertyValue not working Pin
Le centriste31-May-07 9:06
Le centriste31-May-07 9:06 
GeneralRe: ManagementBaseObject.SetPropertyValue not working Pin
Dave Kreskowiak31-May-07 9:18
mveDave Kreskowiak31-May-07 9:18 
GeneralRe: ManagementBaseObject.SetPropertyValue not working Pin
Le centriste31-May-07 9:23
Le centriste31-May-07 9:23 
GeneralRe: ManagementBaseObject.SetPropertyValue not working Pin
Dave Kreskowiak31-May-07 9:32
mveDave Kreskowiak31-May-07 9:32 
GeneralRe: ManagementBaseObject.SetPropertyValue not working Pin
Le centriste31-May-07 9:42
Le centriste31-May-07 9:42 
GeneralRe: ManagementBaseObject.SetPropertyValue not working Pin
Dave Kreskowiak31-May-07 10:19
mveDave Kreskowiak31-May-07 10:19 
GeneralRe: ManagementBaseObject.SetPropertyValue not working Pin
Le centriste31-May-07 10:34
Le centriste31-May-07 10:34 
GeneralRe: ManagementBaseObject.SetPropertyValue not working Pin
Dave Kreskowiak31-May-07 10:24
mveDave Kreskowiak31-May-07 10:24 
GeneralRe: ManagementBaseObject.SetPropertyValue not working Pin
Le centriste31-May-07 10:38
Le centriste31-May-07 10:38 
GeneralRe: ManagementBaseObject.SetPropertyValue not working Pin
Dave Kreskowiak31-May-07 13:04
mveDave Kreskowiak31-May-07 13:04 
GeneralRe: ManagementBaseObject.SetPropertyValue not working Pin
Le centriste31-May-07 13:29
Le centriste31-May-07 13:29 
GeneralRe: ManagementBaseObject.SetPropertyValue not working Pin
Dave Kreskowiak31-May-07 13:39
mveDave Kreskowiak31-May-07 13:39 
GeneralRe: ManagementBaseObject.SetPropertyValue not working Pin
Le centriste31-May-07 13:42
Le centriste31-May-07 13:42 

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.