We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How can I programmatically add itemtemplates to a gridcolumndescriptor

Thread ID:

Created:

Updated:

Platform:

Replies:

61882 Jun 4,2007 03:05 PM UTC Jul 23,2007 08:39 AM UTC ASP.NET Web Forms (Classic) 7
loading
Tags: Grouping
Ryan Kadirbaks
Asked On June 4, 2007 03:05 PM UTC

Hi,

I wish you to programmatically build a tabledescriptor. with Hyperlink columns.

How can I do this ?

Valli [Syncfusion]
Replied On June 5, 2007 07:42 AM UTC

Hi Ryan,

Herewith I have attached a sample which helps you to achieve your requirement.

http://websamples.syncfusion.com/samples/Grid.Web/5.1.0.51/Forum-61882/main.htm

The above sample programmatically adds a 'Hyperlink' column by using the 'QueryCellStyleInfo' event.

Please try running the sample and let us know if it helps you.

Regards,
Valli

Yarius Yacinus
Replied On July 17, 2007 04:09 PM UTC

Hi,
Your code is working well ,but I would like to know how to open the link in new page .In fact my hyperlink.url="P:\\China Everbright.doc" wich is not a web page like in your exmple.
Thank you in advance

Yacinus

Valli [Syncfusion]
Replied On July 18, 2007 06:34 AM UTC

Hi Yacinus,

Below attached sample helps you to open the hyperlink in a new page.

http://websamples.syncfusion.com/samples/Grid.Web/5.1.0.51/Forum_61882_1/main.htm

Instead using the 'NavigateUrl' property, an client-side event which is called when the hyperlink is clicked opens the window in a new page.

Please try running the sample and let us know if this helps you.

Regards,
Valli

Yarius Yacinus
Replied On July 18, 2007 04:15 PM UTC

Hi valli,

thank you for your answer,it works very well,but I have another a question ,if it is possible to have hyperlinks in each row which not refer to the same Url? (same page )

Regards,
Yacinus

Valli [Syncfusion]
Replied On July 19, 2007 04:52 AM UTC

Hi Yacinus,

Thank you for your update.

Below is the sample link which helps you to add hyperlinks to the Grid Grouping control which helps you to navigate different url.

http://websamples.syncfusion.com/samples/Grid.Web/5.1.0.51/Forum-61883-2/main.htm

In the 'QueryCellStyleInfo' function you can check the rowindex and assign the different url strings.

Please let us know if this helps you.

Regards,
Valli

Yarius Yacinus
Replied On July 20, 2007 08:53 AM UTC

Hi Valli ,

Thanks for you response.Actually I would like to know how to add column in my GGC wich contains a button (save button or linkbutton) ,and how to handle the clicked button event (for example when clicked ,I have to save all row values in my data base )
Thank you in advance
Regards,
Yacinus

Valli [Syncfusion]
Replied On July 23, 2007 08:39 AM UTC

Hi Yacinus,

Thank you for your update.

Attached is a sample which uses '' to add a 'Button' to the column of the Grid Grouping control which handles the click event.

http://websamples.syncfusion.com/samples/Grid.Web/5.1.0.51/Forum-61883-3/main.htm

The client side and server side function of the button are triggered respectively on the click event.

The server side functions in the sample helps you to retrieve the rows of the Grid Grouping control. Similarly you can save the row value in the database on the click event of the button.

Please let us know if this helps you.

Regards,
Valli


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;