|
Javascript Code
function CheckAllDataGridCheckBoxes(aspCheckBoxID, checkVal)
{
re = new RegExp(':' + aspCheckBoxID + '$') //generated control name starts with a colon
for(i = 0; i < form1.elements.length; i++)
{
elm = document.forms[0].elements[i]
if (elm.type == 'checkbox')
{
if (elm.name=aspCheckBoxID)
{
elm.checked = checkVal;
}
}
}
}
|
|
|
|
|
check out if statement "if(elm.name=aspCheckBoxID)"
Best regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
Do u want to delete checked Image on page load event or on some button click event?
Best regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
I want to Delete button Click event
|
|
|
|
|
When you select the master check box will it checking all checkboxes in grid ?
|
|
|
|
|
while clicking the Master checkbox i could select all the checkbox,but when i click the delete button i won't get the sub checkbox value.
|
|
|
|
|
What code have you written to get the checked values?
Apurva Kaushal
|
|
|
|
|
Well usually this happens when viewstate of the grid is disabled. Make sure it is enabled. Now try getting your checkboxes like this
int DgItemCount = Datagrid.Items.Count;
for ( int i=0;i<=DgItemCount-1;i++ )
{
CheckBox chk = (CheckBox)Datagrid.Items[i].Cells[YourCheckBoxCell].FindControl(YourCheckBoxName);
if ( chk.Checked )
}
|
|
|
|
|
I used this code also eventhough am getting checkbox.checked=false;please check the first mail.i think the code everything is correct some property or something i have to do.
|
|
|
|
|
How to create master page in asp.net project?
I am a beginner in asp.net. Kindly help me and give an example code using vb. Could you please give earliest (urgent).
abglorie
|
|
|
|
|
Better buy a book and start reading it and try to implement the concept.
here there are some of the links related to the Master pages.
Msdn[^]
CP[^]
4 Guys[^]
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
Depends which version of framework are you using. If using 1.1 I would suggest not to bang your head too much. If 2.0+, Master is included in the Framework itself.
|
|
|
|
|
in my windows form,for search,two combo boxes are provided.the first one gives the table names and in second combo box the respective fields are provided ,by selecting any field the user enters the required value according to which te search is done
i m storing both tablename and field name in string
now in my select statement when i append the string with field name (with hard coded table name); it functions well but when i concatenate string having table name it gives errors..
$h@ma!|@
|
|
|
|
|
say me your error to check it.
We Can Do Anything, If We Want It
|
|
|
|
|
if(combobox2.text==" teachers name")
str="t_name"; //giving field name
//many if statements here
strQuery = " SELECT * FROM tbl1,tbl2,tbl3 WHERE tbl1." + str + "=" + textBox1.Text+"AND
tbl1.t_id=tbl2.tb_id AND tbl.t_id=tbl3.tb3_id ";
it works
but when i do
//tablename=combobox1.text;
//or
tablename="tbl1";
strQuery = " SELECT * FROM tbl1,tbl2,tbl3 WHERE" + tablename + "." + str + "=" +
textBox1.Text+"AND tbl1.t_id=tbl2.tb_id AND tbl.t_id=tbl3.tb3_id ";
it gives error
$h@ma!|@
|
|
|
|
|
what error?
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
some exception is handled at runtime
$h@ma!|@
|
|
|
|
|
use try catch and catch the exxception
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
strQuery = " SELECT * FROM tbl1,tbl2,tbl3 WHERE" + tablename + "." + str + "=" +<br />
<br />
&textBox1.Text+"AND tbl1.t_id=tbl2.tb_id AND tbl.t_id=tbl3.tb3_id ";
"AND" operator will be join with Textbox1.Text
so give spance there
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
strQuery = " SELECT * FROM tbl1,tbl2,tbl3 WHERE " + tablename + "." + str + "=" +
textBox1.Text+" AND tbl1.t_id=tbl2.tb_id AND tbl.t_id=tbl3.tb3_id ";
User this string
best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
still no progress!!
$h@ma!|@
|
|
|
|
|
check this also "tbl.t_id=tbl3.tb3_id"
What is tbl?
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
well tbl is the tablename in databases..actually these are not the actual tablenames but it was to simplify the query to post
$h@ma!|@
|
|
|
|
|
I've always found using string.format rather than concatentation helps to simplify things like this and makes the code more readable so you can find syntax errors better.
Of course using a stored proc, as you should, this is not an issue.
only two letters away from being an asset
|
|
|
|
|
anybody would like to help me on how to add a datetimepicker in an asp.net application...
thank you
start a new beginning in every ending; thats what life for......
|
|
|
|