Thanks for the help. I got the solution. I just had to remove the IsPostback() condition which I was checking on Page Load.
anada8886
Posts
-
Access value from dynamically generated textboxes in the gridview. -
Access value from dynamically generated textboxes in the gridview.I have created a gridview with 2 template fields created at design time. I want to generate more template fields(gridview columns) dynamically at runtime,because no. of columns in the gridview is varying every time.I also need to have a textbox inside every template field. I have done up till generating these template fields along with the textboxes using ITemplete and I can also get these textboxes at the RowDataBound event. Then I am allowing the user to update the values in the textboxes. But when I try to get these textbox values on click event of the submit button which is outside the gridview, I can't find those newly generated columns and hence neither the textboxes. Can anyone please help me to find out the solution to this so that I can get the textbox values on submit button's click event. Thanks.
-
Sorting gridview (using IList instead of Dataset)Hello everyone, Basically my task is sorting the gridview manually and I got many solutions for that. But all of them are having the following thing in common.
DataView dv = new DataView(dt);
dv.Sort = sortExpression + direction;But in my code, I have to bind an IList (collection or generics), and not any dataset, to my gridview. Somehow,I am not able to find the Sort property for an IList. Could anyone please suggest what can I do about this?Do I have to convert the IList to a daraset?if yes,please tell how? Thank You.
-
CompreValidator for Textbox and FileUploadYes ,I know but I couldn't find any way here to mark your comment as 'Answer'.
-
CompreValidator for Textbox and FileUploadHey thanks, it worked !!!
-
CompreValidator for Textbox and FileUploadThanks for your reply sir, but as I told you using CustomValidator is giving me error - 'Microsoft JScript runtime error: Object required',in the method WebForm_RemoveClassName(element, className) of WebResource.axd.
-
CompreValidator for Textbox and FileUploadThanks for the reply. I have already tried using Custom validator with Javascript but it is giving me some JS error. And it is giving that error only for Custom validator,that is why I thought if it can be done using CompareValidator. Secondly ,I want it in client side only,it should not go to server side.
-
CompreValidator for Textbox and FileUploadI have to validate 1 textbox and 1 FileUpload control on my page. I have make the user to fill at least one of them, i.e. both of them can not be left blank. Do anybody have any idea about how can use the CompareValidator for this. Thank you.
-
Compare DropDownlists in GridViewHello all, I have a gridview on the page. And a dropDownList in all the gridview rows. But, the condition is,the user should not be allowed to select the same value in 2 dropdownlists in the gridview. Do anybody have any suggestion on how can I achieve this validation, using client side validation. Thanks.
-
Applying a Theme to the Master page.Thank you. I wanted to know this only.
-
Applying a Theme to the Master page.Thank you sir,but I wanted it on master page so that I don't need to make changes in each and every page.
-
Applying a Theme to the Master page.Actually, I tried on the aspx page and it was working but it's not feasible to set this for every page. So, I wanted to know if I can set the theme using master page. Well, Thanx for your reply.
-
Applying a Theme to the Master page.Thanx for your reply. I have done the same thing & it is working also. But can't I set the theme in master page?
-
Applying a Theme to the Master page.Hello everyone, Can anybody please tell me,what is the proper way of applying a theme to the Master page. Instead of setting the theme attribute of every page ,I did it by writing
<pages theme="Theme"></pages>
in the web.config & it worked fine, but I want to use theme in master page.Any suggestions?
-
User Control Inside Modal PopupThanx for replying, The cancel button is not doing anything,it simply needs to close the popup and that too without going to server side. It could be done by setting,that button's id as cancelButtonId of modal popup.But since the button is not on the same page.It's rather inside the user control on that panel, I am not able to use this utility as well. Please reply.
-
User Control Inside Modal PopupHello everyone, I have placed a User Control inside a modal popup & it is working fine. There is also one Cancel button on the user control which is meant for closing the popup. Since ,it is inside the user control ,I am not getting how to make it the CancelControlId for the modal popup. Do anybody have any idea,how can I achieve this?
-
Radio Button OnCheckedChanged() event is not calledThanx for your reply,but I have already tried doing this. In fact,I created a separate project just to check whether it works or not,but it still failed. The same method I called on a button's OnClick & it worked but it didn't work for RadioButton's OnCheckedChanged().
-
Radio Button OnCheckedChanged() event is not calledHello everyone, I have a gridview,in which each row populates a question with its answers(as radio buttons). I have to execute some code on radio button's OnCheckedChanged event.Somehow,on its OnCheckedChanged event,page is postbacked but it is not going to OnCheckedChanged() method.Can anyone give any suggestions for how can I achieve this? The code looks somewhat like this :
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:GridView ID="GridView1" OnRowDataBound="GridView1_OnRowDataBound" AutoGenerateColumns="false"
runat="server">
<Columns>
asp:TemplateField
<ItemTemplate>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:GridView ID="GridView2" AutoGenerateColumns="false" runat="server">
<Columns>
asp:TemplateField
<ItemTemplate>
<asp:RadioButton ID="RadioButton2" runat="server" AutoPostBack="true" OnCheckedChanged="RadioButton2_CheckedChanged" /></ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </ContentTemplate> </asp:UpdatePanel> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>
-
Show Modal Popup Using JavascriptHi all, I have to display a modal popup on the click of a link button. the link button is inside the gridview and I have to pass the Id of the dataItem bound to the selected row to the modal popup. This I had successfully achieved using codebehind. But,now I am not suppose to write any server side code for this,hence I have show the modal popup using javascript.What I have tried uptil now is,
function showModalPopup(val) { document.getElementById('<%=chatCommentId_hf.ClientID%>').value=val; return $find('deleteBehavior').show(); } </script> -------------------------------------------------------------- protected void gv_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { ((LinkButton)e.Row.Cells[2].FindControl("delete_lnk")).Attributes.Add("OnClick", "javascript:return showModalPopup(" + ((Label)e.Row.Cells[1].FindControl("ChatCommentId_lbl")).Text + ");"); } } </code> This is working properly but the modal popup does not wait to get the user response,it just disappears immediately.I want it to wait till the user clicks any button on the modal popup,as it happens in case of other modal popups.Any idea how can I achieve this. Please help. Thank You.</x-turndown>
-
Validators with the Modal Popup ExtenderI am having some RequirefFieldValidators on the page and also a modal popup extender. There is also button on the page. Since,I have set the TargetControlId of modal popup to the button's id,it is doing validation and showing the popup at the same time. I want that on the click of the button,it should first check the validations and only after validating, it should show the modal popup.But this whole thing is to be done on client side only.Can anybody please give some suggestions regarding this. Thanks.