|
I am using gridview and it has check box selection. I have set the allow paging property to true. When I click a checkbox and go to next page and again come back to the page where i have clicked a checkbox, it gets unchecked.Please help me on this issue. i have to maintain the state of the checkboxes
i am using vs 2005 and my code behind is c#
Sandeep Kumbhar
|
|
|
|
|
One post is enough.BTW why are you creating another posting for the same subject.
Regards,
Satips.
|
|
|
|
|
please provide a solutions on urgent basis
Sandeep Kumbhar
|
|
|
|
|
hi friends,
i have a problem like when i am redirecting from one page to other page in my site but with "https" instead of "http" then protocol is changed but home page is reloaded instead of opening that page referenced by
Thanks.
Chirag Patel
|
|
|
|
|
I am using gridview and it has check box selection. I have set the allow paging property to true. When I click a checkbox and go to next page and again come back to the page where i have clicked a checkbox, it gets unchecked.Please help me on this issue.
i am using asp.net 2.0
Sandeep Kumbhar
-- modified at 5:09 Saturday 5th May, 2007
|
|
|
|
|
use this in aspx file
"asp:CheckBox id="Chk" runat="server" AutoPostBack="true" checked='<%# status(container.dataitem("Active"),false) %>' OnCheckedChanged="SaveStatus" "
and then in code file
Function status(ByVal act As Integer) As String
If act = 0 Then
Return "False"
Else
Return "True"
End If
End Function
-- modified at 4:48 Saturday 5th May, 2007
|
|
|
|
|
i am using vs 2005 and my code behind is c#
Sandeep Kumbhar
|
|
|
|
|
Hi Sandeep Kumbhar
you can create session variable to save user selection in each page and at pagian change upload user selection from session variable
thanks
|
|
|
|
|
But, if there are 10 records per page, and suppose all the checkboxes for that records are selected then how can i store them in a session variable for that page?
Sandeep Kumbhar
|
|
|
|
|
Hi! is it possible to resize the columns of a GridView at run time?
Thanks & Regards,
SAMir Nigam,
Software Developer,
STPL, Lucknow, India.
|
|
|
|
|
|
How?
Thanks & Regards,
SAMir Nigam,
Software Developer,
STPL, Lucknow, India.
|
|
|
|
|
What you have tried so for in the gridview?
Regards,
Satips.
|
|
|
|
|
Hi,
There are some files that I'd like to put on the server of the web application, and I want the client to access them from the server using Server.MapPath()
The files saved on the server are on "C:\Inetpub\wwwroot\MyProject"
Now, How will the client access them after I install the application on his machine, I mean maybe the his Opeerating System is on the "D" not the "C" Drive??
for example, In my web application, when the user presses a button, certain data is saved in an XML file. This XML file should reside on the server so I put it here: "C:\Inetpub\wwwroot\MyProject". Then when the user presses another button, he is supposed to view this file. So he accesses this file using "Server.MapPath()". Now after deploying this application on another machine, how can I save this file on the server on this machine, I mean is this path correct or what??
sorry for taking u so long to read this but I just wanted to understand how to do that??
thnx in advance
|
|
|
|
|
You should always use relative paths (using Server.MapPath) and never hard code the path. Also when you deploy the application, you save that XML file in the Myproject folder under the application root whatever it is.
You can post the download code if you need more help.
|
|
|
|
|
Hi,
Try to get the path this way:
string path=Server.MapPath("..\\MyProject");
then you can add the file name to this "path" and save it.
Regards,
Blumen
|
|
|
|
|
thnx a lot, it worked
|
|
|
|
|
Hello all,,,
Am having one problem while developing,, please help me out as soon as possible,,, its urgent,,
Am using textboxes to insert data into database,,,I want to insert textbox contents into database,,, but without using any button r click event,,,,, after filling the data into textboxes it should save contents automaticaly,,,
waiting for reply
|
|
|
|
|
method1
on last textbox lost foucos called save to database
method2
on form unload if there are text in any txtboxes save it to db
|
|
|
|
|
Thank u for ur reply,,,,
but here am using 2 text boxes,, first fld is mandatory,,n second is not,,,
if i use method 1--on last textbox lost foucos called save to database..
after entering the first time,,,if am goin to enter for sec time,, anycost i ve to click the second textbox as the control is in that text box,,, but i want,,after entering into the textbox itself, it should save for any click event on the page,,,
if i use method 2--on form unload if there are text in any txtboxes save it to db
as i told 1st fld is mandatory,, i need to display error msg for dat,,, but if i write in d formload itself,,error msg is showin at d form load itself..
is der any solution for this
thank u..
|
|
|
|
|
plz told me that you design this for web or desktop application.
if you are using web application tht page then you are rally doing wrong to save data without clicking button bcz in web every thing take place remotly on your sever that page request to server,while in desktop application this can be affordable,any how.
i am going to tell you method for both web and desktop application.
on text box lost focus save the data to globally declare variable in desktop application and web application use viewstate to save the first text box data.now if the user go to the next text box then on the lost focus of that text save to db both,otherwise if user close the form or come again to the first textbox save to db and clear the first textbox.
try this if any problem ask for help.
thanx
|
|
|
|
|
Hello Every body,
I want to make the only those items selected in list box whose value i retrieve from database.
i unable to do so,
i had set the selectionmode to multiple .
regards,
rahul saini
|
|
|
|
|
|
i have created a number of combo boxes according to my need.no i want to save the changes when any one click update button,but here the control did not find by findcontrol function.
Dim i, j, totc As Long, FcNo As String, cmbcat As Object, fid As ArrayList
catarry = New ArrayList
catarry = CType(ViewState("catgs"), ArrayList)
totc = CLng(ViewState("totcts"))
For i = 0 To totc - 1
'for category combo box
'cmbcat = New Object
'cmbcat = CType(Me.FindControl("catpp" & catarry(i * 3 + 1)), DropDownList)
'cmbcat = CType(Me.FindControl("catpp" & catarry(i * 3 + 1)), DropDownList)
'cmbcat = CType(Me.FindControl("catpp" & catarry(i * 3 + 1)), DropDownList)
If Not CType(Me.FindControl("catpp" & catarry(i * 3 + 1)), DropDownList) Is Nothing Then
FcNo = CType(Me.FindControl("catpp" & catarry(i * 3 + 1)), DropDownList).Text
End If
StrQry = "update category set cat_order=" & FcNo & " where cat_no=" & "catpp" & catarry(i * 3 + 1)
'Now check for all forums of category
fid = New ArrayList
fid = AllFunctions.PopToarraylist("select Forum_No from Forum where cat_no=" & catarry(i * 3 + 1), 1)
For j = 0 To fid.Count - 1
cmbcat = New Object
'cmbcat = CType(FindControl("frmpp" & fid(i)), DropDownList)
'cmbcat = CType(FindControl("frmpp" & fid(i)), DropDownList)
'cmbcat = CType(FindControl("frmpp" & fid(i)), DropDownList)
If Not CType(Me.FindControl("frmpp" & fid(i)), DropDownList) Is Nothing Then
FcNo = CType(FindControl("frmpp" & fid(i)), DropDownList).Text
End If
'cmbcat.Text
StrQry = "update Forum set Forum_Order=" & FcNo & " where forum_no=" & fid(i)
AllFunctions.UpdateQry(StrQry)
Next
Next
|
|
|
|
|
Where did you add the combo boxes to the Controls collection?
you must add them first in order to find them later.
|
|
|
|
|