|
amit.metkar wrote: ur tring that method of updating the gridview data to database is applicable only on the gridview event.
and the person who had this problem asking for getting data updated on external button_click to the gridview.
Dear,
Could you tell me how you judge this ? And please show me the difference between your and my code ? Only difference what I found is I given a hit, and you given entire code!. Actually my idea is just give a hint, why should I write entire code, it's like I doing his homework.
|
|
|
|
|
there is much more difference in ur code and my code
it is not like ur giving him just the hint and i m giving him the entire code OR homework.
UR CODE -- for the external button click which is not in gridview, so in this situation u can not get row index , this is the biggest problem in ur code, i m not saying that ur code was wrong.
MY CODE -- I get the Row index thro' GridViewRow Object. And one by one i can retrieve all rows and their cells values.
Amit Metkar
3i-infotech, Mumbai.
|
|
|
|
|
amit.metkar wrote: UR CODE -- for the external button click which is not in gridview, so in this situation u can not get row index , this is the biggest problem in ur code, i m not saying that ur code was wrong.
Again you are misunderstanding me, I think you are confused with that variable i , right ? I am very lazy to type , so I didn't type the loop That's it. Anyway good suggestion, Thanks
|
|
|
|
|
Ohhh Dear,
Sorry @ that, but a small thing can make things differ.
Okay dear, Nice to talk with u..
Amit Metkar
3i-infotech, Mumbai.
|
|
|
|
|
Hi Navneeth, Thanks for the help! this piece of code solved my problem!
thanks once again!
|
|
|
|
|
U must have multiple rows in that GridView, so make a foreach loop like this.
foreach (GridViewRow dgRow in myGridView1.Rows)
{
string strPK = myGridView1.DataKeys[dgRow.RowIndex].Value.ToString();
string str = ((TextBox)dgRow.FindControl("txtText")).Text.ToString();
//like this u will get all cells values and PK field ..
//Now U can Update this data from Gridview of each row
//to DataBase
}
Amit Metkar
3i-infotech, Mumbai.
|
|
|
|
|
Hi, Thanks for the help... should I write it in "button_click" event..?
& also kindly plz tell me how to use the Update command to update database....
plz.. thanks in advance!
|
|
|
|
|
Yes, u can write that in "button_click" event.
and @ ur second Q, can u clarify it,i mean explain it little, i m not getting wat u want?
Amit Metkar
3i-infotech, Mumbai.
|
|
|
|
|
dont use external button... the thing ur doing is inbuild so use the smart tag and add or edit colums in that watever thing u needed just add it weather its edit r update r any thing else and in the fireevent write the coding.. i think tis will help u
vivek nanda
|
|
|
|
|
Hi all,
Can we browse for files without using file upload control. Is there any web user control.
Why I need this is, I want to browse multiple files at a time. That is not possible in file upload control. So could you please help me out to solve this problem.
Thanks and Regards,
Hariharan C
|
|
|
|
|
Looks like you have posted a similar thread in another forum also.
There aren't much file system specific controls for security reasons. You may need to go in for an ActiveX Solution for MultipleFiles.
|
|
|
|
|
Hi,
I am not familiar with activex solution. Can you teach me.
Thanks and Regards,
Hariharan C
|
|
|
|
|
Is this[^] your requirement ? If yes I think we had discussed lot there. Is it ?
|
|
|
|
|
Hi Navaneeth,
Yes we have discussed a lot about this.But still I didn't get my solution. My problem is I dont want the file upload control, where we can upload only one file at a time.
Can we have any other web user control for that, where we can browse for multiple files at a single click.
Thanks and Regards,
Hariharan C
|
|
|
|
|
Could you go through the previous threads ? I think my final answer will solve your problem.
|
|
|
|
|
Hi Navaneeth,
In the final answer what you have suggest is to add the list box. But there also we are adding the file one by one to the list box. we are not able to add more than one file at a stretch (i.e at one click) to the list box.
Thats why I am asking is there any other web user control, where you can browse more than one file at a single click. Could you please help me out.
Thanks and Regards,
Hariharan C
|
|
|
|
|
Then you can check the link what satips referred. But will your client browser allow activex controls to be installed ?
|
|
|
|
|
Multiple Files Upload[^]
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
|
|
|
|
|
Is there any way to hide a dropdownlist when its holding data...?
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
|
|
|
|
|
Do you want to hide a dropdownlist when it has items listed in it?
If yes,
if(dropdownlist1.items.count>0)
dropdownlist1.visible=false
gauthee
|
|
|
|
|
thnx anyway .....
i tried it another way...
dropdownlist1.Visible=false;
but that time i encountered a javascript error..saying that
Error : Object required ;
i am not getting wat it means...
i have written a javascript in .cs file, but has no relation with the dropdownlist..
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
|
|
|
|
|
sajan ss wrote: i have written a javascript in .cs file, but has no relation with the dropdownlist..
Can you show us the Javascript that you wrote?
sajan ss wrote: Error : Object required ;
The invisible control doesn't show in HTML. So, any javascript code (eg: document.getElementById('dropdown'); ) which is trying to grap the id of invisible control will throw this error.
|
|
|
|
|
i made it invisible in aspx.cs file only...
but the javascript written is not concerned for this, that was for a gridview....
but still the error occurs...
anyway i wil attach the javascript...
<script language="javascript" type="text/javascript">
var mygridSelectedColor;
function setMouseOverColor(element)
{
mygridSelectedColor = element.style.backgroundColor;
element.style.backgroundColor='lightblue';
element.style.cursor='hand';
}
function setMouseOutColor(element)
{
element.style.backgroundColor=mygridSelectedColor;
element.style.textDecoration='none';
}
function ValidateForm()
{
var user_date=document.form1.txteffdate
if (isDate(user_date.value)==false)
{
return false
}
return true
}
</script>
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
|
|
|
|
|
sajan ss wrote: Is there any way to hide a dropdownlist when its holding data...?
I wonder why you want this..
1. check the count and make it invisible
OR
2. Set the visible property of dropdown list to False after populating with data.
|
|
|
|
|