Click here to Skip to main content
14,879,028 members

Comments by Upadhyay Praveen (Top 11 by date)

Upadhyay Praveen 29-Jan-15 15:12pm View
   
My requirement is :- I have a gridview, where based on dropdown value i need to disable/enable the next control that is textBox.
I tried below code.

<script language = "javascript" type = "text/javascript">

function disableQuizID(txtNewQuizID, ddlNewCategory) {

if (ddlNewCategory.value == "4") {
alert("Testing1"); //Testing purpose.
document.getElementById(txtNewQuizID).disabled = true;
alert("Testing2");

}
else {
document.getElementById(txtNewQuizID).disabled = false;
}
}
</script >

while creating GridView in aspx page, I have given OnRowCreated="grdQuestions_RowCreated"

Now aspx.cs

protected void grdQuestions_RowCreated(Object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Footer)
{
DropDownList ddlNewCategory = (DropDownList)e.Row.FindControl("ddlNewCategory");
TextBox txtNewQuizID = (TextBox)e.Row.FindControl("txtNewQuizID");

ddlNewCategory.Attributes.Add("onchange", "disableQuizID('" + txtNewQuizID.ClientID + "', this);");

}
}

The dropdown has 4 values, If the selected value is 4 then the Textbox should be disabled/readonly. I tested above code, when i select value 4 in dropdown, the alert("testing1") comes, but alert("testing2") dont come. Please help. I am trying to find out from long time, did not get the solution. Please let me know if you want more info.
Upadhyay Praveen 18-Jan-15 3:22am View
   
Thanks, But 3rd column i can not add. This table has huge record.
Upadhyay Praveen 17-Jan-15 16:16pm View
   
Its coming into two column. I am expecting 5 columns.

35 Apple Ball Cat Dog
36 Cricket Football Hockey null

**Each word i want in separate column. but, except 35,36 rest all are in one column.
Upadhyay Praveen 5-Dec-14 12:30pm View
   
Thanks.
Upadhyay Praveen 5-Dec-14 12:29pm View
   
Thanks.
Upadhyay Praveen 4-Dec-14 21:27pm View
   
##customer
##department
##department
##customer

i want above result .
Upadhyay Praveen 4-Dec-14 21:26pm View
   
Yes, I am trying same thing . That Regex logic i am trying..As i am new in regex did not get yet .
Upadhyay Praveen 4-Dec-14 15:20pm View
   
i want to get the table name, and then will renaming. If i have few SPs then i can do manually. I have 1000+Sps. I already have renaming logic, just want to know the temp table names which starts with ##.
Upadhyay Praveen 4-Dec-14 15:03pm View
   
Yes, that is why i am thinking to find out using c#. I am trying with expression . But still did not get. It should start with ##, end with ' (single quotes) or space or enter .
Upadhyay Praveen 4-Dec-14 14:51pm View
   
Yes, using this query i have listed down the Stored procedures which contains global table. Now next step i want to know the global table name.
Upadhyay Praveen 4-Dec-14 14:46pm View
   
Whatever Query example i have mentioned in question. Lets assume that is inside a Stored Procedure. I want to extract all the Temp tables which starts with ## to be listed out. In this case - ##Customer, ##department. In real scenario I have 1000+ Stored procedure, I want to get the name and rename to the temp tables inside the sp.