Hello,
Probably the simplest way is #2:
>> 2). You could use a template column, and concatenate the
>> variables.
The steps to do this:
1 - add a template column to your datagrid (if you haven't
used template columns before, just check the MSDN help,
they're really straight forward).
2 - the template column lets you create custom HTML for
each cell, so you could do something like:
<a>href="<%....%>?IN=<%....%>&PON=<%....%>><%....% ></a>
3 - I replaced each [var] with a databind expression,
something like <% ....%> where "..." is the syntax to
databind (look at databinding to a repeater or datagrid in
MSDN for the exact syntax, I don't remember it off the top
of my head).
That should do it.
Tim
>-----Original Message-----
>Thank you Tim S. It was a help however i still couldn't
figure out how to
>fix it? thanx
>"Tim S." <> wrote in message
>news:017701c339ad$4d605470$...
>> I understand you need something like:
>> <a>href="[myPage]?IN=[in_value]&PON=[pon_Value]>[text]
</a>
>>
>> where the [ ] are variables.
>>
>> Some ideas:
>> 1). In the code behind, you could create a new column
and
>> programmtically concatenate the values to form that Html
>> hyperlink. Then Bind this column to your datagrid.
>>
>> 2). You could use a template column, and concatenate the
>> variables.
>>
>> 3). If the calculatations get very heavy, You could add
a
>> linkButton column that calls a function which takes the
>> In,Pon, and other vars as inputs and redirects to a
>> calculated url.
>>
>> Tim S.
>>
>> >-----Original Message-----
>> >Hi, I have a xml which is ..
>> ><Root>
>> ><ProdIDQual>
>> > <ON>111111</ON>
>> > <PON>121212</PON>
>> > <IN>1x1x1x</IN>
>> ></ProdIDQual>
>> ><ProdIDQual>
>> > <ON>222222</ON>
>> > <PON>131313</PON>
>> > <IN>1z1z1z</IN>
>> ></ProdIDQual>
>> ></Root>
>> >
>> >---- I have displayed it on Datagrid with readxml
method
>> and works fine. I
>> >am trying to make a hyperlink in datagrid for another
>> page where I need to
>> >pass PON and IN from the upper XML. I user
>> onItemdatabound event to catch IN
>> >but couldn't get the other variable PON.. Is there a
way
>> to make a link from
>> >about XML to pass IN and PON? something like <a
>> >href="index.asp?IN=11111&PON=22222222>View</a>
>> >
>> >Thanks...
>> >
>> >KB
>> >
>> >
>> >.
>> >
>
>
>.
>
|