|
Dear,
I have created html textboxes in GridViewDataRow. I created html textboxes dynamically. I have given the IDs dynamically. By default the textboxes should be disabled. When I click linkbutton outside the gridview with onClientClick event, a javascript function should be called and then all the textboxes in gridview should be enabled. Please help me in implementing this. Help would be appreciated.
Regards,
Dileep.
|
|
|
|
|
Why are you creating textbox dynamically. Its better if you it to be always there, show and hide according to your requirement in rowdatabpound event of gridview.Store the Ids in some hidden field and in JS function, itereate through all the IDs and make them enable.
|
|
|
|
|
Hi,
Please try the following:
<script language="javascript" type="text/javascript">
function EnableTextBoxes() {
var gv = document.getElementById('GridViewID');
var objs = gv.getElementsByTagName('input');
var i=0;
for (i = 0; i < objs.length; i++) {
if (objs[i].style.display == 'none') {
objs[i].style.display = 'block';
}
}
}
</script>
Regards,
Jamil
|
|
|
|
|
Dear Jamil,
Thanks for your reply. But its still not working. No changes occured, still the textboxes are disabled only. Please dude, since last 2 days I am struggling for this. Please do help me.
Regards,
Dileep
|
|
|
|
|
Iterate through the grid view from javascript, find the textbox either by tagname or by Id and enable it like this,
txtBox.disabled=false;
Let me know if it works.
|
|
|
|
|
Hi guys,
I'm currently experiencing a strange phenomenon.
I have a user-control which allows the user to add data into a list on clicking on the OK Button.
On the page where I use this control all works fine.
However, now I need to have a second page where i need to enter the same data. So I wanted to re-use the control.
The control is shown but when I click on the OK button no event is trigger, nothing happens?
I have put a break point in the PageLoad of the user-control, but it doesn't event get there.
It seems like that the event if any is missing at all, althought that the html (client-side) code is the same.
Does anyone have a thought, or knows a reason why this could happen?
Thx,
Kurt
Learn from the mistakes of others, you may not live long enough to make them all yourself.
|
|
|
|
|
can you post the html code, code behind so i can suggest a solution?
Regards,
Jamil
|
|
|
|
|
Thanks for the reaction,
but the markup and the code behind is more then 2400 lines,
The real problem is that is have inherited this project from some other company which failed to deliver on time. And now I have to 'Make it Work, ASAP'.
Kurt
Learn from the mistakes of others, you may not live long enough to make them all yourself.
|
|
|
|
|
Are you loading the UserControl dynamically? if yes then you must re-load it on Init event of the page.
let me know if you need any further help.
Regards,
Jamil
|
|
|
|
|
As far as i know the control isn't loaded dynamically.
<visitcontrol:SimpleVisitorControl ID="BadgeControl1" runat="server" />
Is used to get the control on the page.
To show the Control it is call by a client side script.
badgeCallbackPanel.PerformCallback("");
Which is the same code as on the working page.
On both pages the control is shown in a 'popup' but on one of the pages the OK button doesn't work.
Learn from the mistakes of others, you may not live long enough to make them all yourself.
|
|
|
|
|
See if there are any event delegates that you have missed. May be the code expects you to catch the callback on the container page.
|
|
|
|
|
Can we write ASP.Net code in the events of "Exchange Server 2007"? For example, if new email message arrives in any email box (ABC@domain.com, XYZ@domain.com, etc.) of Exchange Server 2007 then some kind of event is fired in Exchange Server.
If it is possible then please guide me in doing this.
Thanks.
|
|
|
|
|
EXchange Server 2007 having Web Services - EWS ( Exchage Web Service ). Using that you can do that.
You can check EWS Article written by Brij, in Code project.
Cheers !
Abhijit Jana | MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
|
Hi All,
i have a textbox with numeric insert so if i worte 5 there, then i need to create a grid with 5 columns with checkboxes.
So the column should add at runtime i can't define the template field at designtime, when i user checkboxfield to create checkbox column dynamically then the column created but the checkboxes is not appeared in the column.
So what would the solution.
plz do reply.
Thanks
Yogesh Agarwal
|
|
|
|
|
No need to create it dynamically.Create a Templated Gridview and when user enters value in textbox, create a datasource with that specified number of rows and bind it to grid.
|
|
|
|
|
But i dont know how much column has to created because no. of columns is dynamic according to the numbers user enters. So how many template field i have to created.
|
|
|
|
|
Where this column name coming from?I mean where this column is mapped to?Where you get the no of records from?
if the column is only dynamic and you know the no of records, then you can try any of the following solution.I guess it'll work,
Either
1.Add Template column for check box and make AutoGenerateColumns true. Add dynamic columns to the datasource and bind it to grid.
or
2.Create a datasource with no of records, Bind the grid with the DataSource and add the dynamic columns in the Row_Created event.
|
|
|
|
|
For now i create the columns with the name 1,2,3,... for loops counter value. and i dont want to bind it with any database table.
i used the following code to create the column for now
<br />
loop<br />
<br />
CheckBoxField cf=new CheckBoxField();<br />
cf.HeaderText=i.toString();<br />
gridview.columns.add(cf)<br />
<br />
End Loop<br />
it creates the column for me but no checkbox appears there
|
|
|
|
|
How you are binding your gridview?Whats the DataSource?
|
|
|
|
|
HI,this is my idea:
1、you can add a table with runing at service in UI
2、create table tb=new row()
3、crate cell c = new cell()
4、ch = new chkbox()
5、c.add.control(ch)
6、tb.add(c)
7、tablName.add(tb)
you can add dynamic table cell
so...i don't know than can help you .
|
|
|
|
|
I'm using a query string in asp.net2.0 web application.I encrypt a string value and after encryption it becomes M8BIJqI+Sdc= and I send the value using query string.When I receive the value in another page using Request.Querystring method it comes as M8BIJqI Sdc=.The + symbol becomes a space .So I'm getting error during decryption. Anyone explain such behavior !!!!
|
|
|
|
|
There are some characters that cannot be passed over querystring.For that you need to do URL endcoding as, for encoding Server.UrlEncode and decoding as Server.UrlDecode .
For details Have alook
|
|
|
|
|
|
your welcome
|
|
|
|