|
|
cease-fire cease-fire
Sonia the fault is yours. Play nice...
|
|
|
|
|
Sonia Gupta wrote: I HAVED DEBUGGED THE CODE .IT IS SENDIG THE ACCURATE DATE.
Which is sending the accurate date ? ChangeDateFormat() method ?
|
|
|
|
|
Yes
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Hi all,
I m newbie to asp.net(vb), I have a grid view with 2 columns i tried to set the with of each column using ItemStyle.Width property but it didn't work.
Can anyone tell me how can i set the width of column???????????????
Thanks with anticipation
Regard
~V~
|
|
|
|
|
Setting the width of Gridvew
- Go to the designview
- Go to the propertypad of Gridview.
- Click on "Columns"
Ob: Fields dialog will be shon.
- Check "Selected fields" (I think there will be two columns as you said.)
- Click on one of those columns.
- Go to ItemStyle and set something to Width property of ItemStyle.
|
|
|
|
|
Thanks for your reply,
I have done same thing as u told me but the itemstyle.width property is not working
|
|
|
|
|
then, write one CSS class and assign this CSS class in "CssClass" property of BoundField properties.
|
|
|
|
|
Sir,
I m newbiew to asp.net so can u provide me some link or other help
Thanks once again
|
|
|
|
|
For example:
CSS - You create the CSS class like that..
<br />
.mytextboxclass {<br />
width : 300px<br />
}
then, set "mytextboxclass" in CssClass property of Bound Column.
|
|
|
|
|
Hi,
This is from chandrakanth.
Actually i want to creta Dynamic Menu in C# Based on Roles.
That meams if the Role is Admin then we have to provide some Screens
if Role is User means we have to Provider some screens.
How can i go for that.
Can any OnError suggest me how to go for that.
ThanksAnd Regarda
Chandrakant
Chandrakanth
|
|
|
|
|
mrgaddam wrote: Can any OnError suggest me
There is no "OnError" here.
mrgaddam wrote: How can i go for that.
You can read this article [ link[^] ] if you want to know about how to use Menu in ASP.NET.
|
|
|
|
|
Hi!
I am having problem navigating between child nodes of a parent nodes. I am also trying to maintain the state of a selected node using session. everything works fine if i just try to navigate between parent nodes(it also maintains the selected node state) but if i chose child node and try to navigate i get null reference exception in line
in below line
tn.Selected = True
codes with in the page.
-------------------------------------
Public Property LocationId() As String
Get
Return Session("locationid")
End Get
Set(ByVal value As String)
'lblLocid.Text = value
Session("locationid") = value
End Set
End Property
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Session("locationid") Is Nothing Then
Debug.WriteLine(Session("locationid"))
tn = Me.tvProperty.FindNode(Session("locationid"))
tn.Selected = True
End If
end sub
Protected Sub tvProperty_SelectedNodeChanged(ByVal sender As Object, ByVal e As EventArgs) Handles tvProperty.SelectedNodeChanged
Me.LocationId = tvProperty.SelectedNode.Value
End Sub
please help as i spend all day to debug but not sure whats wrong.
thanks in advance.
|
|
|
|
|
uglyeyes wrote: Protected Sub tvProperty_SelectedNodeChanged(ByVal sender As Object, ByVal e As EventArgs) Handles tvProperty.SelectedNodeChanged
Me.LocationId = tvProperty.SelectedNode.Value
End Sub
Is this event raised (and the value of the variable defined) when you select the child nodes? Also, what value are you using for the child nodes?
|
|
|
|
|
Hi! yes it is raised. sending you the full source which i didnt added earlier.
Delegate Sub TreeNodeSelectedIndexChanged(ByVal Sender As Object, ByVal e As System.EventArgs)
Public Event TreeNodeChanged As TreeNodeSelectedIndexChanged
Public Sub SubscribeTreeNodeChanged(ByVal Del As TreeNodeSelectedIndexChanged)
AddHandler TreeNodeChanged, Del
End Sub
Public Sub UnSubscribeTreeNodeChanged(ByVal Del As TreeNodeSelectedIndexChanged)
RemoveHandler TreeNodeChanged, Del
End Sub
---
Protected Sub tvProperty_SelectedNodeChanged(ByVal sender As Object, ByVal e As EventArgs) Handles tvProperty.SelectedNodeChanged
Me.LocationId = tvProperty.SelectedNode.Value
If dgBuildingComponent.SelectedIndex <> -1 Then
Dim KeyID As Integer = CType(dgBuildingComponent.DataKeys(dgBuildingComponent.SelectedIndex), Integer)
Me.BuildingComponentId = KeyID
Else
Me.BuildingComponentId = 0
End If
bindBuildingComponent()
RaiseEvent TreeNodeChanged(sender, e)
End Sub
thanks
|
|
|
|
|
CType(gvProperty.Rows(0).FindControl("txtPV"), TextBox) using this iam to get the textbox and also i write text iam getting the text but how i can change the forecolor to blue of that text box in the grid view
|
|
|
|
|
Does this code not work for you?
txt = CType(gvProperty.Rows(0).FindControl("txtPV"), TextBox)<br />
txt.ForeColor = Colors.Red
then, you can define the CSS class and set it to Textbox control..
|
|
|
|
|
Hello Everyone,
I am new to code project and i have a small scenario : i created a small web form for student details. in that, i placed a "dropdown listbox and a text box".
in dropdownbox(ddb), i added 3 items i.e., marks of a student in paper1,paper2,paper3 respectively.
now, i want to select paper1 from the "ddb" and enter the marks in the text-box.
next,i want to select paper2 from the "ddb" and enter the marks in the same text-box.
likewise for the paper3.
and, when i click a button, i would like to see the total.
below is the sample code i used. can anyone please suggest me how to implement this.
Also, please let me know if this is completely stupid thought.
private void Page-Load(....)
{
if(DropDownList1.SelectedIndex==0)
{
MsgBox1.alert("p1");
}
}
private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
if(DropDownList1.SelectedIndex==1)
{
MsgBox1.alert("p2");
}
if(DropDownList1.SelectedIndex==2)
{
MsgBox1.alert("p3");
DropDownList1.SelectedIndex=0;
}
}
|
|
|
|
|
this is pumpkin wrote: MsgBox1.alert("p1");
This is obviously test code, but either way, remember this won't work in the real world
this is pumpkin wrote: private void Page-Load(....)
Page_Load is a strange place to do this. You should have a submit button and handle it's event.
You've written some very simple test code. If you move beyond that and try to write code that does what you want, you should find soon enough the limitations of hte approach ( for example, if I change my drop list, should the existing value for that selected test be shown right away ? )
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Are you tired to answer this kind of questions?
|
|
|
|
|
when before textbox in the gridview it was a label so it is to reconize the cell in that by giving gridview1.row(0).cells(1).forecolor ="blue" but now iam keeping a textbox in the template field of a grid view that first cell now it was difficult to reconise.how it can be reconize
|
|
|
|
|
i have a datagrid ..in that two columns are there ....seats.and checkboxes
i am getting the seats value from the database...
my problem is if the seats value is more tha 0 ..then only the checkbox should be visible...
if the value is lessthan or equal to 0 ..then the checkbox should be invisible
how can i do this in asp.net
|
|
|
|
|
By setting the visible property on both controls, and putting them in one column, which is also dynamically named.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Use the GridView.RowDataBound Event and for each new generated row check the seats value (e.Rows.Cells[0].Text) and change the checkbox visibility accordingly. e.Rows.Cells[1].FindControl(checkbox)....
|
|
|
|
|
How can I create a browse button (option) that will allow me to browse and get the path where later I am going to save files to ? I need a path not the file name like control input file does. Thank you very much !
|
|
|
|